A musical sequence - a phrase
- can be specified as lists (arrays) of the pitch, dynamic, and
duration values for each note in the phrase. Phrases are useful for
melodies, bass lines, riffs, and so on. Phrases are monophonic in
SoundCipher - that is, they play one note at a time. Phrases must
be contiguous and so to add a break, or a rest, you can
include a silent note - one who's dynamic is set to zero.
The first line makes the soundcipher library availible to your
Processing program.
The second line instantiates (creates) a new SoundCipher object for use
by the program.
The next three lines define arrays of pitch, dynamic and duration
values for each note in the phrase.
The final line takes these data, creates the phrase and plays it back. |