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.
It's nearly identical to the even more bare-bones ' Overly simple MIDI synth' example, but with one improvement, the addition of the poly object, described below. It works, but it could definitely be improved. 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.