libmsx
C library for MSX
|
Sound data structure for SNDDRV. More...
Data Structures | |
struct | snd_Instrument |
Instrument (timbre) table. More... | |
struct | snd_p_table |
Pitch bend table. More... | |
struct | snd_SoundAssets |
Container of list of musics, instruments, arpeggio tables, and period tables. More... | |
struct | snd_Music |
Container of a music data. More... | |
struct | snd_Track |
A fragment of single channel music score. More... | |
struct | snd_SpeedTrack |
A special track to control speed of tracks. More... | |
struct | snd_EventTrack |
A special track to control event trigger of tracks. More... | |
struct | snd_Pattern |
A track pattern, that corresponds to a sub-score of a music. More... | |
struct | snd_Pattern.specialChannels |
struct | snd_Pattern.channels |
Macros | |
#define | vec(T) |
Define a type generic vector (as named struct). | |
#define | vec_fields(T) |
Define fields (member variables) of a type generic vector. | |
Typedefs | |
typedef struct snd_Instrument | snd_Instrument |
Instrument (timbre) table. | |
typedef struct snd_p_table | snd_PitchBend |
Type alias for arpeggio/pitch-bend table. | |
typedef struct snd_p_table | snd_PeriodBend |
Type alias for wave-length/period modification table. | |
typedef struct snd_SoundAssets | snd_SoundAssets |
Container of musics, instruments, pitch-bend tables, and period-bend tables. | |
typedef struct snd_Music | snd_Music |
Container of a music data. | |
typedef struct snd_Track | snd_Track |
A fragment of single channel music score. | |
typedef struct snd_SpeedTrack | snd_SpeedTrack |
A special track to control speed of tracks. | |
typedef struct snd_EventTrack | snd_EventTrack |
A special track to control event trigger of tracks. | |
typedef struct snd_Pattern | snd_Pattern |
A track pattern, that corresponds to a sub-score of a music. | |
Sound data structure for SNDDRV.
struct snd_Instrument |
Instrument (timbre) table.
An instrument table defines a time series data of an instrument's sound.
An instrument table contains 3 part of data streams:
ad_part
: Attack to Decay phase.NoteOn
message.s_part
: Sustain phase. (optional)ad_part
and loopbacks until on NoteOff
message.r_part
: Release phase. (optional)NoteOff
message. Definition at line 64 of file snd_i_table.h.
struct snd_p_table |
Pitch bend table.
A pitch bend table defines a time series data of a pitch envelope such as pitch slide (pitch bend), vibrato, arpeggio.
An pitch bend table contains 3 part of data streams:
ad_part
: Attack to Decay phase.NoteOn
message.s_part
: Sustain phase. (optional)ad_part
and loopbacks until on NoteOff
message.r_part
: Release phase. (optional)NoteOff
message. Definition at line 56 of file snd_p_table.h.
struct snd_SoundAssets |
Container of list of musics, instruments, arpeggio tables, and period tables.
A snd_SoundAssets
object contains:
Definition at line 117 of file snd_sound.h.
Data Fields | ||
---|---|---|
struct vec_snd_PitchBend | pitchBendTables | |
struct vec_snd_PeriodBend | periodBendTables | |
struct vec_snd_Instrument | instruments | |
struct vec_snd_Music | musics |
struct snd_Music |
Container of a music data.
A snd_Music
object represents one music.
A snd_Music
object contains:
Ex. Defining a music my_music
as of snd_Music type.
Definition at line 161 of file snd_sound.h.
Data Fields | ||
---|---|---|
const uint8_t | format_version |
Version number of this data format to be used for future compatibility.
|
const uint8_t | replayRate | Default player frequency that author expecting, in [Hz]. |
struct vec_snd_SpeedTrack | speedTracks | |
struct vec_snd_EventTrack | eventTracks | |
struct vec_snd_Track | tracks | |
struct vec_snd_Pattern | patterns | |
const uint8_t | initialSpeed | default wait count per line [tick]. |
const uint8_t | isLoop |
true if loopback to the loopToIndex at the end of music. |
const uint8_t | loopToIndex | pattern index of the beggining of loop. |
struct snd_Pattern |
A track pattern, that corresponds to a sub-score of a music.
A snd_Pattern
defines which track is played on which channel.
A vector / series of snd_Pattern
s corresponds to a full-score of a music.
Definition at line 217 of file snd_sound.h.
Data Fields | ||
---|---|---|
uint8_t | height | Number of effective lines of track(s). |
struct snd_Pattern.specialChannels | specialChannels | |
struct snd_Pattern.channels | channels[3] |
struct snd_Pattern.specialChannels |
Definition at line 219 of file snd_sound.h.
Data Fields | ||
---|---|---|
uint8_t | speedTrack | Index to the speed track. |
uint8_t | eventTrack | Index to the event track. |
struct snd_Pattern.channels |
Definition at line 223 of file snd_sound.h.
Data Fields | ||
---|---|---|
uint8_t | track | Index to the track. |
int16_t | detune | Pitch shift [1/256 semi-note]. |
#define vec | ( | T | ) |
Define a type generic vector (as named struct).
T | typename |
snd_sound.h
. Definition at line 89 of file snd_sound.h.
#define vec_fields | ( | T | ) |
Define fields (member variables) of a type generic vector.
T | typename |
snd_sound.h
. Definition at line 102 of file snd_sound.h.
typedef struct snd_Instrument snd_Instrument |
Instrument (timbre) table.
An instrument table defines a time series data of an instrument's sound.
An instrument table contains 3 part of data streams:
ad_part
: Attack to Decay phase.NoteOn
message.s_part
: Sustain phase. (optional)ad_part
and loopbacks until on NoteOff
message.r_part
: Release phase. (optional)NoteOff
message. Definition at line 46 of file snd_i_table.h.
typedef struct snd_p_table snd_PitchBend |
Type alias for arpeggio/pitch-bend table.
Definition at line 33 of file snd_p_table.h.
typedef struct snd_p_table snd_PeriodBend |
Type alias for wave-length/period modification table.
Definition at line 37 of file snd_p_table.h.
typedef struct snd_SoundAssets snd_SoundAssets |
Container of musics, instruments, pitch-bend tables, and period-bend tables.
A snd_SoundAssets
object contains:
Definition at line 43 of file snd_sound.h.
Container of a music data.
A snd_Music
object represents one music.
A snd_Music
object contains:
Definition at line 55 of file snd_sound.h.
A fragment of single channel music score.
Definition at line 60 of file snd_sound.h.
typedef struct snd_SpeedTrack snd_SpeedTrack |
A special track to control speed of tracks.
Definition at line 65 of file snd_sound.h.
typedef struct snd_EventTrack snd_EventTrack |
A special track to control event trigger of tracks.
Definition at line 71 of file snd_sound.h.
typedef struct snd_Pattern snd_Pattern |
A track pattern, that corresponds to a sub-score of a music.
A snd_Pattern
defines which track is played on which channel.
A vector / series of snd_Pattern
s corresponds to a full-score of a music.
Definition at line 79 of file snd_sound.h.