[Jack-Devel] How to use the BBT position information

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

[Jack-Devel] How to use the BBT position information

Philipp Müller
Hi everyone,

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
client. 

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
changing tempo.

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
audio driver.

Greetings,

Philipp

_______________________________________________
Jack-Devel mailing list
[hidden email]
http://lists.jackaudio.org/listinfo.cgi/jack-devel-jackaudio.org
Reply | Threaded
Open this post in threaded view
|

Re: How to use the BBT position information

Chris Caudle
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.

--
Chris Caudle




_______________________________________________
Jack-Devel mailing list
[hidden email]
http://lists.jackaudio.org/listinfo.cgi/jack-devel-jackaudio.org
Reply | Threaded
Open this post in threaded view
|

Re: How to use the BBT position information

Philipp Müller
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 [1]. 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 [2].

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.

P

[1] https://github.com/hydrogen-music/hydrogen

[2] https://github.com/hydrogen-music/hydrogen/issues/602

_______________________________________________
Jack-Devel mailing list
[hidden email]
http://lists.jackaudio.org/listinfo.cgi/jack-devel-jackaudio.org