简体   繁体   English

在FMOD中更改MIDI或WAV / MP3文件的速度

[英]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? 是否可以使用FMOD更改MIDI或WAV / MP3文件的速度? 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. 我在FMOD旁边使用C ++,似乎无法找到一个函数,它可以让我从应用程序的C部分收到的变量控制音频文件的速度。 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. 我使用的是自己编写的音频,因此我将使所有音轨的速度保持一致,因此我不必担心使用/编写函数来计算任何东西的bpm。

To change playback speed you can use Channel::setFrequency, however this will affect the pitch also. 要更改播放速度,可以使用Channel :: setFrequency,但这也会影响音高。 You can then use an FMOD Pitch Shifter DSP to correct the pitch difference. 然后,您可以使用FMOD Pitch Shifter DSP来校正音高差异。 This will work for any sound type in FMOD. 这将适用于FMOD中的任何声音类型。

For MIDI you could try Sound::setMusicSpeed, this will control the MIDI speed directly without needing to use the DSP. 对于MIDI,您可以尝试Sound :: setMusicSpeed,这将直接控制MIDI速度而无需使用DSP。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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