tidal-listener
tidal-listener copied to clipboard
Define basic protocol
What's the basic api?
On going design ideas moved here: https://github.com/tidalcycles/tidal-listener/wiki
Would be great to have queryArc
as part of this API!
As in ? [out] queryArc "some pattern" arcsize [in] [((1,1),(2,1)),((1,1),(2,1))|"a",[((1,1),(2,1)),((3,1),(4,1))]0-(½>1)|"b"]
@lwlsn yeah, or even in a form like getEvents start end p
:
[out] getEvents 4 8 (`s "bd ~ cp/4"`)
One thing I've noticed is that while you can use multiple streams you won't get highlight nor code/ok|err
messages back with stream name.
Ok|err responses are easy fix but highlight looks way more complex due to the stack
used by Tidal at https://github.com/tidalcycles/Tidal/blob/9e16e1f15659a2e78748a4accac84fd1fd58b902/src/Sound/Tidal/Stream.hs#L441.
The information is there but it gets discarded (stacked), so it would need a bit different handling for OSCStream
messages.
@sorki @ndr-brt This should add the pattern id/stream name to the start of highlight osc messages: https://github.com/tidalcycles/Tidal/commit/d15a87e1f6fea699ab5e3dc819ea216094356852
@sorki It looks like the stream id is sent with /code/ok and /code/err messages to me https://github.com/tidalcycles/tidal-listener/blame/master/src/Sound/Tidal/Listener.hs#L81
To fix it for highlights I added the id to pattern controlmaps before they are stacked, as the string parameter 'id'. This means that this is accessible also to be sent out over the OSC messages, which might be useful for e.g. visualisation.
Lovely, thank you @yaxu!