[JACK] Can tempo be synced between hosts?

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

[JACK] Can tempo be synced between hosts?

Francesco Napoleoni
Hi everyone

I’m experimenting with netjack (mainly version 1), and I’m quite impressed by
its ability to get different machines march together without (at least
apparently) hassle.

However I cannot find a way to transmit tempo changes from master machine to
slaves.

I’ll try to explain myself better: the “master machine” is a PC with a
soundcard, running JACK on a Linux Fedora OS, and is connected with the
“slaves” with a gigabit ethernet link. The “slaves” are currently two, but I
would like to expand this to a wider configuration, maybe with devices such as
Raspberry sharing the load of multiple synths, effects and so on.

The problem is that I can see the start/stop of the Jack transport synced
between the hosts, but not the tempo. This limits the use of applications
which do make use of tempo changes on slave hosts, forcing me to copy the
tempo map to them and run it in a DAW. As a side effect I can see the BBT
drifting between hosts (apparently its value is computed using the local tempo
mark).

Is there a way to solve this problem? Or am I missing something?

Thanks in advance

cheers
Francesco Napoleoni
_______________________________________________
Linux-audio-user mailing list
[hidden email]
https://lists.linuxaudio.org/listinfo/linux-audio-user
Reply | Threaded
Open this post in threaded view
|

Re: [JACK] Can tempo be synced between hosts?

Paul Davis


On Sat, Feb 20, 2021 at 4:09 AM Francesco Napoleoni <[hidden email]> wrote:
Hi everyone

I’m experimenting with netjack (mainly version 1), and I’m quite impressed by
its ability to get different machines march together without (at least
apparently) hassle.

However I cannot find a way to transmit tempo changes from master machine to
slaves.

I’ll try to explain myself better: the “master machine” is a PC with a
soundcard, running JACK on a Linux Fedora OS, and is connected with the
“slaves” with a gigabit ethernet link. The “slaves” are currently two, but I
would like to expand this to a wider configuration, maybe with devices such as
Raspberry sharing the load of multiple synths, effects and so on.

The problem is that I can see the start/stop of the Jack transport synced
between the hosts, but not the tempo. This limits the use of applications
which do make use of tempo changes on slave hosts, forcing me to copy the
tempo map to them and run it in a DAW. As a side effect I can see the BBT
drifting between hosts (apparently its value is computed using the local tempo
mark).

Is there a way to solve this problem? Or am I missing something?

The JACK Transport API does allow the time master client to provide information about position as denoted in musical time.

However, the people who developed JACK (which includes me) felt that it would be impossible/too hard to design a tempo map data structure that would serve the needs of, or integrate with, all possible clients, so we decided not to try to do that.

In retrospect, this still seems largely correct to me. Clients with simple-minded (correct, but simple) ideas about tempo and meter will not be able to deal with tempo ramping (accelerando and ritardando). Clients with more complex ideas about tempo will need those sorts of features.

Ableton Link, which has an open and well-documented API (and even a bridge to Jack Transport c/o Rui), demonstrates a better idea about how to keep a set of distributed "nodes" in sync with each other. It has some of its own limits too (instantaneous substantial and musically meaningful tempo changes and the like can be a problem).


_______________________________________________
Linux-audio-user mailing list
[hidden email]
https://lists.linuxaudio.org/listinfo/linux-audio-user
Reply | Threaded
Open this post in threaded view
|

Re: [JACK] Can tempo be synced between hosts?

Francesco Napoleoni
> However, the people who developed JACK (which includes me) felt that it
> would be impossible/too hard to design a tempo map data structure [...]

Thank you for the eminent answer!

Actually it arises some more interesting questions, but maybe I will elaborate
them in another post.

ciao
Francesco Napoleoni
_______________________________________________
Linux-audio-user mailing list
[hidden email]
https://lists.linuxaudio.org/listinfo/linux-audio-user
Reply | Threaded
Open this post in threaded view
|

Re: [JACK] Can tempo be synced between hosts?

Sam Kuper
In reply to this post by Francesco Napoleoni
 On Sat, Feb 20, 2021 at 4:09 AM Francesco Napoleoni wrote:

> I'll try to explain myself better: the "master machine" is a PC with a
> soundcard, running JACK on a Linux Fedora OS, and is connected with
> the "slaves" with a gigabit ethernet link. The "slaves" are currently
> two, but I would like to expand this to a wider configuration, maybe
> with devices such as Raspberry sharing the load of multiple synths,
> effects and so on.
>
> The problem is that I can see the start/stop of the Jack transport
> synced between the hosts, but not the tempo. This limits the use of
> applications which do make use of tempo changes on slave hosts,
> forcing me to copy the tempo map to them and run it in a DAW. As a
> side effect I can see the BBT drifting between hosts (apparently its
> value is computed using the local tempo mark).
>
> Is there a way to solve this problem? Or am I missing something?

