BEAST/BSE - Better Audio System and Sound Engine
0.8.2
|
00001 // Licensed GNU LGPL v2.1 or later: http://www.gnu.org/licenses/lgpl.html 00002 #ifndef __BSE_MIDI_FILE_H__ 00003 #define __BSE_MIDI_FILE_H__ 00004 00005 #include <bse/bsemidievent.hh> 00006 00007 G_BEGIN_DECLS 00008 00009 typedef struct { 00010 guint n_events; 00011 BseMidiEvent **events; 00012 } BseMidiFileTrack; 00013 typedef struct { 00014 BseMusicalTuningType musical_tuning; 00015 guint tpqn; /* ticks-per-quarter-note */ 00016 gfloat tpqn_rate; 00017 /* signature */ 00018 gfloat bpm; 00019 guint numerator, denominator; 00020 /* tracks */ 00021 guint n_tracks; 00022 BseMidiFileTrack tracks[1]; /* flexible array */ 00023 } BseMidiFile; 00024 00025 BseMidiFile* bse_midi_file_load (const gchar *file_name, 00026 BseErrorType *error_p); 00027 void bse_midi_file_free (BseMidiFile *smf); 00028 void bse_midi_file_add_part_events (BseMidiFile *smf, 00029 guint nth_track, 00030 BsePart *part, 00031 BseTrack *ptrack); 00032 void bse_midi_file_setup_song (BseMidiFile *smf, 00033 BseSong *song); 00034 00035 G_END_DECLS 00036 00037 #endif /* __BSE_MIDI_FILE_H__ */