A simple trombone model

Basically it's a rectangle wave of varying pulse width fed into the wguide1 opcode, a simple waveguide model. I put envelopes on the pulse width of the rectangle wave, and on the cutoff frequency of wguide1. Those envelopes cause the sound to swell and peak about a third of the way through the duration of the note. Several parameters are computed independently for each note. Firstly, the envelopes are based on a proportion of the duration, so the envelope rate depends on the duration of the note. Secondly, I vary the frequency of the rectangle wave pseudo-randomly by a very small proportion while the note sounds. Thirdly, each note gets its start time and duration adjusted very slightly from what's specified in the midi file, again pseudo-randomly. Here's the orchestra. The instrument is 144. This orchestra is very large since it includes all the instruments I use for anything.