Note Object

Represents a single note. Notes belong to Chord objects.

A new Note can be created with:
  note = new Note();
or
  note = new Note(score);
where score is a Score object.

Notes belonging to a given Chord can be accessed with the Chord.note(index) and Chord.topNote() methods of the Chord object.

See also:

Chord Object, Score Object.

Properties

Name Type Description
boundingRect rect the bounding rectangle of the note relative to ???; in raster units (read-only).
color QColor the colour of the note head.
name string the name of the note as a string (read-only).
noteHead integer the note head group (see table below).
pitch integer the MIDI pitch of the note (in the range 0-127).
pos pos the position of the note relative to the page; in raster unit (read-only).
tied integer 0: not tied
1: tied to next note
2: tied to previous note
3: tied to both previous and next note.
tpc integer the tonal pitch class of the note.
tuning integer the tuning adjustment of the note, in +/-cent with respect to default tuning.
visible bool whether the note is visible or not.
userAccidental integer the user-added accidental (see table below), if any; only affected by accidentals which do not change the MIDI pitch, like courtesy accidentals or micro-interval accidentals; if a note only has an accidental which can be deducted from the tpc property, returns 0.
velocity integer the MIDI velocity (loudness) of the note (in the range 0-127).

Methods

None.

Addendum 1: Codes for accidentals

These are the values returned by the userAccidental property.

none 0
# 1 flat-slash 16 sharp arrow up 26
b 2 flat-slash2 17 sharp arrow down 27
## 3 mirrored-flat2 18 sharp arrow both 28
bb 4 mirrored-flat 19 flat arrow up 29
natural 5 mirrored-flat-slash 20 flat arrow down 30
(#) 32769 flat-flat-slash 21 flat arrow both 31
(b) 32770 sharp-slash 22 natural arrow up 32
(##) 32771 sharp-slash2 23 natural arrow down 33
(bb) 32772 sharp-slash3 24 natural arrow both 34
(natural) 32773 sharp-slash4 25 sori 35
koron 36

Addendum 2: Codes for note head

These are the values used when reading from or writing to the noteHead property.

0 normal 7 do
1 cross 8 re
2 diamond 9 fa
3 triangle 10 la
4 mi 11 ti
5 slash 12 sol
6 X-circle 13 alt. brevis