Note that in this patch the QWERTY input has been replaced by MIDI input, and for demonstration purposes Virtual MIDI Keyboard has been used because right now I don't have MIDI hardware to hand.
The note and velocity messages are input from 'notein' and trigger the 'midinote $1 $2' message which tells the poly~ object to assign them to the first available instance of FMSynth that isn't busy. 'Target 0' message is sent to all other inputs of poly~ because the changes made in the number boxes do not always register in every instance, it is sent when the patch is loaded by the 'loadbang' object.
Inside the poly~ object (my FMSynth instance) 'thispoly~' recieves 'mute' messages from the 'adsr~' whenever the envelope reaches 0, which means the voice will be set to busy as soon as there is silence. The MIDI velocity messages are divided by 127 to keep the amp signal between 0 and 1.
My self built volume control for the master amp has been replaced by 'gain~', a slider that automaticly scales signals. By default its values range from 0 to 158, 0 being the equivalent to a zero signal and 128 is the equivalent to 1.0, giving us a little extra headroom to boost weak signals if needed.
A preset control has also been added to the main patch that can store and recall all parameter values in the patch (click to recall, shift-click to store).