Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add getbpm and setbpm to boot functions #1083

Merged
merged 2 commits into from
Jul 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion src/Sound/Tidal/Boot.hs
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ module Sound.Tidal.Boot
, setCycle
, setcps
, getcps
, setbpm
, getbpm
, getnow
, d1
, d2
Expand Down Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions src/Sound/Tidal/Stream/UI.hs
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
Loading