简体   繁体   中英

How to change the audio pich when playing back video?

I'm developing a video player for playing karaoke videos. One useful feature would be to change the key of a song while playing back. So how could I modify the audio stream of a video while playing back in a QT application? There seemed to be hardly any information about this.

Audio signal processing is quite complex and I expect fairly mathematical. The question has previously been asked here on StackOverflow , so if you're going to want to do the actual processing yourself, reading that thread and following the links will be a good place to start.

If you're new to audio signal processing, you may be better searching for a library that does what you want, to include in your project.

There are many ways to achieve a Pitch Shift effect that you are looking for. I know You are working with c++ for your project but i think this tutorial for a Max MSP patch will help you understand some of the basics of one Pitch Shift algorithm. I don't know how familiar you are with digital audio theory but a few things you will need to look into are FFT , and Generating sine waves in code. I personally still do not have a mathematical grasp on FFT works but if you know what it does it can help you understand how to deconsruct audio signals.

Good Luck, Happy Coding

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM