• ### Bpm to ms

im trying to use the metro object as such that i imput a bpm value instead of a ms value to determine tempo. I know that 60bpm=1000ms and 120bpm=500ms and so on but I just can't seem to figure out what the formula. could some one help me out with the math?

• Posts 4 | Views 3910
• X beats per minute
=>
X/60 beats per second
=>
X/60000 beats per millisecond
=>
60000/X milliseconds per beat

so you need

bpm
|
[t b f]
| |
| V
[60000(
! V
[/ ]
|
ms

or simpler if you can use GPL code:

bpm
|
[expr 60000 / &#036;f1]
|
ms

Notice that due to (A/(A/X))=X these also work to convert ms to bpm

• you the man. although i do not quite get the logic behind the trigger objects yet the patch works. thanks

• [trigger] / [t] objects are necessary to give a defined order to the operations of a patch. For example:

in
| &#92;
[+ ]
|
out

At first glance this would double the input float, but without a trigger object the order of the passing of data from in to [+] is undefined, there is no way of telling whether it will be sent to the right or the left first. If it sends to the right first, then out = in + in. But if it sends to the left first, then out = in + the previous in.

To avoid this non-determinism, you need trigger objects. If you want the first case:

in
|
[t f f]
| |
[+]
|
out

Or if you want the second case:

in
|
[t f f]
&#92; /
X
/ &#92;
[+ 0]
|
out

[trigger] objects send their outputs in right to left order. In the second example, I initialised the [+] with a creation argument because the first time the object is triggered no value has been received at its right inlet.

Another use for [trigger] is to convert between types, useful in many situations, most often where you don't care what a message is and you just want a triggering bang.

Posts 4 | Views 3910
Internal error.

Oops! Looks like something went wrong!