Hi all,
No idea is this is possible but...
is there are command I could run from the command line to check if a string is valid tidalcycles syntax?
(would be run on a computer with tidalcycles installed)
Writing a discord bot for collaborative live coding and want to find a way to provide error messages.
Thank you!
Hey @dvdlxndr ,
I would guess that you could use parseBP_E
for this. This is the function which parses the Strings to Patterns.
-- This statement
parseBP_E "1 2 3 4"
-- Will result in
-- (0>¼)|1
-- (¼>½)|2
-- (½>¾)|3
-- (¾>1)|4
-- This statement
parseBP_E "1 2>"
-- Will result in
-- *** Exception: Syntax error in sequence:
-- "1 2>"
-- ^
-- unexpected '>'
-- expecting "-", "+", number, "c", "d", "e", "f", "g", "a", "b", "'", rest, "[", "{", "<", "^", ".", "?" or --end of input
2 Likes
I would do it by running tidal-listener, and talking to it using the open sound control protocol: https://github.com/tidalcycles/Tidal/tree/main/tidal-listener
2 Likes
Hi @yaxu ... sorry, familiar with OSC but a bit new to haskell. Would you mind telling me how I can run tidal-listener?
Never mind got it to work! Thank you!
1 Like