From 8d966d388926766225bfc48685d89e5112d62a6f Mon Sep 17 00:00:00 2001 From: Matthew Kaney Date: Fri, 19 Apr 2024 10:12:42 -0400 Subject: [PATCH 1/2] Reorder setBPM/CPS functions to match getBPM/CPS --- src/Sound/Tidal/Stream/UI.hs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Sound/Tidal/Stream/UI.hs b/src/Sound/Tidal/Stream/UI.hs index 41098889..bf76f95d 100644 --- a/src/Sound/Tidal/Stream/UI.hs +++ b/src/Sound/Tidal/Stream/UI.hs @@ -28,12 +28,12 @@ streamResetCycles s = streamSetCycle s 0 streamSetCycle :: Stream -> Time -> IO () streamSetCycle s = Clock.setClock (sClockRef s) -streamSetBPM :: Stream -> Time -> IO () -streamSetBPM s = Clock.setBPM (sClockRef s) - streamSetCPS :: Stream -> Time -> IO () streamSetCPS s = Clock.setCPS (cClockConfig $ sConfig s) (sClockRef s) +streamSetBPM :: Stream -> Time -> IO () +streamSetBPM s = Clock.setBPM (sClockRef s) + streamGetCPS :: Stream -> IO Time streamGetCPS s = Clock.getCPS (cClockConfig $ sConfig s)(sClockRef s) From d83c2cc531322ef09e38392cc71e518383be1ea5 Mon Sep 17 00:00:00 2001 From: Matthew Kaney Date: Fri, 19 Apr 2024 10:17:12 -0400 Subject: [PATCH 2/2] Add get/setbpm functions to Boot.hs --- src/Sound/Tidal/Boot.hs | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/Sound/Tidal/Boot.hs b/src/Sound/Tidal/Boot.hs index edae71f5..32489f71 100644 --- a/src/Sound/Tidal/Boot.hs +++ b/src/Sound/Tidal/Boot.hs @@ -27,6 +27,8 @@ module Sound.Tidal.Boot , setCycle , setcps , getcps + , setbpm + , getbpm , getnow , d1 , d2 @@ -174,10 +176,18 @@ setCycle = streamSetCycle tidal setcps :: Tidally => Pattern Double -> IO () setcps = once . cps --- | See 'Sound.Tidal.Stream.streamGetcps'. +-- | See 'Sound.Tidal.Stream.streamGetCPS'. getcps :: Tidally => IO Time getcps = streamGetCPS tidal +-- | See 'Sound.Tidal.Stream.streamGetBPM'. +setbpm :: Tidally => Time -> IO () +setbpm = streamSetBPM tidal + +-- | See 'Sound.Tidal.Stream.streamGetBPM'. +getbpm :: Tidally => IO Time +getbpm = streamGetBPM tidal + -- | See 'Sound.Tidal.Stream.streamGetnow'. getnow :: Tidally => IO Time getnow = streamGetNow tidal