Top | ![]() |
![]() |
![]() |
![]() |
BtSongBtSong — class of a song project object (contains BtSongInfo, BtSetup, BtSequence and BtWavetable) |
gboolean | bt_song_continue () |
BtSong * | bt_song_new () |
gboolean | bt_song_pause () |
gboolean | bt_song_play () |
gboolean | bt_song_stop () |
gboolean | bt_song_update_playback_position () |
BtApplication * | app | Read / Write / Construct Only |
GstBin * | bin | Read |
gboolean | is-idle | Read / Write |
gboolean | is-playing | Read |
BtSinkMachine * | master | Read / Write |
gulong | play-pos | Read / Write |
gdouble | play-rate | Read / Write |
BtSequence * | sequence | Read |
BtSetup * | setup | Read |
BtSongInfo * | song-info | Read |
BtSongIO * | song-io | Read / Write |
BtWavetable * | wavetable | Read |
A song is the top-level container object to manage all song-related objects. The BtSetup contains the machines and their connections, the BtSequence contains the overall time-line, the BtWavetable holds a list of audio snippets and the BtSongInfo has a couple of meta-data items for the song.
To load or save a song, use a BtSongIO object. These implement loading and saving for different file-formats.
One can seek in a song by setting the “play-pos” property. Likewise one can watch the property to display the playback position.
The “play-rate” property can be used to change the playback speed and direction.
gboolean
bt_song_continue (const BtSong * const self
);
Continues the playback of the specified song instance.
BtSong *
bt_song_new (const BtApplication * const app
);
Create a new instance. The new song instance automatically has one instance of BtSetup, BtSequence and BtSongInfo. These instances can be retrieved via the respecting properties.
For example use following code to retrive a BtSequence from the song class:
1 2 3 |
BtSequence *sequence; ... g_object_get(BT_SONG(song), "sequence", &sequence, NULL); |
gboolean
bt_song_pause (const BtSong * const self
);
Pauses the playback of the specified song instance.
gboolean
bt_song_play (const BtSong * const self
);
Starts to play the specified song instance from beginning. This methods toggles the “is-playing” property.
gboolean
bt_song_stop (const BtSong * const self
);
Stops the playback of the specified song instance.
gboolean
bt_song_update_playback_position (const BtSong * const self
);
Updates the playback-position counter to fire all “play-pos” notify handlers.
“app”
property“app” BtApplication *
set application object, the song belongs to.
Flags: Read / Write / Construct Only
“is-idle”
property “is-idle” gboolean
request that the song should idle-loop if not playing.
Flags: Read / Write
Default value: FALSE
“is-playing”
property “is-playing” gboolean
tell whether the song is playing right now or not.
Flags: Read
Default value: FALSE
“play-pos”
property “play-pos” gulong
position of the play cursor of the sequence in timeline bars.
Flags: Read / Write
Allowed values: <= G_MAXLONG
“play-rate”
property “play-rate” gdouble
playback rate of the sequence.
Flags: Read / Write
Allowed values: [-5,5]
Default value: 1
“song-io”
property“song-io” BtSongIO *
the song-io plugin during i/o operations.
Flags: Read / Write