From 00f2b76903f193a64741b15434db5931977149e3 Mon Sep 17 00:00:00 2001 From: sss-create <72546851@posteo.jp> Date: Sat, 11 Jan 2025 10:25:34 +0100 Subject: [PATCH] #1035 added setcps and other controls to OSC Listener --- src/Sound/Tidal/Stream/Listen.hs | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/Sound/Tidal/Stream/Listen.hs b/src/Sound/Tidal/Stream/Listen.hs index 40ac3b2e..832b9ab8 100644 --- a/src/Sound/Tidal/Stream/Listen.hs +++ b/src/Sound/Tidal/Stream/Listen.hs @@ -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)