![]() |
![]() |
![]() |
GPS04 Reference Manual | ![]() |
---|---|---|---|---|
#include <PS04-project.h> PS04Project; #define PS04_BPM_MAX #define PS04_BPM_MIN PS04Project* ps04_project_new (void); PS04Project* ps04_project_new_from_files (PS04ProjectFile *project_file, PS04RhythmFile *rhythm_file, GError **error); PS04Project* ps04_project_new_from_folder_item (PS04ProjectFolderItem *folder_item, GError **error); PS04AudioTrackMatrix* ps04_project_get_audio_tracks (PS04Project *self); double ps04_project_get_current_bpm (const PS04Project *self); const PS04Mixer* ps04_project_get_mixer (const PS04Project *self); guint ps04_project_get_n_patterns (const PS04Project *self); const char* ps04_project_get_name (const PS04Project *self); const PS04RhythmPattern* ps04_project_get_nth_pattern (const PS04Project *self, guint index); PS04RhythmSong* ps04_project_get_rhythm_song (PS04Project *self); const PS04RhythmSong* ps04_project_get_const_rhythm_song (const PS04Project *self); gboolean ps04_project_has_audio_track (const PS04Project *self, guint track, guint vtake); void ps04_project_set_nth_pattern (PS04Project *self, guint index, PS04RhythmPattern *pattern);
The PS04Project struct represents a project in the PS-04. Normally
you create it with ps04_project_new_from_files()
, supplying an existing
PS04ProjectFile and PS04RhythmFile, corresponding to the files on the
PS-04 memory card.
PS04Project* ps04_project_new (void);
Creates a new, empty PS04Project.
Returns : | a new PS04Project. |
PS04Project* ps04_project_new_from_files (PS04ProjectFile *project_file, PS04RhythmFile *rhythm_file, GError **error);
Creates a new PS04Project and loads its data from project_file
and rhythm_file
. If the loading fails, error
is set and the function
returns NULL
.
project_file : |
A PS04ProjectFile. |
rhythm_file : |
A PS04RhythmFile. |
error : |
A placeholder for a GError, or NULL .
|
Returns : | a new PS04Project, or NULL if the function failed.
|
PS04Project* ps04_project_new_from_folder_item (PS04ProjectFolderItem *folder_item, GError **error);
folder_item : |
|
error : |
|
Returns : |
PS04AudioTrackMatrix* ps04_project_get_audio_tracks (PS04Project *self);
self : |
|
Returns : |
double ps04_project_get_current_bpm (const PS04Project *self);
self : |
|
Returns : |
const PS04Mixer* ps04_project_get_mixer (const PS04Project *self);
self : |
|
Returns : |
guint ps04_project_get_n_patterns (const PS04Project *self);
Gets the number of rhythm patterns in the project.
self : |
A PS04Project. |
Returns : | the number of rhythm patterns. |
const char* ps04_project_get_name (const PS04Project *self);
Gets the user-defined name of the project.
self : |
A PS04Project. |
Returns : | a const string. |
const PS04RhythmPattern* ps04_project_get_nth_pattern (const PS04Project *self, guint index);
Gets the nth rhythm pattern of the project.
self : |
A PS04Project. |
index : |
The index of the pattern wanted. |
Returns : | A PS04RhythmPattern. |
PS04RhythmSong* ps04_project_get_rhythm_song (PS04Project *self);
self : |
|
Returns : |
const PS04RhythmSong* ps04_project_get_const_rhythm_song (const PS04Project *self);
self : |
|
Returns : |
gboolean ps04_project_has_audio_track (const PS04Project *self, guint track, guint vtake);
self : |
|
track : |
|
vtake : |
|
Returns : |
void ps04_project_set_nth_pattern (PS04Project *self, guint index, PS04RhythmPattern *pattern);
Sets the nth rhythm pattern of the project. The pattern is now owned by the project and should not be freed.
self : |
A PS04Project. |
index : |
The index of the pattern to set. |
pattern : |
A PS04RhythmPattern to be assigned. |