Song tempo interface
If we want gstreamer elements to play in sync with the song speed, we need to supply the the song tempo and the 'number of ticks' between the beats. The song tempo is given as bpm (that is 'beats per minute'). The higher the number of tick the more fine grained events are possible. When using one tpb (short for 'tick(s) per beat'), one could only play full notes.
There are two approaches:
- The application could give the tempo to all elemnts
- One element could be nominated as sync-master and the others as sync-slaves
The benefit of the 2nd approach are:
- if jacksink is the sync-master it could slave itself to jack and any tempo chage on jack would be applied to the song
- if we play files like midi/mod and they implement the tempo-iface, they can sync (side-note: none of timidity, wildmidi, modplug has tempo control)
If machines would implement a GstSongTempo interface, then the application can pass the needed data to those machines. The interface mainly needs two gulong iface-properties: bpm (beat per minute) and tpb (ticks per beat). From these it can calculate the number of sample to process between control-parameter syncs.
The GstController has a feature to smooth data values. If we wan't to use that, the tempo interface should provide another property for the subticks.