|
libmsx
C library for MSX
|
Software envelope generator interface More...
Collaboration diagram for Software envelope generator APIs:Data Structures | |
| struct | sound_eg_AHDSR |
| Parameters for AHDSR envelope generator. More... | |
| struct | sound_eg_LPCM |
| Parameters for linear PCM (8-bit, 60Hz) envelope generator. More... | |
| struct | sound_eg_attribute |
| Attributes of a software envelope generator object. More... | |
| union | sound_eg_attribute.__unnamed7__ |
Macros | |
| #define | SOUND_EG_TABLE_MAX (16) |
| The maximum number of elements for the envelope generator attribute table. | |
| #define | SOUND_EG_AHDSR (0) |
| The class identifier for AHDSR envelope generator. | |
| #define | SOUND_EG_LPCM (1) |
| The class identifier for LPCM envelope generator. | |
Functions | |
| void | sound_set_eg_table (const struct sound_eg_attribute *table) |
MSX (Re)set the software envelope generator attribute table. | |
Software envelope generator interface
| struct sound_eg_AHDSR |
Parameters for AHDSR envelope generator.
Definition at line 42 of file sound_eg.h.
| struct sound_eg_LPCM |
Parameters for linear PCM (8-bit, 60Hz) envelope generator.
Definition at line 56 of file sound_eg.h.
| Data Fields | ||
|---|---|---|
| uint8_t | len | number of sampled signal levels |
| uint8_t * | data |
time series of the sampled signal levels (i.e. wave form) |
| struct sound_eg_attribute |
Attributes of a software envelope generator object.
The attribute consists of the following two parts:
clzparamThe clz shall be one of the two classes:
SOUND_EG_AHDSR for AHDSR type envelope generator, orSOUND_EG_LPCM for 8-bit 60Hz Linear PCM type envelope generator.The param shall be a pointer to parameter constants, and it has the following two strictly typed sinonym:
ahdsr of const struct sound_eg_AHDSR * type for AHDSR type envelope generator.lpcm of const struct sound_eg_LPCM * type for 8-bit 60Hz Linear PCM type envelope generator. Definition at line 81 of file sound_eg.h.
| Data Fields | ||
|---|---|---|
| uint8_t | clz | The class identifier of this envelope generator. |
| union sound_eg_attribute.__unnamed7__ | __unnamed__ | |
| union sound_eg_attribute.__unnamed7__ |
Definition at line 86 of file sound_eg.h.
| Data Fields | ||
|---|---|---|
| void * | param | Pointer to parameter constants for this instance. |
| const struct sound_eg_AHDSR * | ahdsr |
Pointer to parameter constants for this instance of the SOUND_EG_AHDSR class. This is a strictly typed sinonym for |
| const struct sound_eg_LPCM * | lpcm |
Pointer to parameter constants for this instance of the SOUND_EG_LPCM class. This is a strictly typed sinonym for |
| #define SOUND_EG_TABLE_MAX (16) |
The maximum number of elements for the envelope generator attribute table.
Definition at line 34 of file sound_eg.h.
| #define SOUND_EG_AHDSR (0) |
The class identifier for AHDSR envelope generator.
Definition at line 37 of file sound_eg.h.
| #define SOUND_EG_LPCM (1) |
The class identifier for LPCM envelope generator.
Definition at line 39 of file sound_eg.h.
| void sound_set_eg_table | ( | const struct sound_eg_attribute * | table | ) |
MSX (Re)set the software envelope generator attribute table.
This function sets the base address of the software envelope generator table to the given address table, or reset to the default if table was NULL.
The table should be an array of struct sound_eg_attribute with a maximum of 16 elements. Each element can contain the individual parameter settings of an envelope generator of type AHDSR or LPCM.
| table | base address of the attribute table. |