Re: PostConstructor vs Initialize (AU's built-in Parameter Implementation)
Re: PostConstructor vs Initialize (AU's built-in Parameter Implementation)
- Subject: Re: PostConstructor vs Initialize (AU's built-in Parameter Implementation)
- From: Urs Heckmann <email@hidden>
- Date: Mon, 2 Feb 2004 09:13:50 +0100
Am Sonntag, 01.02.04 um 21:23 Uhr schrieb Marc Poirier:
On Fri, 30 Jan 2004, Urs Heckmann wrote:
How would you change some complex, rarely changing internal states
(i.e. filter coefficient calculation or getting callbacks for the
correct oscillator module, whatever) outside Render() then? - To be
precise, if one doesn't overwrite SetParameter(), the first time the
AU
becomes aware of a parameter change is upon render call, right?
(Please
correct me if I'm wrong...)
Not necessarily, it really depends. It depends on: 1) how serious the
state changes are, 2) whether you're willing to lose sample-accurate
time-stamping of parameter changes, and 3) how dense parameter changes
are
in a certain scenario, which will change from day to day for user to
user.
Marc, how can you get 2) when queriing the array of parameters in the
GlobalScope Element?
Your example for 3) is right. My "rarely changing internal states"
should be rarely changing, of course.
My trick is building internal parameter change events, which a) can be
queued within the render process and b) let me know in Render() when
painful calculations occurr, with multiple entries sorted out. - Hehe,
I attach a lot of meta data to my internal parameter scheme now,
including knowledge when to use a) or b) or even other things, like my
parameter smoothing factor for jitter free lowpassing/ramping parameter
changes.
You are right about being too afraid of if()s. Still, doing 500+ at the
beginning of Render() doesn't sound healthy to me. In Zebra, I even go
further and distribute heavy calculations (FFT for example, comparable
to loading a sample) across several render slices.
Well, everything depends. No-one seriously needs sample accurate
parameter changes when they cause clicks and pops 8-))
Cheers,
;) Urs
urs heckmann
email@hidden
www.u-he.com <- Zebra Audio Unit
_______________________________________________
coreaudio-api mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/coreaudio-api
Do not post admin requests to the list. They will be ignored.