| Top |
BtSongInfoBtSongInfo — class that keeps the meta-data for a BtSong instance |
| gchar * | author | Read / Write |
| gulong | bars | Read / Write |
| gulong | bpm | Read / Write |
| gchar * | change-dts | Read / Write |
| gchar * | create-dts | Read / Write |
| gchar * | file-name | Read / Write |
| gchar * | genre | Read / Write |
| gchar * | info | Read / Write |
| gchar * | name | Read / Write |
| BtSong * | song | Read / Write / Construct Only |
| gpointer | taglist | Read |
| guint64 | tick-duration | Read |
| gulong | tpb | Read / Write |
This class exposes the meta-data of a song as GObject properties. These are for one pure data fields such as author and song name. These fields get used when recording a song to a file (rendering) in the form of meta-tags.
Further there are fields that determine rythm and song-speed. The speed is determined by “bpm”. The rythm is determined by “bars” and “tpb”. If 'bars' is 16, than on can have 1/16 notes. And if 'ticks per beat' is 4 one will have 4 beats - a classic 4/4 meassure. For a 3/4 meassure, 'bars' would be 12. Thus bars = beats * tpb.
Finally, the class offers a couple of timing related conversion functions.
BtSongInfo *
bt_song_info_new (const BtSong * const song);
Create a new instance
const gchar *
bt_song_info_get_change_dts_in_local_tz
(const BtSongInfo * const self);
Convert the BtSongInfo::change-dts to local time zone.
Return: the time stamp in iso 8601 format
gint
bt_song_info_get_seconds_since_last_saved
(const BtSongInfo * const self);
Calculate the seconds since last save time or the creation time if the song is new.
Return: the seconds
GstClockTime bt_song_info_tick_to_time (const BtSongInfo * const self,const gulong tick);
Convert a given tick position to the time in µs.
gulong bt_song_info_time_to_tick (const BtSongInfo * const self,const GstClockTime ts);
Convert a given time in µs to the tick position.
void bt_song_info_time_to_m_s_ms (const BtSongInfo * const self,gulong ts,gulong *m,gulong *s,gulong *ms);
Convert a given time in µs to minutes, seconds and milliseconds.
void bt_song_info_tick_to_m_s_ms (const BtSongInfo * const self,const gulong tick,gulong *m,gulong *s,gulong *ms);
Convert a given tick position to minutes, seconds and milliseconds.
“bars” property“bars” gulong
how many bars per meassure.
Flags: Read / Write
Allowed values: [1,64]
“bpm” property“bpm” gulong
how many beats should be played in a minute.
Flags: Read / Write
Allowed values: [1,1000]
“change-dts” property“change-dts” gchar *
song changed date time stamp (iso 8601 format).
Flags: Read / Write
Default value: NULL
“create-dts” property“create-dts” gchar *
song creation date time stamp (iso 8601 format).
Flags: Read / Write
Default value: NULL
“file-name” property“file-name” gchar *
songs file name.
Flags: Read / Write
Default value: NULL
“info” property“info” gchar *
songs freeform info.
Flags: Read / Write
Default value: "comment me!"
“song” property“song” BtSong *
song object, the song-info belongs to.
Flags: Read / Write / Construct Only
“tick-duration” property “tick-duration” guint64
the duration for a tick in µs calculated form the song tempo.
Flags: Read
Allowed values: >= 1
Default value: 1
“tpb” property“tpb” gulong
event granularity in one beat.
Flags: Read / Write
Allowed values: [1,128]