Forums > MaxMSP

use of pow in expr

December 1, 2013 | 8:23 am

approaching msp tutorial 18 i’m having a bit of difficulty understanding the use of "pow" in various mathematical expressions to produce for example, a frequency change of one octave of any incoming signal or the "dBtoA" sub patch which converts amplitude in decibels to a decimal number between 1 and 0.

I guess i’m wondering why the use of pow, why is it so effective for these various purpose and why can i not grasp this??


December 1, 2013 | 9:14 am

Because Fechner. :)


December 1, 2013 | 9:26 am

why could we not use something like scale for the (octave) frequency section of the patch? or for example with the dbtoA sub patch, why not just map the y min to 0 and y max to 1, send the generated y values straight to pack instead of creating an expr that uses -80 db to 0db


December 1, 2013 | 1:14 pm

you could indeed use a database to translate 127 note numbers to 127 values in Hz, or to translate 100 steps from 0 to -90 dB/A into 100 steps from 0 to .1.

but you will still need to use pow(), log(), and exp() to create such a transition table.


December 1, 2013 | 11:59 pm

why not just map the y min to 0 and y max to 1

Is a woman’s beauty found at the top of her head and bottom of her feet?


December 2, 2013 | 11:27 am

Since I’m not sure exactly where the source of your uncertainty lies, I think the best thing I can do is point you to some potentially helpful reading. You might want to do some Google research on "Fechner’s law" and "logarithmic vs. linear". MSP Tutorial 18 discusses mapping MIDI to amplitude, and MSP Tutorials 17 and 19 discuss mapping MIDI to frequency. I also attempt to explain decibel-based control of amplitude in the latter part of this lesson: Fading by means of interpolation. I hope some of that is helpful.
<code>

– Pasted Max Patch, click to expand. –

</code>


December 2, 2013 | 12:50 pm

I think it’s less of a math thing than it is a science thing. For whatever reason, we have certain tendencies of perception. The point of those equations is to make it so the distance between the little notches on a control knob or the keys on a piano match perceived differences. Without those equations, we would have instruments that looked like they were designed by Stradivarius on acid.

I assure you though… if you think sound is a mindfuck, take look at color. The ‘simple’ matter of creating a numerical system to describe uniform differences in color ultimately resulted in the conclusion that color is non-euclidean and impossible to accurately represent, even in 3-dimensions. While we can accurately talk about intervals of sound in terms of euclidean distance and use all sorts of fancy math to create tempered intervals, the world of color lacks similar precision. We come close, but if the physics of vibration suddenly had to deal with the same degree of imprecision, the would of music would be turned on it’s head… It would be a crisis of profound proportion.

So ask yourself… is pow really such a problem? :)


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