PS04Project

PS04Project — PS-04 Project

Synopsis


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


Object Hierarchy


  GObject
   +----PS04Project

Description

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.

Details

PS04Project

typedef struct _PS04Project PS04Project;


PS04_BPM_MAX

#define PS04_BPM_MAX 250


PS04_BPM_MIN

#define PS04_BPM_MIN  40


ps04_project_new ()

PS04Project* ps04_project_new               (void);

Creates a new, empty PS04Project.

Returns : a new PS04Project.

ps04_project_new_from_files ()

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.

ps04_project_new_from_folder_item ()

PS04Project* ps04_project_new_from_folder_item
                                            (PS04ProjectFolderItem *folder_item,
                                             GError **error);

folder_item :
error :
Returns :

ps04_project_get_audio_tracks ()

PS04AudioTrackMatrix* ps04_project_get_audio_tracks
                                            (PS04Project *self);

self :
Returns :

ps04_project_get_current_bpm ()

double      ps04_project_get_current_bpm    (const PS04Project *self);

self :
Returns :

ps04_project_get_mixer ()

const PS04Mixer* ps04_project_get_mixer     (const PS04Project *self);

self :
Returns :

ps04_project_get_n_patterns ()

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.

ps04_project_get_name ()

const char* ps04_project_get_name           (const PS04Project *self);

Gets the user-defined name of the project.

self : A PS04Project.
Returns : a const string.

ps04_project_get_nth_pattern ()

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.

ps04_project_get_rhythm_song ()

PS04RhythmSong* ps04_project_get_rhythm_song
                                            (PS04Project *self);

self :
Returns :

ps04_project_get_const_rhythm_song ()

const PS04RhythmSong* ps04_project_get_const_rhythm_song
                                            (const PS04Project *self);

self :
Returns :

ps04_project_has_audio_track ()

gboolean    ps04_project_has_audio_track    (const PS04Project *self,
                                             guint track,
                                             guint vtake);

self :
track :
vtake :
Returns :

ps04_project_set_nth_pattern ()

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.