![]() |
![]() |
![]() |
GPS04 Reference Manual | ![]() |
---|---|---|---|---|
#include <PS04-project-file.h> PS04ProjectFile; PS04ProjectFile* ps04_project_file_new (void); PS04ProjectFile* ps04_project_file_new_with_name (const char *fname); PS04ProjectFile* ps04_project_file_new_with_number (guint number); char* ps04_project_file_format_fname_from_number (guint number); int ps04_project_file_get_project_number (const PS04ProjectFile *self); gboolean ps04_project_file_is_filename_upper_case (const PS04ProjectFile *self); void ps04_project_file_load_header (PS04ProjectFile *self, PS04ProjectHeader *header); gboolean ps04_project_file_looks_like (const char *fname); void ps04_project_file_open (PS04ProjectFile *self, GError **error); gdouble ps04_project_file_read_current_bpm (PS04ProjectFile *self, GError **error); void ps04_project_file_read_mixer (PS04ProjectFile *self, PS04Mixer *mixer, GError **error); void ps04_project_file_read_project_name (PS04ProjectFile *self, GString *str, GError **error);
PS04ProjectFile* ps04_project_file_new (void);
Creates a new, empty project file.
Returns : | a new PS04ProjectFile. |
PS04ProjectFile* ps04_project_file_new_with_name (const char *fname);
Creates a new project file, naming it fname
.
fname : |
The name of the new file. |
Returns : | a new PS04ProjectFile. |
PS04ProjectFile* ps04_project_file_new_with_number (guint number);
number : |
|
Returns : |
char* ps04_project_file_format_fname_from_number (guint number);
number : |
|
Returns : |
int ps04_project_file_get_project_number (const PS04ProjectFile *self);
Gets the project number as displayed on the PS-04. This value is extracted from the file name and does not require that the file be open.
self : |
A PS04ProjectFile. |
Returns : | the project number. |
gboolean ps04_project_file_is_filename_upper_case (const PS04ProjectFile *self);
Checks if the filename is in upper case. This is significant because it means that the other files associated with the project (rhythm and audio files) also are in upper case.
The issue arises because the PS-04 uses a FAT file system on the memory card, ignoring case, and you never know how the OS lets us see the file names. The only assumption is that the case is consistent throughout a project's files, and that upper and lower case isn't mixed within a name.
Note that the directory path preceding the file name may be whatever case it likes.
self : |
A PS04ProjectFile. |
Returns : | TRUE if the filename is in upper case, otherwise FALSE .
|
void ps04_project_file_load_header (PS04ProjectFile *self, PS04ProjectHeader *header);
self : |
|
header : |
gboolean ps04_project_file_looks_like (const char *fname);
Checks if a file name looks like a PS-04 project file.
fname : |
A file name to check. |
Returns : |
void ps04_project_file_open (PS04ProjectFile *self, GError **error);
self : |
|
error : |
gdouble ps04_project_file_read_current_bpm (PS04ProjectFile *self, GError **error);
self : |
|
error : |
|
Returns : |
void ps04_project_file_read_mixer (PS04ProjectFile *self, PS04Mixer *mixer, GError **error);
self : |
|
mixer : |
|
error : |
void ps04_project_file_read_project_name (PS04ProjectFile *self, GString *str, GError **error);
self : |
|
str : |
|
error : |