Skip to content

addChord()

Add a chord (several pitches sounded together) to the end of the phrase.

phrase.addChord(listOfPitches, duration)

Parameters

phrase.addChord(listOfPitches, duration, dynamic=85, pan=0.5, length=None)
Parameter Type Default Description
listOfPitches list[int] required The chord's pitches, each a MIDI pitch from 0 to 127.
duration int or float required How long the chord lasts, as a float where 1.0 is a quarter note.
dynamic int 85 How loud the chord is, from 0 to 127.
pan int or float 0.5 The stereo position, from 0.0 (left) through 0.5 (center) to 1.0 (right).
length int or float None How long the chord actually sounds, in the same units as duration. Defaults to 90% of the duration.