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 and perhaps use pitch zero for ease of
pitch readability too.
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.
Note that phrases can be added to a SCScore object
too. Use the addPhrase() method with takes some
additional arguments; check the documentation for
details.
|