PS04RhythmSongEvent

PS04RhythmSongEvent — An event in a rhythm song

Synopsis


#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);

Object Hierarchy


  GObject
   +----PS04RhythmEvent
         +----PS04RhythmSongEvent

Implemented Interfaces

PS04RhythmSongEvent implements PS04Streamable.

Description

The PS04RhythmSongEvent represents an event in a PS04RhythmSong.

Details

PS04RhythmSongEvent

typedef struct _PS04RhythmSongEvent PS04RhythmSongEvent;


enum PS04RhythmSongEventType

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;


ps04_rhythm_song_event_new ()

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.

ps04_rhythm_song_event_get_event_type ()

PS04RhythmSongEventType ps04_rhythm_song_event_get_event_type
                                            (const PS04RhythmSongEvent *self);

Gets the type of the event.

self : A PS04RhythmSongEvent.
Returns : the PS04RhythmSongEventType.

ps04_rhythm_song_event_get_event_type_string ()

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.

ps04_rhythm_song_event_get_value ()

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.

ps04_rhythm_song_event_set_tick_offset ()

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).

See Also

PS04RhythmSong