Hi!
I am building an app for iOS. which depends to a great extent on time-stretching and I was thrilled to find the NewTimePitch Audio Unit. I am configuring a simple AUGraph:
kAudioUnitSubType_AudioFilePlayer -> kAudioUnitSubType_NewTimePitch -> kAudioUnitSubType_RemoteIO
The parameter "rate" of the NewTimePitch is set from around 0.7 to 1.3. Problem is that the NewTimePitch Unit distorts the audio quite badly. I found this post on coreaudio-api-maillist which relates to the problem:
Unfortunately I don't come to the same conclusion. I don't hear any phase problems, nor any monofication of the signal. We are only talking really bad distortion. I've done testing with all sorts of audio input down to a -24dB FS audio input and the distortion seems to be unrelated to volume.
Finally I found this blog post from CocoaConf by Chris Adamson, where he bundles the demo project from the conference:
I must admit that he pointed out a couple of things that I had missed out, but even after fixing these, I still had the distortion. More so, compiling the Demo Project from CocoaConf also distorted the audio, so I am beginning to wonder if the NewTimePitch AU really is corrupt.
A printout of my CAShow():
AudioUnitGraph 0xBD33001: Member Nodes: node 1: 'auou' 'rioc' 'appl', instance 0x815e940 O I node 2: 'aufc' 'nutp' 'appl', instance 0xa85ade0 O I node 3: 'augn' 'afpl' 'appl', instance 0x8298510 O I Connections: node 3 bus 0 => node 2 bus 0 [ 2 ch, 44100 Hz, 'lpcm' (0x00000029) 32-bit little-endian float, deinterleaved] node 2 bus 0 => node 1 bus 0 [ 2 ch, 44100 Hz, 'lpcm' (0x00000029) 32-bit little-endian float, deinterleaved] CurrentState: mLastUpdateError=0, eventsToProcess=F, isRunning=F
I also have:
- Ensured that the StreamFormat of the AUNewTimePitch is set equally on all other units - Setup the RemoteIO bus
Is there any magic trick that I need to know about or does anyone have a non-distorting sample of a graph that works with the NewTimePitch Audio Unit?
Best regards
/Jont Olof
_____________________________________ Co-founder and Senior Cocoa Developer centCode AB
Adress: Frödingsgatan 25, Uppsala, Sweden Phone: +46 707 381676 Zip: SE-75421
|