Millisecond to BPM conversion

rossmalone@gmail.com's icon

Hey everyone!
I've made a 16 step sequencer where the tempo is controlled in milliseconds.
I want to change this to BPM but I don't know the equation to do so.
If anyone can help, please do!
thanks a lot,

notyouraveragejoe's icon

not sure if this is entirely accurate, but it works...

Max Patch
Copy patch and select New From Clipboard in Max.

On 12/01/2008, Ross Malone wrote:
>
>
> Hey everyone!
> I've made a 16 step sequencer where the tempo is controlled in
> milliseconds.
> I want to change this to BPM but I don't know the equation to do so.
> If anyone can help, please do!
> thanks a lot,
>

rossmalone@gmail.com's icon

Thanks!
Is this the calculation for an entire bar?
If so, If i multiply my millisecond metro by 16 and put it into the patch, it should work?
Thanks again

notyouraveragejoe's icon

It calculates the metro interval into single beats per minute. If your metro
is ticking every 500 milliseconds, then that is 120 beats per minute.
(though for some reason it rounds it down to 119, you might need to try
putting a float number box at the end of that, will probably give you 120)

On 12/01/2008, Ross Malone wrote:
>
>
> Thanks!
> Is this the calculation for an entire bar?
> If so, If i multiply my millisecond metro by 16 and put it into the patch,
> it should work?
> Thanks again
>

ed dowie's icon

!/ 60000.

Gary Lee Nelson's icon

There are some rounding errors in your patch. Try this.

Max Patch
Copy patch and select New From Clipboard in Max.

On 1/12/08 7:00 AM, "Joe Bicker" wrote:

> not sure if this is entirely accurate, but it works...
>
> #P window setfont "Sans Serif" 9.;
> #P window linecount 1;
> #P comment 167 191 61 196617 BPM;
> #P number 167 173 83 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
> #P newex 167 144 47 196617 * 1000.;
> #P newex 167 119 37 196617 !/ 60.;
> #P number 167 91 78 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
> #P comment 167 74 61 196617 milliseconds;
> #P connect 3 0 4 0;
> #P connect 2 0 3 0;
> #P connect 1 0 2 0;
> #P window clipboard copycount 6;
>
>
> On 12/01/2008, Ross Malone
> > wrote:
>>
>> Hey everyone!
>> I've made a 16 step sequencer where the tempo is controlled in milliseconds.
>> I want to change this to BPM but I don't know the equation to do so.
>> If anyone can help, please do!
>> thanks a lot,
>>
>
>

Cheers
Gary Lee Nelson
Oberlin College
www.timara.oberlin.edu/GaryLeeNelson

notyouraveragejoe's icon

Yeah, using a float number box seems to solve it. Strange that the two
number boxes receiving the same number display different integers.

On 12/01/2008, Gary Lee Nelson wrote:
>
> There are some rounding errors in your patch. Try this.
>
> #P window setfont "Sans Serif" 9.;
> #P window linecount 1;
> #P comment 206 253 61 196617 BPM;
> #P number 206 235 83 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
> #P newex 187 197 27 196617 + 0.5;
> #P flonum 264 173 87 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
> #P flonum 263 90 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
> #P comment 113 253 61 196617 BPM;
> #P number 113 235 83 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
> #P newex 167 145 47 196617 * 1000.;
> #P newex 167 119 37 196617 !/ 60.;
> #P number 167 91 78 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
> #P comment 167 74 61 196617 milliseconds;
> #P connect 8 0 9 0;
> #P connect 3 0 4 0;
> #P connect 3 0 8 0;
> #P connect 3 0 7 0;
> #P connect 6 0 2 0;
> #P connect 1 0 2 0;
> #P connect 2 0 3 0;
> #P window clipboard copycount 11;
>
>
>
> On 1/12/08 7:00 AM, "Joe Bicker" wrote:
>
> not sure if this is entirely accurate, but it works...
>
> #P window setfont "Sans Serif" 9.;
> #P window linecount 1;
> #P comment 167 191 61 196617 BPM;
> #P number 167 173 83 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
> #P newex 167 144 47 196617 * 1000.;
> #P newex 167 119 37 196617 !/ 60.;
> #P number 167 91 78 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
> #P comment 167 74 61 196617 milliseconds;
> #P connect 3 0 4 0;
> #P connect 2 0 3 0;
> #P connect 1 0 2 0;
> #P window clipboard copycount 6;
>
>
> On 12/01/2008, *Ross Malone*
> > wrote:
>
>
> Hey everyone!
> I've made a 16 step sequencer where the tempo is controlled in
> milliseconds.
> I want to change this to BPM but I don't know the equation to do so.
> If anyone can help, please do!
> thanks a lot,
>
>
> ------------------------------
>
>
>
>
> Cheers
> Gary Lee Nelson
> Oberlin College
> www.timara.oberlin.edu/GaryLeeNelson
>
>
>

Gary Lee Nelson's icon

Adding .5 rounds the result

expr $f1/60000.+.5

Does it all in one object.

If you are applying the bpm to tempo, I suggest keeping the fractional part.

On 1/12/08 2:37 PM, "Joe Bicker" wrote:

