Music 220b: Lecture Notes 9
Parts, More Item Stream Patterns, Mute & Sprout Containers
Addressing MusicKit Parts with make-part
MusicKit notes use whatever part they want on a one to one basis. Each note (or noteUpdate) in a thread or algorithm can belong to whatever part it wants to regardless of the class that the container has set. For example, see streaming3.lisp for a single algorithm that writes to wave, pluck and fm. make-part is used to create a new MusicKit part that plays one of the recognized SynthPatch classes.
(defvar waver (make-part :name 'waver :flags +system+ :info '("synthPatch:\"Wave1vi\"")))
In mkMidi, each MIDI channel belongs to a separate part. The code in MIDI-multi-mk.lisp creates a part named chan<x> for each of the 16 channels. It then puts the list of parts into an item stream, switching the MIDI channel each note. Putting variable information like the part list into a stream, brings up the next topic:
Silent algorithms are called mutes. Except for the fact that a mute cannot make sound directly it behaves just like any other algorithm. These are useful as conductors of non-mute algorithms, or for other behavior as in the following example which only serves to print its time as it executes.
(length 4 rhythm .5)
Stella [Top-Level]: listen foo
Start time offset: (<cr>=None) <cr>
project... project... project...