Re: Newbie questions: How to implement an AU rendering CPU-expensive N->M effects
Re: Newbie questions: How to implement an AU rendering CPU-expensive N->M effects
- Subject: Re: Newbie questions: How to implement an AU rendering CPU-expensive N->M effects
- From: William Stewart <email@hidden>
- Date: Wed, 06 Oct 2004 14:11:54 -0700
Firstly,
You can't do this as an effect (which has the restriction that it must pull
input for the same number of frames as its output) - you define this as a
'aufc' unit (format converter)
Then, you need to modify the code in PullInput to:
(1) Pull the number of input samples you need
- however, there's a restriction here:
- You cannot pull for more input samples than your max frames setting (as we
assume that max frames is something that can apply outside of your au to the
clients of your AU)... So, if you need more input samples than max frames,
then you should divide your pull into slices (how you divide this is up to
you)
Threading - there is no implicit threading (ie. When you are asked for
output you are expected to provide it) and call for input on the same thread
you are called on. If you want to introduce a threaded model (which some
AU's do) - then you can of course do that.
Finally, you might also consider looking at the offline AU semantics -
there's an example offline AU in the SDK... We've been doing offline
versions of many of our converter units (for instance, we'll have an offline
version of the varispeed available with Tiger).
HTH
Bill
On 6/10/04 2:00 PM, "Thorsten Karrer" <email@hidden> wrote:
> Hello,
>
> I am completely new to AU implementation so perhaps someone can give
> me a little hint how to start on this:
>
> I want to develop a "real-time" time-stretching AU or say, as
> real-time as possible. The DSP stuff itself (some modified phase
> vocoder) is already running fine (but slow) within matlab.
> I read almost every bit of documentation Apple provides on
> implementing AUs, dug through the SampleAU example code but I'm
> already at a loss...
>
> First thing is that I need my AU to pull different amounts of
> samples depending on the current stretching factor. As far as I can
> tell, I can't do that within the effect kernel of the provided
> SampleAU class. I played aroud with the PullInput() method but I
> don't know if that would be the first choice to solve the problem.
> If someone could get me the source code of Apple's Varispeed AU or
> anything similar (they do parameter dependent pulling, I think),
> this would help me very much!
>
> Second thing is that I do not understand the threading of the whole
> rendering. Is there a preferred way to do the DSP of my AU in a seperate
> thread? The phase vocoder includes some pretty complex operations on
> the short time spectrum of the input signal (plus the FFT and iFFT
> of length >= 2048) so I suspect implementing this directly inside
> the effect kernel of the AU won't work.
> So, if anyone has some example code snippets of a working AU which in
> some way utilizes the STFT of the input signal and is still being
> more or less real-time, I would be really thankful.
>
> Any help or comments on this are appreciated! (Except "RTFM" - which
> I already did more than once...)
>
> Thanks very much for your help,
>
> Thorsten
>
> --
> mailto: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
--
mailto:email@hidden
tel: +1 408 974 4056
__________________________________________________________________________
Culture Ship Names:
Ravished By The Sheer Implausibility Of That Last Statement [GSV]
I said, I've Got A Big Stick [OU]
Inappropiate Response [OU]
Far Over The Borders Of Insanity And Still Accelerating [Eccentric]
__________________________________________________________________________
_______________________________________________
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