[TAAE2] AENewTimePitchModule problem
Hi.
Could you help me please with AENewTimePitchModule. It seems not working or maybe I am doing something wrong.
I created a pitch module instance.
AENewTimePitchModule *pitchModule = [[AENewTimePitchModule alloc] initWithRenderer:renderer];
Set up pitch value
[pitchModule setPitch:1200.0];
Code in render block.
renderer.block = ^(const AERenderContext * context){
AEModuleProcess(sound, context);
AEModuleProcess(pitchModule, context);
AEBufferStackMixToBufferListChannels(context->stack, 1, (AEChannelSet) {0}, context->output);
};
self.output = [[ AEAudioUnitOutput alloc] initWithRenderer:renderer];
But I don't hear any changes to the original sound.
Similar code with AEBandpassModule works fine. Is there something that I missed?
Thanks in advance.
Comments
Yes indeed: the TimePitch module is slightly unusual because the amount of input can be different to the amount of output. Take a look at the TAAE sample app for how to handle this; basically, you gotta make a subrenderer and give that to the pitch module. Then in that subrenderer you run the generator modules that're the input to the pitch module.