kushview / element

Element Audio Plugin Host
https://kushview.net/element/
1.18k stars 99 forks source link

OSC messages for transport initial state and changes #141

Closed eliot-akira closed 2 years ago

eliot-akira commented 4 years ago

The idea is to enable an external OSC client/server to sync up, so it can send MIDI sequences in time with Element's transport control.

Possible commands/messages:

Command Values
/element/transport/tempo int beats per minute
/element/transport/timeSignature int number of beats, int beat unit

For initial state, maybe when an OSC Sender node is connected, Element can send the tempo and time signature as part of a "handshake" stage.

--- Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/84309735-osc-messages-for-transport-initial-state-and-changes?utm_campaign=plugin&utm_content=tracker%2F158730899&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F158730899&utm_medium=issues&utm_source=github).
eliot-akira commented 4 years ago

I'm thinking that a similar protocol for syncing transport state could be useful for the Lua node.

Technically, MIDI clock messages could be used for this purpose, for OSC client or Lua script to detect (and adjust) its internal tempo - but it's kind of tricky to implement. It'd be simpler if they could listen for explicit tempo init and change messages.

As first steps, I'll try the following: