Applying parameter ramp over time for AENewTimePitch in AERenderer block
Hi all!
I have an AENewTimePitch effect that I want to randomly adjust its pitch in an AERenderer block using a ramp function to increase/decrease to the target pitch over time (lets say -500 to 500 in 0.5 secs). I was looking at a few ways to do this (AudioUnitParameterEvent, AudioUnitScheduleParameters, etc), or simply keeping track of a few variables with a loop over the frames in each callback and updating them in the render block; I was wondering if you have insights into the most optimal approach though? Is there a good and bad way of doing this? Are there any CoreAudio/Accelerate functions that I should look into?
Also, do you think it would be helpful to add this as a utility function in TAAE2 as I would imagine it is a fairly common use case?
Thanks!
Mark
Comments
@manderson, this example uses the varispeed filter and TAAE1, rather than the NewTimePitch filter and TAAE2. But, it demonstrates how to change an effect's parameter over time, using a controlled NSTimer:
http://forum.theamazingaudioengine.com/discussion/comment/2880/#Comment_2880
I hope this helps!
Take care,
Mark
@markjeschke Thanks for pointing me to your example. Ideally I would like to do the updating inside the renderer block, the main reason being that I would like this to also work for offline rendering (an NSTimer in that case would not be ideal since the offline renderer timing does not correspond to say, playback speed).
@manderson, I see. Okay, I understand your reasoning. So, you'd like to set specific timecode where you want the AENewTimePitch to start and end within an offline track, right? I unfortunately don't know how to do that. So, if you figure it out, please share your solution with the TAAE community!
Thanks,
Mark
@markjeschke will do! I will definitely report back if I find a good solution.