From the original blog
Breaking out Instruments
I did a bit more work on Submediant. The goal for this set of changes was to allow the score files to define what kind of instrument to use. Before, we could add multiple instruments but they all used the same basic sine wave generator…
Not only did I want to give the ability of specifying an instrument to the score file, though, I wanted to make creating new types of instruments easily… so I introduced a class hierarchy. Essentially, all instrument objects have a common ancestor, the Instrument. I defined MusicalInstrument as any instrument that knows/understands musical notation. Finally, I defined two children of MusicalInstrument, MusicalSineInstrument which plays a sine wave and MusicalSquareInstrument which plays a square wave. I then found a simple score to transcribe into Submediant… Here is what it sounds like:
According to the description, it’s a Welsh Lullaby arranged for a recorder duet.
In case you’re curious… here’s the Submediant score file: