0

I'm trying to pitch-shift the microphone input in my AVAudioEngine pipeline. I install a tap on the last node in my input chain and write buffers to file.

I've tried to use AVAudioUnitTimePitch, but it seems to crash when I use it on my inputNode, no matter what I try. I've tried using the unit on a player node, and that works fine.

Does anyone know of other pitch effects, either written as plugins or configurations of other units, like the distortion preset? I'm currently only looking to change the pitch, not the rate of the audio.

Thanks

Cloov
  • 538
  • 1
  • 3
  • 15

1 Answers1

1

The time pitch audio unit appears to be designed to be pulled at the output rate, thus can't be driven from an input node at a different original rate.

If you just want the results written to a file, another option is to start by recording microphone input to a file; then use the time pitch unit when playing that file, using a tap on bus to save the modified result to another file at the new rate(s).

hotpaw2
  • 70,107
  • 14
  • 90
  • 153