devcurmudgeon / alo

A Looper plugin for MOD duo
MIT License
20 stars 7 forks source link

Multiple free running instances length sync? #13

Open mxmilkiib opened 3 years ago

mxmilkiib commented 3 years ago

If there are multiple instances of the plugin, all set to free running, can it be so that instances beyond the first get their loop length set by the length of loop the first gets? So that they can all work together?

devcurmudgeon commented 3 years ago

That would be cool, but I don't know if it's possible

falkTX commented 3 years ago

global variables would allow for this, but they would need very special care due to plugins running in parallel.

devcurmudgeon commented 3 years ago

Thanks @falkTX - I'll take a look

mxmilkiib commented 3 years ago

My friend said they would buy a Dwarf if this could be possible.

falkTX commented 3 years ago

Why not just take the time from the host? then all looper instances are in sync. Using globals is risky for many reasons and hard to get right, plus thinking more about it because of multi-threaded graph/pedalboard the plugin instance that runs first is undefined..

mxmilkiib commented 3 years ago

I think they wish to have personal agency over leading the music/loop timing in the moment rather than have to follow a predefined tempo.

Could the use of Atoms not work to sync instances? Or even just CV?

falkTX commented 3 years ago

Atoms have nothing to do with that. Connecting some port from one instance to another will make it so that jack always runs one client before the other though. so a dummy audio/cv port can be used

mxmilkiib commented 3 years ago

I thought LV2 plugins can communicate with each other through atoms after their event ports are connected, and that mechanism could be used to inform of something like loop length lead status etc? But if CV ports for triggering things could be possible, then that would be awesome.

falkTX commented 3 years ago

LV2 can communicate as much as the host support such things. Typical hosts only handle the messages they are interested in and discard the rest. The idea of audio/cv port for ensuring order of processing has nothing to do with triggering stuff. only so that on the audio processing graph we ensure one runs before the other (because by being connected one must obviously be done before the other)

mxmilkiib commented 3 years ago

Ok.

A related feature my friend mentioned is that the newer Boss looper device does for free running mode is the ability to create a loop of whatever length on one track then create another loop track with exactly double the length of the first tracks free length loop. A nice advanced things for sure, not sure how what could be setup, just mentioning it sooner rather than later in case it jogs any ideas.

devcurmudgeon commented 3 years ago

That would be easy enough to do, i think