## Millisecond to BPM conversion

Jan 12, 2008 at 11:39am

# Millisecond to BPM conversion

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,

#35332
Jan 12, 2008 at 12:00pm

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,
>

#120338
Jan 12, 2008 at 12:07pm

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

#120339
Jan 12, 2008 at 1:35pm

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
>

#120340
Jan 12, 2008 at 1:50pm

!/ 60000.

#120341
Jan 12, 2008 at 3:04pm

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
http://www.timara.oberlin.edu/GaryLeeNelson

#120342
Jan 12, 2008 at 7:37pm

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
> http://www.timara.oberlin.edu/GaryLeeNelson
>
>
>

#120343
Jan 12, 2008 at 9:29pm

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
>> http://www.timara.oberlin.edu/GaryLeeNelson
>> < http://www.timara.oberlin.edu/GaryLeeNelson>
>>
>>
>
>
>

#120344
Jan 13, 2008 at 8:44pm

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.
>
>

#120345
Jan 13, 2008 at 9:14pm

In general,

BPM = 30000/BEAT_IN_MILLISCONDS

or maybe 60000 depending on what you count as a beat

So in Max

expr (30000/\$i1)

#120346
Jan 13, 2008 at 9:28pm

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)
>
>
>
>

#120347
Jan 14, 2008 at 12:31am

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
http://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)
>
>
>

#120348
Jan 14, 2008 at 11:50pm

there is a tempo object.

#120349
Jan 15, 2008 at 2:30am

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
http://www.timara.oberlin.edu/GaryLeeNelson

#120350
Jan 15, 2008 at 4:22pm

http://www.maxobjects.com/?v=objects&id_objet=1550

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.

#120351

You must be logged in to reply to this topic.