Hi! I’m working on a toy for my daughter… it’s a “carousel” that she can spin manually.
I’d like to add a common carousel music but changing its speed in function of rotating speed.
No problem at all to have this information, indeed I already have.
But I have difficulties to find a player (or a library) that allows to change the speed fo a wave file in real-time flawlessly (i.e. without gaps or stuttering). The whole things is Raspberry Pi powered, hence I think there are no problems to run FMOD.
Reading through the documentation I found this function:
It’s only for those formats because they are note based, not sample based, changing the speed of sample based audio is very different.
But you can do it, using Channel::setPitch. That will increase the speed but also make it high pitched as a result. If that it undesirable, you can in addition add the DSP type FMOD_DSP_TYPE_PITCHSHIFT and make it shift the tone back down so it sounds normal but still fast.
I don’t think there is a big difference. Changing the pitch is practically the same as changing the frequency, it’s just a different way of looking at it.