Converting MIDI pitch to frequency
This patch shows three different ways to convert MIDI pitch value to frequency.
This patch shows three different ways to convert MIDI pitch value to frequency.
As expressed in Fechner's law, our subjective sensation of a phenomenon is often proportional to the logarithm of the empirical measurements of the intensity of the physical event that evokes that sensation. One example of that in musical contexts is that our sensation of changes in musical pitch are proportional to the logarithm of the change in the measured fundamental frequency of a tone.
This patch demonstrates the sound of linear and exponential changes in pitch and amplitude.
This patch doesn't do anything musical, but it shows the math formulae that underlie the mtof, ftom, atodb, and dbtoa objects.
The objects mtof and ftom provide easy conversion between MIDI pitch numbers and their equivalent equal-tempered frequency values.
This is an example patch you can use to try out the invertpitch patch shown in "Invert the pitches of MIDI notes". Of course, you will first have to download the patch from that example and save it with the name "invertpitch.maxpat".
If you want to make an oscillator with unstable pitch, you can modulate the pitch of the oscillator using a noise signal as an exponent with a base of 2, and applying that as a multiplier to vary the fundamental frequency. In that way, when the noise ranges from -1 to +1, it will cause a pitch variation of ±1 octave, whatever the fundamental frequency of the oscillator. Divide the amplitude of the noise by 1200 if you want to be able to represent pitch variation in cents.