Overly simple MIDI synth

This is a bare-bones monophonic MIDI synthesizer that uses the pitch and velocity information from incoming MIDI note messages to control the frequency and amplitude of a sawtooth waveform. 

This patch uses the MIDI key number (pitch) data byte to set the frequency of a sawtooth oscillator, and it uses the velocity data byte to set the amplitude of the oscillator. Note-on velocity values in the range 1-127 are mapped to a range of decibels from -60 to 0, and those decibel values are then converted to linear amplitude values to scale the amplitude of the oscillator.

MIDI input objects

Max has dedicated objects for parsing each particular type of MIDI channel message coming into the computer, such as notes, pitchbends, controllers, etc., and it has corresponding output objects for formatting and transmitting MIDI messages to be sent out of Max.

Visualize MIDI note value using lcd

This example shows a way to visualize the pitch of a MIDI note on the x axis of a lcd object. The same thing could be done in Jitter with jit.lcd. Whenever you're trying to visualize music or sound, some decisions have to be made about how parameters from one domain (music) will be mapped to the other domain (image). In this case, we've decided to visualize pitch in terms of a circle's left-to-right position.