## help with Max maths

Apr 28, 2012 at 2:18pm

# help with Max maths

I am trying to generate several note lengths via a [phasor~] generating a tempo relative frequency. They way I have done this is by sending the [rate~] an argument to divide the [phasor~] input by a decimal value to equal the frequency of a note length.

For example, [phasor~ 0.5] (120 bpm) to [rate~ 0.25] = 2Hz – which equates to the duration of a 1/4th note at 120bpm

I would like to know the duration of a 1/4 triplet. Does anyone know of any tables out there which provide this information? Or a way of calculating this given all the present information at hand.

#63280
Apr 28, 2012 at 10:37pm

The [translate] object will handle all of that.

#228291
Apr 28, 2012 at 11:27pm

the short answer: [!/ 1.] and determine what to put through it (there are 6 quarter-note triplets in a bar of 4/4, there are 12 eighth-note triplets, etc.) So, 1/6 = 0.1666, a quarter note is 1/4 = 0.25, etc.

longer answer: play with this little patch :)

– Pasted Max Patch, click to expand. –
#228292
Apr 29, 2012 at 11:28am

Thanks you! The other maths question I have is that I am wanting to carry out the equation log127(22000) – as I have been told this equation may help in scaling two objects together. Could anyone help in determining how to write this in Max? I tried the [expr] but I do not seem to be able to get it.

#228293
Apr 29, 2012 at 2:36pm

log base 127 of 22000 is a number, 2.064081

i guess if you replaced 22000 with a variable input then you’d have a valid expression: [expr log(\$f1)/log(127)]

#228294

You must be logged in to reply to this topic.