Forgive me if I am having a brain fart (and please understand that I am
still just learning the ropes with audio on Linux), but why not:

- have your primary machine send suitable MIDI signals (note on/off, CC,
  patch change, etc; MIDI beat clock if you really need it; MIDI Song
  Position Pointer if you really need it) to your synths or samplers
  wherever they are, to get them to produce the right audio at the right
  moment?

- And then send this audio to your (software or hardware) mixer by the
  most convenient means available to you that has acceptably low latency
  and acceptably high sound quality?

Sam

--
A: When it messes up the order in which people normally read text.
Q: When is top-posting a bad thing?

()  ASCII ribbon campaign. Please avoid HTML emails & proprietary
/\  file formats. (Why? See e.g. https://v.gd/jrmGbS ). Thank you.
_______________________________________________
Linux-audio-user mailing list
[hidden email]
https://lists.linuxaudio.org/listinfo/linux-audio-user
Reply | Threaded
Open this post in threaded view
|

Re: [JACK] Can tempo be synced between hosts?

Francesco Napoleoni
> Forgive me if I am having a brain fart (and please understand that I am
> still just learning the ropes with audio on Linux), but why not:
>
> - have your primary machine send suitable MIDI signals (note on/off, CC,
>   patch change, etc; MIDI beat clock if you really need it; MIDI Song
>   Position Pointer if you really need it) to your synths or samplers
>   wherever they are, to get them to produce the right audio at the right
>   moment?

Hi Sam

yes, I also thought about using MIDI signals, this would be an alternative
solution. Anyway, what I asked for is a bit more specific: does JACK have an
internal mechanism to send tempo (and perhaps meter too) to clients over the
network? The answer was: NO (and probably is not going to have such a
mechanism in near future).

Still there are solutions to my problem, and I’m investigating which one(s)
could be optimal for my workflow.

At this point, you (and the list) are about to listen MY brain fart, :-) but
in a new post, which I hope can be the starting point of a good discussion.

ciao
Francesco Napoleoni
_______________________________________________
Linux-audio-user mailing list
[hidden email]
https://lists.linuxaudio.org/listinfo/linux-audio-user
Reply | Threaded
Open this post in threaded view
|

Re: [JACK] Can tempo be synced between hosts?

Lorenzo Sutton
In reply to this post by Francesco Napoleoni
Hi Francesco,

On 20/02/2021 12:08, Francesco Napoleoni wrote:
[...]

>
> However I cannot find a way to transmit tempo changes from master machine to
> slaves.
>
> I’ll try to explain myself better: the “master machine” is a PC with a
> soundcard, running JACK on a Linux Fedora OS, and is connected with the
> “slaves” with a gigabit ethernet link. The “slaves” are currently two, but I
> would like to expand this to a wider configuration, maybe with devices such as
> Raspberry sharing the load of multiple synths, effects and so on.
>
> The problem is that I can see the start/stop of the Jack transport synced
> between the hosts, but not the tempo. This limits the use of applications
> which do make use of tempo changes on slave hosts, forcing me to copy the
> tempo map to them and run it in a DAW. As a side effect I can see the BBT
> drifting between hosts (apparently its value is computed using the local tempo
> mark).
>
> Is there a way to solve this problem? Or am I missing something?


How about 'good old' midi (clock)? [1]

I imagine something like qmidinet [2] would be able to transmit that. Or
you could us Pure Data (aka Pd) which also has TCP send and receive
objects ([netsend] and [netreceive]). With Pure data you might need to
do a bit of math to calculate the tempo, but it's quite straightforward
(I did a Pd patch which used MIDI clock to send tempo to Yoshimi
recently, quite unrelated to your use case but could be useful for the
midi clock part [4]).

I honestly never tried midi clock like that with physical machines, but
I did use Pd in the past with TCP within the same intranet and it worked
quite well, YMMV.

Lorenzo.

[1] https://en.wikipedia.org/wiki/MIDI_beat_clock
[2] https://qmidinet.sourceforge.io/
[3] https://puredata.info/
[4] https://gitlab.com/lorenzosu/yoshimi-bpm-sync-lfos

>
> Thanks in advance
>
> cheers
> Francesco Napoleoni
> _______________________________________________
> Linux-audio-user mailing list
> [hidden email]
> https://lists.linuxaudio.org/listinfo/linux-audio-user
>
_______________________________________________
Linux-audio-user mailing list
[hidden email]
https://lists.linuxaudio.org/listinfo/linux-audio-user