Skip to content
This repository has been archived by the owner on Oct 3, 2021. It is now read-only.

Define basic protocol #1

Open
yaxu opened this issue Jul 6, 2020 · 7 comments
Open

Define basic protocol #1

yaxu opened this issue Jul 6, 2020 · 7 comments
Assignees

Comments

@yaxu
Copy link
Member

yaxu commented Jul 6, 2020

What's the basic api?

On going design ideas moved here: https://github.com/tidalcycles/tidal-listener/wiki

@yaxu yaxu assigned lwlsn and yaxu Jul 6, 2020
lwlsn added a commit that referenced this issue Jul 7, 2020
lwlsn added a commit that referenced this issue Jul 7, 2020
Merge pull request #1 from tidalcycles/master
@jarmitage
Copy link

Would be great to have queryArc as part of this API!

@lwlsn
Copy link
Member

lwlsn commented Nov 17, 2020

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"]

@jarmitage
Copy link

@lwlsn yeah, or even in a form like getEvents start end p:

[out] getEvents 4 8 (`s "bd ~ cp/4"`)

@sorki
Copy link
Contributor

sorki commented Apr 30, 2021

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.

@yaxu
Copy link
Member Author

yaxu commented Jul 15, 2021

@sorki @ndr-brt This should add the pattern id/stream name to the start of highlight osc messages: tidalcycles/Tidal@d15a87e

@yaxu
Copy link
Member Author

yaxu commented Jul 16, 2021

@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.

@sorki
Copy link
Contributor

sorki commented Jul 17, 2021

Lovely, thank you @yaxu!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants