Skip to content

Commit

Permalink
Merge pull request #1102 from sss-create/osc-setcps1
Browse files Browse the repository at this point in the history
#1035 added setcps and other controls to OSC Listener
  • Loading branch information
yaxu authored Jan 13, 2025
2 parents d9802aa + 00f2b76 commit 2b85712
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 2b85712

Please sign in to comment.