Re: Sample-accurate parameter automation? Possibe at all with AUs?
Re: Sample-accurate parameter automation? Possibe at all with AUs?
- Subject: Re: Sample-accurate parameter automation? Possibe at all with AUs?
- From: Stephen Davis <email@hidden>
- Date: Tue, 11 Mar 2008 14:15:10 -0700
I can't talk for the CoreAudio team and it's been a while since I
looked at the code but I'm pretty sure that the efx kernel's Process()
call is made _for a given parameter lifetime slice_.
If a parameter is set for a given sample offset, the underlying code
will break up the render buffer into multiple slices at the parameter
"life" boundaries before calling the efx kernel, i.e. each call is the
start of a new parameter value. Therefore, only calling
GetParameter() at the beginning of Process() makes sense. If the
offset is unspecified, the entire buffer is processed in one call and
the parameter value is the same for the whole thing.
Look at the Render() method in AUEffectBase.cpp.
Having said all that, I am not familiar with how the parameter
scheduling is actually implemented under the covers. Start digging
around and this will probably become more clear. I do not know if you
have to opt-in for this behavior since I imagine it could wreak havoc
on block-based algorithms.
hth,
stephen
On Mar 11, 2008, at 1:36 PM, Greg X wrote:
Hi Mr. Dixon!
It seems that no one knows about a perfect solution.
(input parameter buffers)
I think that we need an official answer from Apple on
this. I hope someone from Apple is reading this thread
;)
Regards,
Greg1X
--- Kevin Dixon <email@hidden> wrote:
I agree with Greg, all the examples I've seen show
calling
AUBase::GetParameter in your Kernel's Process or
your AU's Render method
at the beginning of a call. AFAIK, there's no other
way to get the value
of your parameters, other than some system of
listeners that updates
private variables.
-Kevin
On 11 Mar 2008, at 7:03 pm, Greg X
<email@hidden> wrote:
What is your answer to my other questions?
For example:
Why are AU examples calling GetParameter only at
the
beginning of the render process?
Why is it acceptable? ..why is it a widely used
approach?
It's possible that your question is based on a
misconception.
GetParameter() and SetParameter() are methods in
the AU which get
called by the host. They don't get called by the
AU. Or at least,
they shouldn't get called by the AU:-).
The normal sequence of events is that the host
calls the AU's
SetParameter() method for all parameter changes in
the upcoming
timeslice, just before calling the AU's Render()
method. You will
notice that one of the parameters to
SetParameter() is the extremely
handy inOffsetSampleFrame, which tells you at
exactly which sample in
that timesclie to change the value of the
parameter to which your
rendering code refers when it is calculating
stuff.
Your AU is entirely free to honour or ignore
inOffsetSampleFrame as
you see fit. If you want sample-accurate parameter
changes, you'll
honour it.
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - -
- - -
Ian Kemmish 18 Durham Close,
Biggleswade, Beds
SG18 8HZ
email@hidden Tel: +44 1767 601361
Mob: +44 7952
854387
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - -
- - -
_______________________________________________
Do not post admin requests to the list. They will
be ignored.
Coreaudio-api mailing list
(email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be
ignored.
Coreaudio-api mailing list
(email@hidden)
Help/Unsubscribe/Update your Subscription:
@yahoo.com
This email sent to email@hidden
____________________________________________________________________________________
Never miss a thing. Make Yahoo your home page.
http://www.yahoo.com/r/hs
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Coreaudio-api mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Coreaudio-api mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden