Editorial objects store comments and other meta-data associated with specific Note objects or other music21 objects.


class music21.editorial.Editorial

Editorial comments and special effects that can be applied to music21 objects.

>>> a = editorial.Editorial()
>>> a.backgroundHighlight = 'yellow'  # non-standard.
>>> a.backgroundHighlight
>>> list(a.keys())

Every GeneralNote object already has a NoteEditorial object attached to it at object.editorial. Normally you will just change that object instead.

For instance, take the case where a scribe wrote F in the score, knowing that a good singer would automatically sing F-sharp instead. We can store the editorial suggestion to sing F-sharp as a “musica ficta” accidental object:

>>> fictaSharp = pitch.Accidental("Sharp")
>>> n = note.Note("F")
>>> n.editorial.ficta = fictaSharp
>>>'lily.png')  # only Lilypond currently supports musica ficta

Editorial instance variables


a list of Comment objects that represent any comments about the object.


a Accidental object that specifies musica ficta for the note. Will only be displayed in LilyPond and then only if there is no Accidental object on the note itself


a list of Comment objects that represent annotations for the object.


an Interval object that specifies the harmonic interval between this note and a single other note, or None (useful for storing information post analysis)


an Interval object that specifies the melodic interval to the next note in this Part/Voice/Stream, etc.


A dict to hold anything you might like to store.


class music21.editorial.Comment(text=None)

A comment or footnote or something else attached to a note.

>>> c = editorial.Comment('presented as C natural in the 1660 print.')
>>> c.isFootnote = True
>>> c.levelInformation = 'musicological'
>>> n = note.Note('C#4')
>>> n.editorial.footnotes.append(c)
>>> n.editorial.footnotes[0]
<music21.editorial.Comment 'presented as C na...' >

Comment bases

Comment read-only properties

Read-only properties inherited from StyleMixin:

Comment read/write properties

Read/write properties inherited from StyleMixin: