JMSL Tutorial: Hierarchies

Sometimes the children of a JMSL hierarchy play in parallel (ie, all at once). One verse of our song provides an illustration.
            verse1
    __________|_____________
    |       |      |       |
violin1  violin2  viola  cello
 


The example above shows a parent called verse1 with four children: violin1, violin2, viola, and cello.  In JMSL, verse1 would be a ParallelCollection, since it launches its children all at once. Its children would be MusicShapes, which contain the musical data to be played (such as a list of Midi notes).  MusicShape and ParallelCollection both implement the Composable interface, so even though they behave differently, they can be scheduled in the same hierarchy.
 
A hierarchy is a network of parent/child relationships. So even though the diagram above looks similar to the SequentialCollection example, the behavior is different based on the nature of the parent of the collection.

 
 
JMSL (c) Nick Didkovsky, Phil Burk. JMSL is based upon HMSL (c) Phil Burk, Larry Polansky and David Rosenboom.