Maxmod
|
Functions | |
mm_bool | mmActive (void) |
Used to determine if a module is playing. | |
mm_word | mmGetPosition (void) |
Get current pattern order being played. | |
mm_word | mmGetPositionRow (void) |
Get current row being played. | |
mm_word | mmGetPositionTick (void) |
Get current number of elapsed ticks in the row being played. | |
void | mmPause (void) |
Pauses playback of the active module. | |
void | mmPlayModule (uintptr_t address, mm_word mode, mm_word layer) |
Play individual MAS file from RAM. | |
static void | mmPosition (mm_word position) |
Set playback position. | |
void | mmResume (void) |
Resume module playback. | |
void | mmSetModulePitch (mm_word pitch) |
Set pitch of playback. | |
void | mmSetModuleTempo (mm_word tempo) |
Set tempo of playback. | |
void | mmSetModuleVolume (mm_word volume) |
Use this function to change the master volume scale for module playback. | |
static void | mmSetPosition (mm_word position) |
Set the current sequence [aka order-list] position for the active module. | |
void | mmSetPositionEx (mm_word position, mm_word row) |
Set the current playback position. | |
void | mmStart (mm_word module_ID, mm_pmode mode) |
Begins playback of a module. | |
void | mmStop (void) |
Stops playback of the active module. | |
mm_bool mmActive | ( | void | ) |
Used to determine if a module is playing.
mm_word mmGetPosition | ( | void | ) |
Get current pattern order being played.
mm_word mmGetPositionRow | ( | void | ) |
Get current row being played.
mm_word mmGetPositionTick | ( | void | ) |
Get current number of elapsed ticks in the row being played.
void mmPause | ( | void | ) |
Pauses playback of the active module.
Resume with mmResume().
DS Note: The DS hardware channels do not allow actual pausing. To implement pausing, Maxmod sets the channel frequencies to the minimal value (256Hz). This may cause some problems with certain samples (such as drum-loops) drifting out of sync with the song temporarily. This is not an issue with the interpolated audio mode since the channels are fed by software.
Play individual MAS file from RAM.
A soundbank is a MSL file that contains one or more MAS files. Each MAS file can contain a sample or a module. This function allows you to play samples or modules without the need for a soundbank.
Normally, Maxmod plays MAS files from the sound bank provided to mmInit(). This function lets you play MAS files outside of that soundbank.
address | Address of the MAS file, skipping the first few bytes of the prefix. Add sizeof(mm_mas_prefix) to the pointer to your MAS file. |
mode | Playback mode: MM_PLAY_ONCE or MM_PLAY_LOOP. |
layer | MM_MAIN (main module layer) or MM_JINGLE (sub/jingle layer). |
|
inlinestatic |
Set playback position.
position | New position in module sequence. |
void mmResume | ( | void | ) |
Resume module playback.
Pause with mmPause().
void mmSetModulePitch | ( | mm_word | pitch | ) |
Set pitch of playback.
pitch | Range = 0x200 -> 0x800 = 0.5 -> 2.0 |
void mmSetModuleTempo | ( | mm_word | tempo | ) |
Set tempo of playback.
tempo | Fixed point (Q10) value representing tempo. Range = 0x200 -> 0x800 = 0.5 -> 2.0 |
void mmSetModuleVolume | ( | mm_word | volume | ) |
Use this function to change the master volume scale for module playback.
volume | New volume level. Ranges from 0 (silent) to 1024 (normal). |
|
inlinestatic |
Set the current sequence [aka order-list] position for the active module.
position | New position in module sequence. |
Set the current playback position.
It sets the sequence [aka order-list] position for the active module and the row inside the pattern.
position | New position in module sequence. |
row | New row in the destination pattern |
Begins playback of a module.
For DS, the module must be loaded into memory first (mmLoad).
module_ID | Index of module to be played. Values are defined in the soundbank header output. (prefixed with "MOD_") |
mode | Mode of playback. Can be MM_PLAY_LOOP (play and loop until stopped manually) or MM_PLAY_ONCE (play until end). |
void mmStop | ( | void | ) |
Stops playback of the active module.
Start again (from the beginning) with mmStart().
Any channels used by the active module will be freed.