This patch doesn't do anything musical, but it shows the math formulae that underlie the mtof, ftom, atodb, and dbtoa objects.
This example shows how to control glissando using MIDI. A little bit of revision: MIDI notes can only be played with whole numbers 0-127. Some synths allow you to specify an alternate tuning other than 12-tone equal temperament, but that’s not what we’re after in this case. So, let’s say, if you’re converting frequency to midi note values you will need to calculate the desired pitchbend from the fractional part of the value you obtain from ftom.
The objects mtof and ftom provide easy conversion between MIDI pitch numbers and their equivalent equal-tempered frequency values.