PDA

View Full Version : Playing audio file at different pitches. Phonon? Qt Multimedia?



jvalverde
9th June 2011, 18:11
Hi

I'm working on an app that play sounds (from audio files, let's say wav) at different pitches than the original pitch of the audio file. I did my test app on Mathematica and now that the concept is alright I want to make a stand alone app with Qt.
For the GUIO etc Qt covers everything I need but I have been seeking for a good solution to play files at different pitches and I don't seem to find it. Phonon seems a good and easy solution but I would have to find an effect for pitch shifting, which doesn't seem to be easy. I checked my windows 7 laptop with the phonon capabilities app and no pitch shifting effect appears. Besides, I need this app to be portable so I'm not sure if I depend on the backend of the computer where I install my software. If no pitch shifting effect, no app working fine.
On the other hand Qt offers QT Multimedia with QSound etc. I haven't found a way of changing the pitch of the audio file neither. Any advice on Phonon vs QTMultimedia as well as on where to find pitch shifting effect for windows would be much appreciated.
Thank you very much in advance.
Best reagds
Juan

jvalverde
13th June 2011, 12:44
No replies? Is that weird my question? Or doesn't it have any interest?
Juan

SixDegrees
13th June 2011, 16:02
Your question isn't clear. If you want to raise or lower pitch and are content to let the playback time drift, simply change the sampling rate. If you want to keep the playback time constant while changing pitch, that's a much harder trick to pull off and requires Fourier transforms or similar techniques.

Since you seem to have encountered this elsewhere, use that library. Qt is just C++, and can link with and use any existing C/C++ software toolkits.

jvalverde
16th June 2011, 13:04
Hi
Thank yo so much for your reply.
I would say that if I'm looking for an specific effect on Phonon or a way to change pitch in Qt Multimadia, it is clear that the old trick of changing the sample rate is not valid for me in this particular project, althought I could have said so in my first post specifically, so the question is more clear. So yes, maybe the question is not totally clear.
I didn't say that I have found any library or whatever elsewhere (quote: "Since you seem to have encountered this elsewhere, use that library"), I don't know where you find that info. In any case, I thank you again ofr your reply, and now it seems clera to me that there's no direct way to do what I need with either Phonon or Qt Multimedia. I'll have to look for this somewhere else.

Juan

Tirkedi
22nd June 2011, 22:12
In gstreamer-backend on linux you got the speed effect "pitch" ;-)