Editorial objects store comments and other meta-data associated with specific
Note objects or other music21 objects.
Editorial comments and special effects that can be applied to music21 objects.
>>> a = editorial.Editorial() >>> a.backgroundHighlight = 'yellow' # non-standard. >>> a.backgroundHighlight 'yellow' >>> list(a.keys()) ['backgroundHighlight']
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 >>> n.show('lily.png') # only Lilypond currently supports musica ficta
Editorial instance variables
Accidentalobject 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
Intervalobject that specifies the harmonic interval between this note and a single other note, or None (useful for storing information post analysis)
Intervalobject 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.