Pure Data and BPM

timing in PD revolves around milliseconds. This is useful, as it gives you much more flexibility when it comes to programming timed operations, but personally I often need to use things that are synced together, and most other sound applications use BPM. Converting BPM to and from milliseconds is a simple mathematical equation, but I can never seem to remember it when it comes time to actually code the thing. SO.. here it is.

to convert from a BPM to a millisecond rate (that can be fed to a metro or whatever) do this:


[100\ this is a number box.. put the BPM here
|
[expr 60000/$f1]
|
[600\ this is how many MS there are between each beat, at 100 BPM


I often find that i need to divide the output of that equation by 2 or 4 (or even 8!) to get 8th or 16th notes.. but there it is.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s