[Jack-Devel] How to use the BBT position information
I'm having a little trouble understanding what the /beat/, /bar/, and
/tick/ information of the JACK timebase master could be used for by a
The big advantage of supplying the JackPositionBBT information, as far
as I understand it, is that the timebase master is able to communicate a
change of tempo to the clients. Using the sample rate,
/beats_per_minute/, and /ticks_per_beat/ they can change the current
speed while transport is rolling, recalculating the tick size, and
updating their internal frame number to not produce any jumps while
But for all of this you do not need the /beat/, /bar/, and /tick/
information. In particular, I'm looking at an implementation, which
tries to calculate the current transport position based on these three
values instead of just using the current frame number. This, of course,
does not work since the ticks are (arbitrarily) coarse-graining the
frames within a beat and the provided /tick/ is the last one passed
during the current playback.
The only case I can think of where those three information would be
necessary is looping (/bar/ decreases). But I'm not quite sure how a
client should react to such an event.
So, did I miss an important use case of the BBT information? I certainly
don't not want to introduce new bugs while attempting to fix the JACK
On 12/4/18 2:40 PM, Chris Caudle wrote:
> On Tue, December 4, 2018 5:00 am, Philipp MÃ¼ller wrote:
>> don't...want to introduce new bugs while attempting to fix the JACK
>> audio driver.
> Maybe start with which jack audio driver, and what exactly you think needs
> to be fixed.
I'm talking about the JACK audio driver of Hydrogen . Whenever there
is a JACK timebase master, which is not Hydrogen itself, the callback
function relocates its internal transport position in frames to the one
calculated from the beat, bar, and tick information. But since this
position corresponds to the one of the last tick passed, it usually does
not match the current transport position of the JACK server. This will
be noticed by the program, which prints a warning .
To resolve this issue I want to remove the relocation according to the
BBT information and instead just handle the tempo change via the
JackPositionBBT info properly. But I'm not quite sure whether I might
miss some use cases this relocation by the BBT would be necessary.