Maxmod
Loading...
Searching...
No Matches
Functions
Soundbank-related functions.

Functions

mm_sword mmGetModuleIdByName (const char *name)
 Get the ID of the module with the provided name.
 
const char * mmGetModuleNameById (mm_sword id)
 Get the name of the module with the provided ID.
 
mm_sword mmGetSampleIdByName (const char *name)
 Get the ID of the sample with the provided name.
 
const char * mmGetSampleNameById (mm_sword id)
 Get the name of the sample with the provided ID.
 

Detailed Description

Function Documentation

◆ mmGetModuleIdByName()

mm_sword mmGetModuleIdByName ( const char *  name)

Get the ID of the module with the provided name.

The name has to be the name of one of the module files used to create the soundbank.

Note
The soundbank must include a name dictionary for this function to work. Use option -D of mmutil to add a dictionary to the end file.
Warning
This isn't implemented in DS in the ARM7.
Parameters
nameName of the module to search.
Returns
Module ID, or -1 if it isn't found.

◆ mmGetModuleNameById()

const char * mmGetModuleNameById ( mm_sword  id)

Get the name of the module with the provided ID.

The name is one of the module files used to create the soundbank.

Note
The soundbank must include a name dictionary for this function to work. Use option -D of mmutil to add a dictionary to the end file.
Warning
This isn't implemented in DS in the ARM7.
Parameters
idModule ID.
Returns
Module name, or NULL it isn't found or there is no defined name. Don't try to free it with free().

◆ mmGetSampleIdByName()

mm_sword mmGetSampleIdByName ( const char *  name)

Get the ID of the sample with the provided name.

The name can be the name of one of the WAV files used to create the soundbank, or the name of a sample of a module that starts with # (but the # needs to be excluded from the name provided).

Note
The soundbank must include a name dictionary for this function to work. Use option -D of mmutil to add a dictionary to the end file.
Warning
This isn't implemented in DS in the ARM7.
Parameters
nameName of the sample to search.
Returns
Sample ID, or -1 if it isn't found.

◆ mmGetSampleNameById()

const char * mmGetSampleNameById ( mm_sword  id)

Get the name of the sample with the provided ID.

The name can be the name of one of the WAV files used to create the soundbank, or the name of a sample of a module that starts with # (without the #).

The soundbank saves each individual sample of a module as a different sample, but only the ones with a # at the beginning of the name are saved. All other samples are saved without a name.

Note
The soundbank must include a name dictionary for this function to work. Use option -D of mmutil to add a dictionary to the end file.
Warning
This isn't implemented in DS in the ARM7.
Parameters
idSample ID.
Returns
Sample name, or NULL it isn't found or there is no defined name. Don't try to free it with free().