PS04AudioTrackMatrix

PS04AudioTrackMatrix — the collection of all audio tracks of a project

Synopsis


#include <PS04-audio-track-matrix.h>


            PS04AudioTrackMatrix;
#define     PS04_N_AUDIO_CHANNELS
#define     PS04_N_AUDIO_VTAKES
PS04AudioTrackMatrix* ps04_audio_track_matrix_new
                                            (void);
void        ps04_audio_track_matrix_copy_from
                                            (PS04AudioTrackMatrix *self,
                                             const PS04AudioTrackMatrix *other);
const char* ps04_audio_track_matrix_format_track_name
                                            (guint track,
                                             guint vtake);
gulong      ps04_audio_track_matrix_get_total_file_size
                                            (const PS04AudioTrackMatrix *self);
PS04AudioTrack* ps04_audio_track_matrix_get_track
                                            (PS04AudioTrackMatrix *self,
                                             guint track,
                                             guint vtake);
gboolean    ps04_audio_track_matrix_has_track
                                            (const PS04AudioTrackMatrix *self,
                                             guint track,
                                             guint vtake);
void        ps04_audio_track_matrix_set     (PS04AudioTrackMatrix *self,
                                             const char *folder_path,
                                             guint project_no,
                                             GError **error);
gulong      ps04_audio_track_matrix_get_max_samples
                                            (const PS04AudioTrackMatrix *self);

Object Hierarchy


  GObject
   +----PS04AudioTrackMatrix

Description

The PS04AudioTrackMatrix class is a container for all the audio tracks of a PS04Project, ordered as a two-dimensional matrix by track and virtual take.

Details

PS04AudioTrackMatrix

typedef struct _PS04AudioTrackMatrix PS04AudioTrackMatrix;


PS04_N_AUDIO_CHANNELS

#define PS04_N_AUDIO_CHANNELS 4

The number of audio channels.


PS04_N_AUDIO_VTAKES

#define PS04_N_AUDIO_VTAKES 10

The number of virtual takes per channel.


ps04_audio_track_matrix_new ()

PS04AudioTrackMatrix* ps04_audio_track_matrix_new
                                            (void);

Creates a new, empty matrix.

Returns : a new PS04AudioTrackMatrix.

ps04_audio_track_matrix_copy_from ()

void        ps04_audio_track_matrix_copy_from
                                            (PS04AudioTrackMatrix *self,
                                             const PS04AudioTrackMatrix *other);

Makes this matrix a copy of the other. Tracks are copied by reference.

self : An PS04AudioTrackMatrix.
other : Another PS04AudioTrackMatrix to copy from.

ps04_audio_track_matrix_format_track_name ()

const char* ps04_audio_track_matrix_format_track_name
                                            (guint track,
                                             guint vtake);

Formats a display string of track and v-take number.

track : The track index (0–PS04_N_AUDIO_CHANNELS)
vtake : The v-take index (0–PS04_N_AUDIO_VTAKES)
Returns : a static buffer where the string gets stored. This function is therefore not thread-safe.

ps04_audio_track_matrix_get_total_file_size ()

gulong      ps04_audio_track_matrix_get_total_file_size
                                            (const PS04AudioTrackMatrix *self);

Gets the total file size of all audio tracks.

self : An PS04AudioTrackMatrix.
Returns : total file size in bytes.

ps04_audio_track_matrix_get_track ()

PS04AudioTrack* ps04_audio_track_matrix_get_track
                                            (PS04AudioTrackMatrix *self,
                                             guint track,
                                             guint vtake);

Gets the track at (track,vtake).

self : An PS04AudioTrackMatrix.
track : The track index of the track to get.
vtake : The v-take index of the track to get.
Returns : a PS04AudioTrack.

ps04_audio_track_matrix_has_track ()

gboolean    ps04_audio_track_matrix_has_track
                                            (const PS04AudioTrackMatrix *self,
                                             guint track,
                                             guint vtake);

Gets if the track (track,vtake) is non-empty.

self : An PS04AudioTrackMatrix.
track : The track index of the track to test.
vtake : The v-take index of the track to test.
Returns : TRUE if the track has audio, FALSE if it's empty.

ps04_audio_track_matrix_set ()

void        ps04_audio_track_matrix_set     (PS04AudioTrackMatrix *self,
                                             const char *folder_path,
                                             guint project_no,
                                             GError **error);

Sets the project containing the matrix, rereading all contained tracks.

self : An PS04AudioTrackMatrix.
folder_path : A path to the project folder.
project_no : The project number within the folder.
error :

ps04_audio_track_matrix_get_max_samples ()

gulong      ps04_audio_track_matrix_get_max_samples
                                            (const PS04AudioTrackMatrix *self);

self :
Returns :

See Also

PS04AudioTrack