falkTX / los

Libre Octave Studio
GNU General Public License v2.0
20 stars 5 forks source link

LOS does not send tempo via Jack transport #7

Closed ViktorNova closed 9 years ago

ViktorNova commented 10 years ago

LOS is brilliant at being Jack transport master for song position, but it does not send out the tempo

Which is a problem, especially combined with the weird issues that arise when something else is the transport master, as noted in this issue: https://github.com/falkTX/los/issues/3

Perhaps a more accurate definition might be that LOS has no way of truely being Jack transport master, and the only way it changes the song position accurately is due to Jack's ability for multiple different Jack clients to 'share' the song position without being the master.

I think OOM had this ability, and it seems to have been removed in LOS? Is this something that can at least maybe be enabled through a config file or something?

falkTX commented 10 years ago

the tempo pos is currently disabled because it was broken, it needs some (re)work.

ViktorNova commented 10 years ago

Interesting! Where does the breakage happen? I've been using the latest LOS in conjunction with Hydrogen and jack_midi_clock a bunch lately and it is spot on every time at least with song position, so it's just the tempo that's broken?

In which commit was tempo disabled? I want to mess with it a bit, it seems to work ok in OOM, LOS is just so much faster and tempo master would make it the ultimate master sequencer

falkTX commented 10 years ago

I don't think it ever worked perfectly in OOM, or at least I don't remember it. You can enable time-pos by uncommenting this line: https://github.com/falkTX/los/blob/master/los/driver/jack.cpp#L307

ViktorNova commented 10 years ago

Great! Thank you, I'll see how that goes and report back

ViktorNova commented 10 years ago

So I uncommented that line, recompiled, and tried it for about a week every which way, and here's what I found:

The timing is indeed off, or rather there is a consistent cycle of drift. It sets jack song position well, all other jack transport apps stay perfectly synced together, but LOS itself does not keep up with it, LOS's own song position never perfectly matches Jack's, whether it is slave or master (it's always slightly behind). I took readings at regular intervals, and the amount of time by which it's off varies, but in a consistent way. It will be off 13 ms in one spot, 36 ms in another spot, and 13 ms in a 3rd spot, etc. Very odd. Setting jack tempo worked great

I found other interesting things though - with this line uncommented, LOS works just fine when another app is jack transport master. None of the strange issues I reported here existed at all https://github.com/falkTX/los/issues/3 and I made very sure of this.

Aside from being slightly off time at all times, it really worked great! Unlike before, it didn't care if it was timebase master or if it was following another app as the master. Commenting that line out definitely fixed the timing, although at some other cost

I'm using LOS with external hardware synths that need MIDI tempo, so I ended up putting an instance of jack_midi_clock with a default tempo per-song into each session..not ideal since jack still doesn't know the tempo (and setting it some other way, such as klick, causes LOS to act weird), but at least it works well! I love LOS and really want it to succeed, so I hope these reports are at least somewhat helpful =)

falkTX commented 10 years ago

the bug reports are very welcome, and helpful yes. I'm not giving them too much attention now as my focus is with distrho and carla right now, but after the next carla beta things will be more calm and I'll need a good midi sequencer to test things. this is when los will come in handy :)

ViktorNova commented 10 years ago

Great! Thanks for the encouragement =D I will keep them coming, and when the time comes, as someone who uses LOS nearly every day now I'm happy to test out any changes/fixes/etc. Keep up the good work with Carla and Distrho, you're putting out some very cool stuff

falkTX commented 9 years ago

los now always follows jack transport and will act as master if there's no one available. during my small tests (with los as master) plugins loaded in carla seemed to have 100% sync (I tested some drums triggered by los jack-midi-out and a metronome plugin synced via jack-transport).

more testing welcome.

ViktorNova commented 9 years ago

SWEET! I actually have a ton of sequencing to do tomorrow, so I'll build the latest version and report back

ViktorNova commented 9 years ago

Looks like it's working great now! Man this is going to make my life a lot easier =) I'll do some more testing over the weekend with some external MIDI synths via jack_midi_clock and report back, but it looks good