> Yeah, using a float number box seems to solve it. Strange that the two number
> boxes receiving the same number display different integers.
>
> On 12/01/2008, Gary Lee Nelson wrote:
>> There are some rounding errors in your patch. Try this.
>>
>> #P window setfont "Sans Serif" 9.;
>> #P window linecount 1;
>> #P comment 206 253 61 196617 BPM;
>> #P number 206 235 83 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
>> #P newex 187 197 27 196617 + 0.5;
>> #P flonum 264 173 87 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
>> #P flonum 263 90 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
>> #P comment 113 253 61 196617 BPM;
>> #P number 113 235 83 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
>> #P newex 167 145 47 196617 * 1000.;
>> #P newex 167 119 37 196617 !/ 60.;
>> #P number 167 91 78 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
>> #P comment 167 74 61 196617 milliseconds;
>> #P connect 8 0 9 0;
>> #P connect 3 0 4 0;
>> #P connect 3 0 8 0;
>> #P connect 3 0 7 0;
>> #P connect 6 0 2 0;
>> #P connect 1 0 2 0;
>> #P connect 2 0 3 0;
>> #P window clipboard copycount 11;
>>
>>
>>
>> On 1/12/08 7:00 AM, "Joe Bicker" wrote:
>>
>>> not sure if this is entirely accurate, but it works...
>>>
>>> #P window setfont "Sans Serif" 9.;
>>> #P window linecount 1;
>>> #P comment 167 191 61 196617 BPM;
>>> #P number 167 173 83 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
>>> #P newex 167 144 47 196617 * 1000.;
>>> #P newex 167 119 37 196617 !/ 60.;
>>> #P number 167 91 78 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
>>> #P comment 167 74 61 196617 milliseconds;
>>> #P connect 3 0 4 0;
>>> #P connect 2 0 3 0;
>>> #P connect 1 0 2 0;
>>> #P window clipboard copycount 6;
>>>
>>>
>>> On 12/01/2008, Ross Malone
>>> > wrote:
>>>>
>>>> Hey everyone!
>>>> I've made a 16 step sequencer where the tempo is controlled in
>>>> milliseconds.
>>>> I want to change this to BPM but I don't know the equation to do so.
>>>> If anyone can help, please do!
>>>> thanks a lot,
>>>>
>>>
>>>
>>
>>
>>
>> Cheers
>> Gary Lee Nelson
>> Oberlin College
>> www.timara.oberlin.edu/GaryLeeNelson
>>
>>
>>
>
>
>

Cheers
Gary Lee Nelson
Oberlin College
www.timara.oberlin.edu/GaryLeeNelson

Small Lotus's icon

Hi maxers !

I prefer the following patch and keeping integers !

and it's reversible !

max v2;
#N vpatcher 100 100 700 500;
#P window setfont "Sans Serif" 9.;
#P number 226 86 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P window linecount 1;
#P comment 309 237 114 196617 BPM or ms interval;
#P number 206 235 83 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 167 162 41 196617 + 0.5;
#P newex 167 127 55 196617 !/ 60000.;
#P comment 315 90 109 196617 ms interval or BPM;
#P connect 5 0 1 0;
#P connect 1 0 2 0;
#P connect 2 0 3 0;
#P pop;
> Adding .5 rounds the result
>
> expr $f1/60000.+.5
>
> Does it all in one object.
>
> If you are applying the bpm to tempo, I suggest keeping the
> fractional part.
>
>

Venetian's icon

In general,

BPM = 30000/BEAT_IN_MILLISCONDS

or maybe 60000 depending on what you count as a beat

So in Max

expr (30000/$i1)

joshua goldberg's icon

or !/ 60000.

On Jan 13, 2008, at 4:14 PM, Andrew Robertson wrote:

>
>
> In general,
>
> BPM = 30000/BEAT_IN_MILLISCONDS
>
> or maybe 60000 depending on what you count as a beat
>
>
> So in Max
>
> expr (30000/$i1)
>
>
>
>

Gary Lee Nelson's icon

Again, integer calculations can sometimes lead to gross errors in timing.

For example, with integer calculations, a 10 minute piece would be shorter
with a time interval of 333 ms compared to 334. That is a 1 ms error on
each of 1800 beats making an error of 1.8 seconds. And neither 333 or 334
accurately represents a precise tempo of 180 bpm.

Beats per minute is calculated with reference to intervals of 1000ms that
would result in 60 bpm

Cheers
Gary Lee Nelson
Oberlin College
www.timara.oberlin.edu/GaryLeeNelson

On 1/13/08 4:14 PM, "Andrew Robertson" wrote:

>
>
> In general,
>
> BPM = 30000/BEAT_IN_MILLISCONDS
>
> or maybe 60000 depending on what you count as a beat
>
>
> So in Max
>
> expr (30000/$i1)
>
>
>

Jimmeh's icon

there is a tempo object.

Gary Lee Nelson's icon

And pulse. Pulsemetro and my new favorite el.samm

On 1/14/08 6:50 PM, "James" wrote:

>
> there is a tempo object.

Cheers
Gary Lee Nelson
Oberlin College
www.timara.oberlin.edu/GaryLeeNelson

Michael Sperone's icon

this is the BPM2ms object by Karlheinz Essl, it comes in a set of objects that I've found VERY useful and have come to rely upon.