Skip to content

Commit

Permalink
#1035 added setcps and other controls to OSC Listener
Browse files Browse the repository at this point in the history
  • Loading branch information
sss-create committed Jan 11, 2025
1 parent d9802aa commit 00f2b76
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/Sound/Tidal/Stream/Listen.hs
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,18 @@ ctrlResponder waits c (stream@(Stream {sListen = Just sock}))
= streamHush stream
act (O.Message "/silence" (k:[]))
= withID k $ streamSilence stream
-- Cycle properties commands
act (O.Message "/setcps" [O.Float k])
= streamSetCPS stream $ toTime k
act (O.Message "/setbpm" [O.Float k])
= streamSetBPM stream $ toTime k
act (O.Message "/setCycle" [O.Float k])
= streamSetCycle stream $ toTime k
act (O.Message "/resetCycles" _)
= streamResetCycles stream
-- Nudge all command
act (O.Message "/nudgeAll" [O.Double k])
= streamNudgeAll stream k
act m = hPutStrLn stderr $ "Unhandled OSC: " ++ show m
add :: String -> Value -> IO ()
add k v = do sMap <- takeMVar (sStateMV stream)
Expand Down

0 comments on commit 00f2b76

Please sign in to comment.