Effect, also known as reverb, is the sound effect applied at the end of the audio process. The 6 following effect settings are preset:
|
In the MUS library, Big Room is set as the initial value, but the programmer is free to change the type of effect using MusSetFxType.
Set the library effect type
Function name: | MusSetFxType | |
Syntax: | s32 MusSetFxType(s32 fxtype) | |
Arguments: | fxtype | Effect type AL_FX_NONE AL_FX_SMALLROOM AL_FX_BIGROOM AL_FX_CHORUS AL_FX_FLANGE AL_FX_ECHO |
Return value: | 0 | Failure |
Non-zero | Success |
If the Return value is 0, please wait for a retrace message and call the function again.
The programmer can not only change effect types, but also embed them into songs using the tools. Using MusSetSongFxChange, the programmer can enable and disable the effect settings embedded in a song. When disabled, the effect becomes the type it was the last time MusSetFxType was called (if never called, then the effect becomes Big Room).
Set the library's change song effect flag
Function name: | MusSetSongFxChange | |
Syntax: | s32 MusSetSongFxChange(musBool onoff) | |
Arguments: | onoff | Flag MUSBOOL_ON Enable MUSBOOL_OFF Disable |
Return value: | 0 | Failure |
Non-zero | Success |
If the Return value is 0, please wait for a retrace message and call the function again.
The extent to which the effect is applied is called the wet/dry value (reverb level). This value is set in both songs and sound effects, and the programmer can change it using a sound handle.
A wet/dry value of 0 is completely dry (the effect is not applied), while a value of 0x80 is completely wet (the effect is applied).
Set the reverb value using a sound handle
Function name: | MusHandleSetReverb | |
Syntax: | s32 MusHandleSetReverb(musHandle handle, s32 reverb) | |
Arguments: | handle | Sound handle |
reverb | wet/dry base value (0 to 0x7f) | |
Return value: | The number of channels that have been changed |
By changing the wet/dry base value (minimum value) with this function, you can "raise the bar" so to speak for all levels of reverb. For example, when the base value is set to 0x40, a wet/dry value of 0 becomes 0x40 and a value of 0x40 becomes 0x80. In order to give the programmer complete control, it is best to set original data to 0.
(*)The changes made with this function will take effect from the next sound that is generated.