Top | ![]() |
![]() |
![]() |
![]() |
GstContext * | gstbt_audio_tempo_context_new () |
gboolean | gstbt_audio_tempo_context_get_tempo () |
Methods to work with a GstContext that distributes tempo and timing information.
Applications use gstbt_audio_tempo_context_new()
to create and initialize the
context and gst_element_set_context()
to set it on the top-level pipeline.
The context is persistent and therefore can be set at any time.
GstElements that implement the GstElementClass::
vmethod can
use set_context()
gstbt_audio_tempo_context_get_tempo()
to retrieve the values. Based on
the parameters they can adjust their gst_object_sync_values()
cycle.
The difference between the tempo context and GST_TAG_BEATS_PER_MINUTE
is
that the tag describes the overall tempo, but the context allows to change
the tempo during playback and offers more finegrained control.
GstContext * gstbt_audio_tempo_context_new (guint bpm
,guint tpb
,guint stpb
);
The values of bpm
and tpb
define the meassure and speed of an audio track.
Elements (mostly sources) use these value to configure how the quantise
controller events and size their buffers. Elements can also use this for
tempo synced effects.
When using controllers one can also use stpb
to achieve smoother modulation.