This patch demonstrates use of the table and coll objects to read through a data set to automate musical parameters.
When you play a note with MIDI, you usually want the note to sustain as long as the key is held down, then you want it to turn off (either immediately or gradually) when the key is released (when the note-off message is received). Because MIDI is designed to function in real time, in live performance, there is no duration information contained in a note-on message. The duration can only be known once the key has been released.
The line~ object calculates and performs that interpolation, sending out a signal that arrives at a specified destination value in a specified amount of time. Once the signal arrives at that value, it stays there until it receives another message telling it to transition linearly to a new signal value.
This patch shows three different ways to convert MIDI pitch value to frequency.
This example shows how to use the function object for making tendency masks with breakpoint line segment functions (à la Koenig and as explained by Rowe) using a line object to progress through the functions that describe the minimum and maximum of the function’s range.
This patch doesn't do anything musical, but it shows the math formulae that underlie the mtof, ftom, atodb, and dbtoa objects.
This patch demonstrates the technique of wavetable synthesis: using one cycle of a stored waveform as the wave type for a synthesizer tone. The cycle~ object with no argument produces a cosine wave; however, cycle~ can also refer to a waveform stored in a buffer~, and use that as a wavetable. To do that, you need to create a buffer~, store a waveform in it, and then refer to that buffer~ by creating a cycle~ with the same name.
To better understand the function of a mtof object, it can be recreated with an expr object. There are very slight differences between the output of mtof and expr. The differences are pretty minuscule and should not be a problem in most cases, as they are on the order of a few 1/10,000ths of a Hz.
Incoming MIDI control values (0 to 127) from a ctlin object can be scaled with the scale object to cover any desired pitch range (in terms of MIDI pitch number), and that pitch range can then be converted to frequency in Hertz with the mtof MIDI to frequency object.