Use seq to play MIDI files
This patch contains examples of useful messages for playing MIDI files with the seq object.
MIDI cc to control umenu
To get the values of only one particular continuous controller, use the ctlin object, or use the route object to parse the controller data coming out of midiparse. To change one range of values into another, use simple math (usually one multiplication and one addition will be enough), or use the scale object.
Auto-panning MIDI notes
This example demonstrates how to automatically pan MIDI notes with a given speed. The MIDI Continuous Controller 10 is designated for panning; any synth capable of understanding that message will respond appropriately.
Schedule event on next bar
MIDI to Frequency
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.
MIDI Control to VST
Using any MIDI synth VST plug-in, you can control MIDI data such as modulation and volume.
Pitchbend using notein
Managing transpositions for sustained MIDI notes
When transposing the pitch of sustained incoming MIDI notes, you need to be certain that the note-off message has the same transposition. Otherwise, any time more than one note is played, each subsequent note changes the transposition before the previous note receives its note-off message. To solve this you need to keep track of what transposition you give to each incoming note, as illustrated in this example.