This example is strict in that it avoids any JSyn calls directly. It instantiates a SineInstrument, queries it for its MusicDevice, opens an editor to test the device, opens the device, and proceeds. If you follow this slightly more verbose technique, you will be writing code that is flexible and absorbs your future ideas and changes gracefully.
Check the source for this example here. There's some algorithmic tools in the MusicShape building loop that you may not have seen before, like a 1/F generator and Gaussian distribution.
(C) Nick Didkovsky, All Rights Reserved JMSL is based upon HMSL (C) Phil Burk, Larry Polansky and David Rosenboom.