• Post Reply Bookmark Topic Watch Topic
  • New Topic

Getting started with DSP: How to pitsh shift an audio stream in real time?  RSS feed

Ruediger Mueller
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello Code-Ranchers,

I've been playing around with the Java Sound API for a while and have written code than can do simple things such as recording, playing, saving and loading audio data.
Now that I am able to handle the sound API I want to do my first DSP-steps. I want to pitch the audio signal up or down while keeping the playback speed (frame rate).

My idea to achieve that is very simple and maybe could look like this or similar:

I simply pass over an audio frame represented as byte[], just the way I got it from the Sound API, and expect the processed byte[] to be returned.

Of course I've done some investigations and already know that this is not easy to achieve. PitchShifting works with the fast fourier transform and therefore I need the audio data to be represented as another data type than byte[]. Searching the web I found some code snippet that helps to convert the byte[] to double[].
So I think I have my data ready to be processed and here's where my problems start. It's not that I haven't read and tried to understand how the fft works but I am lacking the mathematical basics. I even found some fft example codes (i.e. java port of the ft codes from http://www.dspdimension.com/) but I can't seem to get them running. Maybe this is just not what I need...

Who can help?

Thanks in advance
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!