Forums > MaxMSP

### help with Max maths

Apr 28 2012 | 2:18 pm

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.

Apr 28 2012 | 10:37 pm

The [translate] object will handle all of that.

Apr 28 2012 | 11:27 pm

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

```
```
Apr 29 2012 | 11:28 am

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.

Apr 29 2012 | 2:36 pm

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

Viewing 5 posts - 1 through 5 (of 5 total)

Forums > MaxMSP