( ⇒ In Musescore press Ctrl+Shift+P, then F1 to bring it up. )
Represents a constituent of a voice and is made of notes (opposed to Rest
, which is silent): voices are made of chords and staves are made of voices. A Chord
may contain one or more Note
s; all the Note
s of a Chord
start and end at the same time.
A new Chord
can be created with: chord = new Chord();
or chord = new Chord(score);
where score is a Score Object
.
The Chord
existing at a given time of a given voice of a given staff of a score can be obtained by moving a Cursor
to the needed staff / voice / time and using:
if ( cursor.isChord() ) chord = cursor.chord();
Cursor Object , Harmony Object , Note Object , Rest Object , Score Object .
Name | Type | Description |
---|---|---|
noStem | boolean | whether the chord has a stem or not. The chord needs to be retrieved from a cursor first |
notes | integer | number of notes in the chord (read-only) |
tickLen | integer | length of the notes in the chord (all notes of a chord have the same length); expressed in conventional units (see Tick Length values ). |
type | integer | type of note(s) (read-only): 0: normal 1: acciaccatura 2: appoggiatura 3: grace 1/4 4: grace1/16 5: grace 1/32 |
Add the Harmony harmony to the chord.
Add Note note to the chord.
Return Note at index index.
Remove from chord the index-th Note.
Return topmost Note of chord (Note at index notes - 1).