Panda3D 1.3.0 can now make use of FMOD-EX's Audio Effects.
Currently the effects available are...
Panda3D ID |
Effect |
DSPChorus |
Chorus |
DSPCompressor |
Compression |
DSPDistortion |
Distortion |
DSPEcho |
Echo [Delay] |
DSPFlange |
Flange |
DSPHighpass |
Highpass Filter |
DSPItecho |
Echo [For Mod/Tracker Files] |
DSPItlowpass |
Lowpass Filter [For Mod/Tracker Files] |
DSPLowpass |
Lowpass Filter |
DSPNormalize |
Noramlize |
DSPParameq |
Parametric EQ |
DSPPitchshift |
Pitchshifter |
DSPReverb |
Reverb |
To use an effect do the following.
First create and effect object [we will create an echo for example].
echo = base.sfxManagerList[0].createDsp(base.sfxManagerList[0].DSPEcho)
| </td>
The effects are constants in the sound manager classes which is why you need to specify "base.sfxManagerList[n].<effect>".
Where N is the respective audio manager [0 for Sound, 1 for Music] and
<effect> is the respective effect as listed in the table above.
Once you have your DSP object you can attach it to a sound.
mySound.addDsp(echo)
| </td>
and you are ready to go.
Some Useful DSP commands.
At the interactive prompt to get the parameters of a DSP type...
dspEffect.listParameterInfo()
| </td>
This will list all the DSP parameters and their possible values you can edit.
You edit parameters in your code with the following.
dspEffect.setParameter("nameOfParameter", value)
| </td>
The name of Parameter must be in Quotes.
You can retrieve the current parameter with...
dspEffect.getParameter("nameOfParameter")
| </td>
You can turn a paramter on or off with...
dspEffect.setBypass(n)
| </td>
Where n is a BOOL
You can reset an effect completely to its default values with...
And if you need to detach an effect from a sound use...
mySound.removeDsp(effect)
| </td>
You can also attach an effect to all the sounds under a Audio Manager with the following...
base.sfxManagerList[n].addDsp(effect)
| </td>
NOTE!!! An effect attached to a Manager will affect ALL THE SOUNDS under that manager.
Otherwise the same commands for DSP apply.
|