Once again: pitch change of audio sample

Hi list,

I’m desperately trying to get an audio sample to change its pitch. I’ve
tried the sample code of Jacek Popawski
(http://www.libsdl.org/pipermail/sdl/2001-August/037543.html) and the
one of Benno Senoner
(http://www.libsdl.org/pipermail/sdl/2001-August/037571.html), both with
no luck: they give me just white noise.

I tried to write my own little function, which sounded at least a little
like the original pitchchanged sample, but it worked very (!) poorly and
was unusable at a factor of 0.7/1.3 already (increasingly whitenoisy).
When I tried 0.5 I heared at first only on the left, then only on the
right channel, which got me to think I got something messed up with the
channel interleaving. I’ve tried the above using plain SDL, currently
I’m using SDL_mixer (Mix_Chunk structure).

Are there any good examples how it can be done?

Thanks
Johannes

Message: 12
Date: Mon, 16 Feb 2004 00:33:59 +0100
From: dfnsonfsduifb@gmx.de (Johannes Bauer)
To: sdl at libsdl.org
Subject: [SDL] Once again: pitch change of audio sample
Reply-To: sdl at libsdl.org

Hi list,

I’m desperately trying to get an audio sample to change its pitch. I’ve
tried the sample code of Jacek Popawski
(http://www.libsdl.org/pipermail/sdl/2001-August/037543.html) and the
one of Benno Senoner
(http://www.libsdl.org/pipermail/sdl/2001-August/037571.html), both with
no luck: they give me just white noise.

I tried to write my own little function, which sounded at least a little
like the original pitchchanged sample, but it worked very (!) poorly and
was unusable at a factor of 0.7/1.3 already (increasingly whitenoisy).
When I tried 0.5 I heared at first only on the left, then only on the
right channel, which got me to think I got something messed up with the
channel interleaving. I’ve tried the above using plain SDL, currently
I’m using SDL_mixer (Mix_Chunk structure).

Are there any good examples how it can be done?

Thanks
Johannes


Hi,

when you approach it theoretically, you’ll see a pitch is actually a
frequency mixing (like it is done in a ring modulator)
of the audio signal and a given frequency.
I don’t know exactly the capabilities of SDL_mixer, but try to look out for
functios that could be useful in emulating a ring modulator in DSP or
Software.

Regards,

Sebastian