| GPS04 Reference Manual | ||||
|---|---|---|---|---|
#include <PS04-rhythm-song-event.h>
PS04RhythmSongEvent;
enum PS04RhythmSongEventType;
PS04RhythmSongEvent* ps04_rhythm_song_event_new
(guint tick_offset,
PS04RhythmSongEventType type,
guint value);
PS04RhythmSongEventType ps04_rhythm_song_event_get_event_type
(const PS04RhythmSongEvent *self);
const char* ps04_rhythm_song_event_get_event_type_string
(const PS04RhythmSongEvent *self);
guint ps04_rhythm_song_event_get_value
(const PS04RhythmSongEvent *self);
void ps04_rhythm_song_event_set_tick_offset
(PS04RhythmSongEvent *self,
guint tick_offset);
typedef enum
{
RHYTHM_SONG_EVENT_END = 0,
RHYTHM_SONG_EVENT_PATTERN = 1,
RHYTHM_SONG_EVENT_ROOT = 2,
RHYTHM_SONG_EVENT_TIMESIG = 4,
RHYTHM_SONG_EVENT_DRUMVOL = 5,
RHYTHM_SONG_EVENT_BASSVOL = 6,
RHYTHM_SONG_EVENT_DRUMKIT = 7,
RHYTHM_SONG_EVENT_BASSPRG = 8
} PS04RhythmSongEventType;
PS04RhythmSongEvent* ps04_rhythm_song_event_new (guint tick_offset, PS04RhythmSongEventType type, guint value);
Creates a new rhythm song event.
tick_offset : |
The time delta (in ticks) from the previous event. |
type : |
The type of event. |
value : |
The event value, whose meaning depends on the type (see
ps04_rhythm_song_event_get_value()).
|
| Returns : | a new PS04RhythmSongEvent. |
PS04RhythmSongEventType ps04_rhythm_song_event_get_event_type (const PS04RhythmSongEvent *self);
Gets the type of the event.
self : |
A PS04RhythmSongEvent. |
| Returns : | the PS04RhythmSongEventType. |
const char* ps04_rhythm_song_event_get_event_type_string
(const PS04RhythmSongEvent *self);
Gets the event type as a displayable string.
self : |
A PS04RhythmSongEvent. |
| Returns : | a const string. |
guint ps04_rhythm_song_event_get_value
(const PS04RhythmSongEvent *self);
Gets the event value, whose meaning depends on the type.
| Type | Value |
|---|---|
RHYTHM_SONG_EVENT_END
|
(not used) |
RHYTHM_SONG_EVENT_PATTERN
|
The new pattern index (0–511) |
RHYTHM_SONG_EVENT_ROOT
|
The PS04RelativeBassPitch of the new chord root. |
RHYTHM_SONG_EVENT_TIMESIG
|
The new number of beats (1/4 notes) per bar. |
RHYTHM_SONG_EVENT_DRUMVOL
|
The new drum volume (0–15). |
RHYTHM_SONG_EVENT_BASSVOL
|
The new bass volume (0–15). |
RHYTHM_SONG_EVENT_DRUMKIT
|
The new PS04DrumKit. |
RHYTHM_SONG_EVENT_BASSPRG
|
The new PS04BassProgram. |
self : |
A PS04RhythmSongEvent. |
| Returns : | an unsigned integer value. |
void ps04_rhythm_song_event_set_tick_offset
(PS04RhythmSongEvent *self,
guint tick_offset);
Sets the time delta from the previous event.
self : |
A PS04RhythmSongEvent. |
tick_offset : |
The time delta (in ticks). |