Tutorial

This browser does not have a Java Plug-in.
Get the latest Java Plug-in here.

Play Chord - Produce a single chord Reload page to restart example
A chord is a cluster of notes that sound together. It is convenient to be able to specify a chord as a single event rather than as several notes. This example shows how to specify and play a chord.



The first line imports the SoundCipher library into Processing.

The second line instantiates an instance of SoundCipher, called sc, for use in this program.

The third line sets up a array of pitch values for the chord. In this case a four note C major 7th chord.

The playChord() SoundCipher method takes the pitch array, a dynamic and duration value which is applied to all notes in the chord. The chord is played immediately.