简体   繁体   中英

Changing the tempo of a MIDI or WAV/MP3 file in FMOD

Is it possible to change the tempo of a MIDI or WAV/MP3 file using FMOD? I am using C++ alongside FMOD and cannot seem to find a function which will let me control the tempo of an audio file from variables received in the C part of the application. I am using audio that I have written myself, so I'm going to make the tempo of all tracks the same so I don't need to worry about using/writing a function to calculate the bpm of anything.

To change playback speed you can use Channel::setFrequency, however this will affect the pitch also. You can then use an FMOD Pitch Shifter DSP to correct the pitch difference. This will work for any sound type in FMOD.

For MIDI you could try Sound::setMusicSpeed, this will control the MIDI speed directly without needing to use the DSP.

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