music21.stream.enums

GivenElementsBehavior

class music21.stream.enums.GivenElementsBehavior(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)

GivenElementsBehavior bases

RecursionType

class music21.stream.enums.RecursionType(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)

RecursionType bases

ShowNumber

class music21.stream.enums.ShowNumber(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)

ShowNumber bases

StaffType

class music21.stream.enums.StaffType(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)

These are the same as MusicXML staff-type, except uppercase and “other” which reflects any other type. Probably the best way of using “other” is to designate what it means with a .editorial.staffTypeExplanation = ‘other’

>>> stream.enums.StaffType.OSSIA
<StaffType.OSSIA: 'ossia'>

To get the musicxml name:

>>> stream.enums.StaffType.OSSIA.value
'ossia'
>>> stream.enums.StaffType('cue')
<StaffType.CUE: 'cue'>
>>> stream.enums.StaffType('tiny')
Traceback (most recent call last):
ValueError: 'tiny' is not a valid StaffType