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 streamGetbpm to Stream.hs #1018

Open
jarmitage opened this issue Jun 10, 2023 · 2 comments · May be fixed by #1083
Open

add streamGetbpm to Stream.hs #1018

jarmitage opened this issue Jun 10, 2023 · 2 comments · May be fixed by #1083
Labels
Stream Issues related to the Stream functionality of playing Tidal patterns

Comments

@jarmitage
Copy link

bpm <- Link.getTempo ss is already available here, so it would be nice to add streamGetbpm here:

streamGetcps :: Stream -> IO Double
streamGetcps s = do
let config = sConfig s
ss <- Link.createAndCaptureAppSessionState (sLink s)
bpm <- Link.getTempo ss
return $! coerce $ bpm / (cBeatsPerCycle config) / 60

@jarmitage
Copy link
Author

getbpm :: Stream -> IO Double
getbpm s = fmap (\cps -> cps * 2 * 120) (streamGetcps s)

@polymorphicengine polymorphicengine added the Stream Issues related to the Stream functionality of playing Tidal patterns label Mar 26, 2024
@mindofmatthew mindofmatthew linked a pull request Apr 19, 2024 that will close this issue
@mindofmatthew
Copy link
Contributor

As of #1059 this has been added, and then #1083 closes the loop by adding getbpm and setbpm.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Stream Issues related to the Stream functionality of playing Tidal patterns
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants