Send bpm tempo through OSC messages

Hi everyone,
I'm working on a project that needs the tempo information (BMP/cps) in order to trigger an event in syncro (and in the future, I will extend it to some other event).
So I want to send an OSC message with the tempo information.
Is it possible?

Best regards :grinning:

1 Like

Hey @antonelse

What you can do is using the function setcps to change the tempo in combination with cF:

:t setcps
-- setcps :: Pattern Double -> IO ()

By the way: you talk about this mysterious project, I'm starting to wonder what it will be :smiley:

:laughing: You are right !!! It is a maybe stupid project, trust me, anything but mysterious !! When I finish it I will repost it here for sure.
Regarding the OSC, maybe I misspoke. My goal is to send the cps/bpm info to the famous Processing.
Then it will need for generating a visual in-sync with audio.

Thanks again @mrreason for your answer :smiley:

1 Like

My goal is to send the cps /bpm info to the famous Processing.
Then it will need for generating a visual in-sync with audio.

Ah okay. The cps is inside each TidalCycles OSC message. The easiest way to get a feeling of this is to evaluate OSCFunc.trace(true) in SuperCollider. One message could be look like this:

1: [ /play2, cps, 0.5625, cycle, 2295, delta, 0.54214235314123, n, 0.0, orbit, 0, s, bd]

For this reason, you have the cps automatically available if you change or add the target for TidalCycles.

And if you want to get really deep into debugging, you can try Wireshark:

Thanks @mrreason.
Super useful as always :wink:
I'll work on it.