music21.editorial

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

Editorial

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
'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
../_images/noteEditorialFictaSharp.png

Editorial instance variables

Editorial.comments

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

Editorial.ficta

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

Editorial.footnotes

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

Editorial.harmonicInterval

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

Editorial.melodicInterval

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

Editorial.misc

A dict to hold anything you might like to store.

Comment

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: