Firelight Technologies FMOD Studio API
FMOD_DSP_PITCHSHIFT
Parameter types for the FMOD_DSP_TYPE_PITCHSHIFT filter.
C/C++ Syntax
typedef enum {
FMOD_DSP_PITCHSHIFT_PITCH,
FMOD_DSP_PITCHSHIFT_FFTSIZE,
FMOD_DSP_PITCHSHIFT_OVERLAP,
FMOD_DSP_PITCHSHIFT_MAXCHANNELS
} FMOD_DSP_PITCHSHIFT;
JavaScript Syntax
FMOD.DSP_PITCHSHIFT_PITCH
FMOD.DSP_PITCHSHIFT_FFTSIZE
FMOD.DSP_PITCHSHIFT_OVERLAP
FMOD.DSP_PITCHSHIFT_MAXCHANNELS
Values
FMOD_DSP_PITCHSHIFT_PITCH
(Type:float) - Pitch value. 0.5 to 2.0. Default = 1.0. 0.5 = one octave down, 2.0 = one octave up. 1.0 does not change the pitch.
FMOD_DSP_PITCHSHIFT_FFTSIZE
(Type:float) - FFT window size. 256, 512, 1024, 2048, 4096. Default = 1024. Increase this to reduce 'smearing'. This effect is a warbling sound similar to when an mp3 is encoded at very low bitrates.
FMOD_DSP_PITCHSHIFT_OVERLAP
(Type:float) - Removed. Do not use. FMOD now uses 4 overlaps and cannot be changed.
FMOD_DSP_PITCHSHIFT_MAXCHANNELS
(Type:float) - Maximum channels supported. 0 to 16. 0 = same as fmod's default output polyphony, 1 = mono, 2 = stereo etc. See remarks for more. Default = 0. It is suggested to leave at 0!
Remarks
This pitch shifting unit can be used to change the pitch of a sound without speeding it up or slowing it down.
It can also be used for time stretching or scaling, for example if the pitch was doubled, and the frequency of the sound was halved, the pitch of the sound would sound correct but it would be twice as slow.
Warning! This filter is very computationally expensive! Similar to a vocoder, it requires several overlapping FFT and IFFT's to produce smooth output, and can require around 440mhz for 1 stereo 48khz signal using the default settings.
Reducing the signal to mono will half the cpu usage.
Reducing this will lower audio quality, but what settings to use are largely dependant on the sound being played. A noisy polyphonic signal will need higher fft size compared to a speaking voice for example.
This pitch shifter is based on the pitch shifter code at http://www.dspdimension.com, written by Stephan M. Bernsee.
The original code is COPYRIGHT 1999-2003 Stephan M. Bernsee [email protected].
'maxchannels' dictates the amount of memory allocated. By default, the maxchannels value is 0. If FMOD is set to stereo, the pitch shift unit will allocate enough memory for 2 channels. If it is 5.1, it will allocate enough memory for a 6 channel pitch shift, etc.
If the pitch shift effect is only ever applied to the global mix (ie it was added with ChannelGroup::addDSP), then 0 is the value to set as it will be enough to handle all speaker modes.
When the pitch shift is added to a channel (ie Channel::addDSP) then the channel count that comes in could be anything from 1 to 8 possibly. It is only in this case where you might want to increase the channel count above the output's channel count.
If a channel pitch shift is set to a lower number than the sound's channel count that is coming in, it will not pitch shift the sound.
NOTE! Not supported on PlayStation 3.
See Also
Version 1.10.03 Built on Feb 1, 2018