music21.lily.lilyObjects¶
music21 translates to Lilypond format and if Lilypond is installed on the local computer, can automatically generate .pdf, .png, and .svg versions of musical files using Lilypond
this replaces (April 2012) the old LilyString() conversion methods.
The Grammar for Lilypond comes from http://lilypond.org/doc/v2.14/Documentation/notation/lilypond-grammar
LyAlternativeMusic¶
- class music21.lily.lilyObjects.LyAlternativeMusic(musicList=None)¶
LyAlternativeMusic
bases
LyAlternativeMusic
read-only properties
Read-only properties inherited from LyObject
:
Read-only properties inherited from ProtoM21Object
:
LyAlternativeMusic
methods
- LyAlternativeMusic.stringOutput()¶
Methods inherited from LyObject
:
Methods inherited from ProtoM21Object
:
LyAssignment¶
- class music21.lily.lilyObjects.LyAssignment(assignmentId=None, identifierInit=None, propertyPath=None, embeddedScm=None)¶
one of three forms of assignment:
assignment_id ‘=’ identifier_init assignment_id property_path ‘=’ identifier_init embedded_scm
if self.embeddedScm is not None, uses type 3 if self.propertyPath is not None, uses type 2 else uses type 1 or raises an exception.
>>> lyIdInit = lily.lilyObjects.LyIdentifierInit(string='hi') >>> lya = lily.lilyObjects.LyAssignment(assignmentId='title', identifierInit=lyIdInit) >>> print(lya) title = "hi"
Note that you could also pass assignmentId a LyAssignmentId object, but that’s overkill for a lot of things.
LyAssignment
bases
LyAssignment
read-only properties
Read-only properties inherited from LyObject
:
Read-only properties inherited from ProtoM21Object
:
LyAssignment
methods
- LyAssignment.stringOutput()¶
Methods inherited from LyObject
:
Methods inherited from ProtoM21Object
:
LyAssignmentId¶
- class music21.lily.lilyObjects.LyAssignmentId(content=None, isLyricString=False)¶
>>> lyAssignmentId = lily.lilyObjects.LyAssignmentId('title', isLyricString=False) >>> str(lyAssignmentId) 'title'
LyAssignmentId
bases
LyAssignmentId
read-only properties
Read-only properties inherited from LyObject
:
Read-only properties inherited from ProtoM21Object
:
LyAssignmentId
methods
- LyAssignmentId.stringOutput()¶
Methods inherited from LyObject
:
Methods inherited from ProtoM21Object
:
LyBookBlock¶
- class music21.lily.lilyObjects.LyBookBlock(bookBody=None)¶
LyBookBlock
bases
LyBookBlock
read-only properties
Read-only properties inherited from LyObject
:
Read-only properties inherited from ProtoM21Object
:
LyBookBlock
methods
- LyBookBlock.stringOutput()¶
Methods inherited from LyObject
:
Methods inherited from ProtoM21Object
:
LyBookBody¶
- class music21.lily.lilyObjects.LyBookBody(contents=None, bookIdentifier=None)¶
Contains None, bookIdentifier (string?) or one or more of the following:
paperBlock bookPartBlock scoreBlock compositeMusic fullMarkup fullMarkupList lilypondHeader error
>>> lyBookBody = lily.lilyObjects.LyBookBody(bookIdentifier='bookId') >>> lyBookBody.stringOutput() 'bookId'
>>> lyBookBody = lily.lilyObjects.LyBookBody() >>> lyBookBody.stringOutput() is None True
>>> lyBookBody = lily.lilyObjects.LyBookBody(contents=['a', 'b', 'c']) >>> print(lyBookBody.stringOutput()) a b c
LyBookBody
bases
LyBookBody
read-only properties
Read-only properties inherited from LyObject
:
Read-only properties inherited from ProtoM21Object
:
LyBookBody
methods
- LyBookBody.stringOutput()¶
Methods inherited from LyObject
:
Methods inherited from ProtoM21Object
:
LyBookpartBlock¶
- class music21.lily.lilyObjects.LyBookpartBlock(bookpartBody=None)¶
>>> lbb = lily.lilyObjects.LyBookpartBlock() >>> lbb.stringOutput() '\\bookpart { \n\n } \n'
LyBookpartBlock
bases
LyBookpartBlock
read-only properties
Read-only properties inherited from LyObject
:
Read-only properties inherited from ProtoM21Object
:
LyBookpartBlock
methods
- LyBookpartBlock.stringOutput()¶
Methods inherited from LyObject
:
Methods inherited from ProtoM21Object
:
LyBookpartBody¶
- class music21.lily.lilyObjects.LyBookpartBody(contents=None, bookIdentifier=None)¶
Contains None, bookIdentifier (string?) or one or more of the following:
paperBlock scoreBlock compositeMusic fullMarkup fullMarkupList lilypondHeader error
>>> lyBookpartBody = lily.lilyObjects.LyBookpartBody(bookIdentifier='bookId') >>> lyBookpartBody.stringOutput() 'bookId'
>>> lyBookpartBody = lily.lilyObjects.LyBookpartBody() >>> lyBookpartBody.stringOutput() is None True
>>> lyBookpartBody = lily.lilyObjects.LyBookpartBody(contents=['a', 'b', 'c']) >>> print(lyBookpartBody.stringOutput()) a b c
LyBookpartBody
bases
LyBookpartBody
read-only properties
Read-only properties inherited from LyObject
:
Read-only properties inherited from ProtoM21Object
:
LyBookpartBody
methods
- LyBookpartBody.stringOutput()¶
Methods inherited from LyObject
:
Methods inherited from ProtoM21Object
:
LyChordBody¶
- class music21.lily.lilyObjects.LyChordBody(chordBodyElements=None)¶
LyChordBody
bases
LyChordBody
read-only properties
Read-only properties inherited from LyObject
:
Read-only properties inherited from ProtoM21Object
:
LyChordBody
methods
- LyChordBody.stringOutput()¶
Methods inherited from LyObject
:
Methods inherited from ProtoM21Object
:
LyChordBodyElement¶
- class music21.lily.lilyObjects.LyChordBodyElement(parts=None)¶
Contains a note or a drum pitch or a music function:
chord_body_element: pitch exclamations (a string of zero or more ! marks) questions (a string of zero or more ? marks) octave_check post_events | DRUM_PITCH post_events | music_function_chord_body
TODO: only the first form is currently supported in creation
LyChordBodyElement
bases
LyChordBodyElement
read-only properties
Read-only properties inherited from LyObject
:
Read-only properties inherited from ProtoM21Object
:
LyChordBodyElement
methods
- LyChordBodyElement.stringOutput()¶
Methods inherited from LyObject
:
Methods inherited from ProtoM21Object
:
LyCommandElement¶
- class music21.lily.lilyObjects.LyCommandElement(commandType=None, argument=None)¶
LyCommandElement
bases
LyCommandElement
read-only properties
Read-only properties inherited from LyObject
:
Read-only properties inherited from ProtoM21Object
:
LyCommandElement
methods
- LyCommandElement.stringOutput()¶
Methods inherited from LyObject
:
Methods inherited from ProtoM21Object
:
LyCommandEvent¶
- class music21.lily.lilyObjects.LyCommandEvent(commandType=None, argument1=None, argument2=None)¶
LyCommandEvent
bases
LyCommandEvent
read-only properties
Read-only properties inherited from LyObject
:
Read-only properties inherited from ProtoM21Object
:
LyCommandEvent
methods
- LyCommandEvent.stringOutput()¶
Methods inherited from LyObject
:
Methods inherited from ProtoM21Object
:
LyCompositeMusic¶
- class music21.lily.lilyObjects.LyCompositeMusic(prefixCompositeMusic=None, groupedMusicList=None, newLyrics=None)¶
one of LyPrefixCompositeMusic or LyGroupedMusicList stored in self.contents
LyCompositeMusic
bases
LyCompositeMusic
read-only properties
- LyCompositeMusic.contents¶
Read-only properties inherited from LyObject
:
Read-only properties inherited from ProtoM21Object
:
LyCompositeMusic
methods
- LyCompositeMusic.stringOutput()¶
Methods inherited from LyObject
:
Methods inherited from ProtoM21Object
:
LyContextChange¶
- class music21.lily.lilyObjects.LyContextChange(before=None, after=None)¶
>>> lcc = lily.lilyObjects.LyContextChange('x', 'y') >>> str(lcc) '\\change x = y '
LyContextChange
bases
LyContextChange
read-only properties
Read-only properties inherited from LyObject
:
Read-only properties inherited from ProtoM21Object
:
LyContextChange
methods
- LyContextChange.stringOutput()¶
Methods inherited from LyObject
:
Methods inherited from ProtoM21Object
:
LyContextDefMod¶
- class music21.lily.lilyObjects.LyContextDefMod(contextDef=None)¶
one of consists, remove, accepts, defaultchild, denies, alias, type, description, name
LyContextDefMod
bases
LyContextDefMod
read-only properties
Read-only properties inherited from LyObject
:
Read-only properties inherited from ProtoM21Object
:
LyContextDefMod
methods
- LyContextDefMod.stringOutput()¶
Methods inherited from LyObject
:
Methods inherited from ProtoM21Object
:
LyContextDefSpecBlock¶
- class music21.lily.lilyObjects.LyContextDefSpecBlock(contextDefSpecBody=None)¶
LyContextDefSpecBlock
bases
LyContextDefSpecBlock
read-only properties
Read-only properties inherited from LyObject
:
Read-only properties inherited from ProtoM21Object
:
LyContextDefSpecBlock
methods
- LyContextDefSpecBlock.stringOutput()¶
Methods inherited from LyObject
:
Methods inherited from ProtoM21Object
:
LyContextDefSpecBody¶
- class music21.lily.lilyObjects.LyContextDefSpecBody(contextDefIdentifier=None, contextDefSpecBody=None, embeddedScm=None, contextMod=None, contextModification=None)¶
None or one of four forms:
CONTEXT_DEF_IDENTIFIER context_def_spec_body “grobdescriptions” embedded_scm context_def_spec_body context_mod context_def_spec_body context_modification
>>> lyContextBody = lily.lilyObjects.LyContextDefSpecBody(contextDefIdentifier='cdi') >>> lyContextBody.stringOutput() 'cdi'
>>> embedScm = lily.lilyObjects.LyEmbeddedScm('#t') >>> lyContextBody = lily.lilyObjects.LyContextDefSpecBody( ... contextDefSpecBody='body', embeddedScm=embedScm) >>> lyContextBody.stringOutput() 'body \\grobdescriptions #t'
LyContextDefSpecBody
bases
LyContextDefSpecBody
read-only properties
Read-only properties inherited from LyObject
:
Read-only properties inherited from ProtoM21Object
:
LyContextDefSpecBody
methods
- LyContextDefSpecBody.stringOutput()¶
Methods inherited from LyObject
:
Methods inherited from ProtoM21Object
:
LyContextMod¶
- class music21.lily.lilyObjects.LyContextMod(contextDefOrProperty=None, scalar=None)¶
LyContextMod
bases
LyContextMod
read-only properties
Read-only properties inherited from LyObject
:
Read-only properties inherited from ProtoM21Object
:
LyContextMod
methods
- LyContextMod.stringOutput()¶
Methods inherited from LyObject
:
Methods inherited from ProtoM21Object
:
LyContextModList¶
- class music21.lily.lilyObjects.LyContextModList(contents=None, contextModIdentifier=None)¶
contains zero or more LyContextMod objects and an optional contextModIdentifier
LyContextModList
bases
LyContextModList
read-only properties
Read-only properties inherited from LyObject
:
Read-only properties inherited from ProtoM21Object
:
LyContextModList
methods
- LyContextModList.stringOutput()¶
Methods inherited from LyObject
:
Methods inherited from ProtoM21Object
:
LyContextModification¶
- class music21.lily.lilyObjects.LyContextModification(contextModList=None, contextModIdentifier=None, displayWith=True)¶
represents both context_modification and optional_context_mod
but not context_mod!!!!!
LyContextModification
bases
LyContextModification
read-only properties
Read-only properties inherited from LyObject
:
Read-only properties inherited from ProtoM21Object
:
LyContextModification
methods
- LyContextModification.stringOutput()¶
Methods inherited from LyObject
:
Methods inherited from ProtoM21Object
:
LyDirectionLessEvent¶
- class music21.lily.lilyObjects.LyDirectionLessEvent(event=None)¶
represents [‘[’, ‘]’, ‘~’, ‘(’, ‘)’, ‘!’, ‘(’, ‘)’, ‘>’, ‘<’] or an EVENT_IDENTIFIER or a tremolo_type
LyDirectionLessEvent
bases
LyDirectionLessEvent
read-only properties
Read-only properties inherited from LyObject
:
Read-only properties inherited from ProtoM21Object
:
LyDirectionLessEvent
methods
- LyDirectionLessEvent.stringOutput()¶
Methods inherited from LyObject
:
Methods inherited from ProtoM21Object
:
LyDirectionReqdEvent¶
- class music21.lily.lilyObjects.LyDirectionReqdEvent(event=None)¶
LyDirectionReqdEvent
bases
LyDirectionReqdEvent
read-only properties
Read-only properties inherited from LyObject
:
Read-only properties inherited from ProtoM21Object
:
LyDirectionReqdEvent
methods
- LyDirectionReqdEvent.stringOutput()¶
Methods inherited from LyObject
:
Methods inherited from ProtoM21Object
:
LyEmbeddedScm¶
- class music21.lily.lilyObjects.LyEmbeddedScm(content=None)¶
represents Scheme embedded in Lilypond code.
Can be either an SCM_TOKEN (Scheme Token) or SCM_IDENTIFIER String stored in self.content
Note that if any LyEmbeddedScm is found in an output then the output SHOULD be marked as unsafe. But a lot of standard lilypond functions are actually embedded scheme. For instance, clef, which as http://lilypond.org/doc/v2.12/input/lsr/lilypond-snippets/Pitches#Tweaking-clef-properties shows is a macro to run a lot of set commands.
>>> lyScheme = lily.lilyObjects.LyEmbeddedScm('##t') >>> str(lyScheme) '##t'
LyEmbeddedScm
bases
LyEmbeddedScm
read-only properties
Read-only properties inherited from LyObject
:
Read-only properties inherited from ProtoM21Object
:
LyEmbeddedScm
methods
- LyEmbeddedScm.stringOutput()¶
Methods inherited from LyObject
:
Methods inherited from ProtoM21Object
:
LyEventChord¶
- class music21.lily.lilyObjects.LyEventChord(simpleChordElements=None, postEvents=None, chordRepetition=None, multiMeasureRest=None, duration=None, commandElement=None, noteChordElement=None)¶
takes all the parts as a list of up to three elements:
event_chord: simple_chord_elements post_events | CHORD_REPETITION optional_notemode_duration post_events | MULTI_MEASURE_REST optional_notemode_duration post_events | command_element | note_chord_element
simple_chord_elements can be a LySimpleElement object. Or it can be a LyNewChord or LyFigureSpec + Duration once that is done. But there is no LySimpleChordElements object yet.
LyEventChord
bases
LyEventChord
read-only properties
Read-only properties inherited from LyObject
:
Read-only properties inherited from ProtoM21Object
:
LyEventChord
methods
- LyEventChord.stringOutput()¶
Methods inherited from LyObject
:
Methods inherited from ProtoM21Object
:
LyFullMarkup¶
- class music21.lily.lilyObjects.LyFullMarkup(markupTopOrIdentifier=None)¶
LyFullMarkup
bases
LyFullMarkup
read-only properties
Read-only properties inherited from LyObject
:
Read-only properties inherited from ProtoM21Object
:
LyFullMarkup
methods
- LyFullMarkup.stringOutput()¶
Methods inherited from LyObject
:
Methods inherited from ProtoM21Object
:
LyFullMarkupList¶
- class music21.lily.lilyObjects.LyFullMarkupList(markupListOrIdentifier=None)¶
LyFullMarkupList
bases
LyFullMarkupList
read-only properties
Read-only properties inherited from LyObject
:
Read-only properties inherited from ProtoM21Object
:
LyFullMarkupList
methods
- LyFullMarkupList.stringOutput()¶
Methods inherited from LyObject
:
Methods inherited from ProtoM21Object
:
LyGenTextDef¶
- class music21.lily.lilyObjects.LyGenTextDef(value=None)¶
holds either full_markup, string, or DIGIT
LyGenTextDef
bases
LyGenTextDef
read-only properties
Read-only properties inherited from LyObject
:
Read-only properties inherited from ProtoM21Object
:
LyGenTextDef
methods
- LyGenTextDef.stringOutput()¶
Methods inherited from LyObject
:
Methods inherited from ProtoM21Object
:
LyGroupedMusicList¶
- class music21.lily.lilyObjects.LyGroupedMusicList(simultaneousMusic=None, sequentialMusic=None)¶
one of LySimultaneousMusic or LySequentialMusic
LyGroupedMusicList
bases
LyGroupedMusicList
read-only properties
Read-only properties inherited from LyObject
:
Read-only properties inherited from ProtoM21Object
:
LyGroupedMusicList
methods
- LyGroupedMusicList.stringOutput()¶
Methods inherited from LyObject
:
Methods inherited from ProtoM21Object
:
LyIdentifierInit¶
- class music21.lily.lilyObjects.LyIdentifierInit(scoreBlock=None, bookBlock=None, bookPartBlock=None, outputDef=None, contextDefSpecBlock=None, music=None, postEvent=None, numberExpression=None, string=None, embeddedScm=None, fullMarkup=None, fullMarkupList=None, digit=None, contextModification=None)¶
>>> lyIdInit = lily.lilyObjects.LyIdentifierInit(string='hello') >>> print(lyIdInit) "hello"
LyIdentifierInit
bases
LyIdentifierInit
read-only properties
Read-only properties inherited from LyObject
:
Read-only properties inherited from ProtoM21Object
:
LyIdentifierInit
methods
- LyIdentifierInit.stringOutput()¶
Methods inherited from LyObject
:
Methods inherited from ProtoM21Object
:
LyLayout¶
- class music21.lily.lilyObjects.LyLayout¶
LyLayout
bases
LyLayout
read-only properties
Read-only properties inherited from LyObject
:
Read-only properties inherited from ProtoM21Object
:
LyLayout
methods
- LyLayout.stringOutput()¶
Methods inherited from LyObject
:
Methods inherited from ProtoM21Object
:
LyLilypondHeader¶
- class music21.lily.lilyObjects.LyLilypondHeader(lilypondHeaderBody=None)¶
A header object with a LyHeaderBody
>>> lyh = lily.lilyObjects.LyLilypondHeader() >>> str(lyh) '\\header { } '
LyLilypondHeader
bases
LyLilypondHeader
read-only properties
Read-only properties inherited from LyObject
:
Read-only properties inherited from ProtoM21Object
:
LyLilypondHeader
methods
- LyLilypondHeader.stringOutput()¶
Methods inherited from LyObject
:
Methods inherited from ProtoM21Object
:
LyLilypondHeaderBody¶
- class music21.lily.lilyObjects.LyLilypondHeaderBody(assignments=None)¶
LyLilypondHeaderBody
bases
LyLilypondHeaderBody
read-only properties
Read-only properties inherited from LyObject
:
Read-only properties inherited from ProtoM21Object
:
LyLilypondHeaderBody
methods
- LyLilypondHeaderBody.stringOutput()¶
Methods inherited from LyObject
:
Methods inherited from ProtoM21Object
:
LyLilypondTop¶
- class music21.lily.lilyObjects.LyLilypondTop(contents=None)¶
corresponds to the highest level lilypond object in Appendix C:
`lilypond: /* empty */ | lilypond toplevel_expression | lilypond assignment | lilypond error | lilypond "\invalid"`
error and invalid are not defined by music21
LyLilypondTop
bases
LyLilypondTop
read-only properties
Read-only properties inherited from LyObject
:
Read-only properties inherited from ProtoM21Object
:
LyLilypondTop
methods
- LyLilypondTop.stringOutput()¶
Methods inherited from LyObject
:
Methods inherited from ProtoM21Object
:
LyLyricElement¶
- class music21.lily.lilyObjects.LyLyricElement(lyMarkupOrString=None)¶
Object represents a single Lyric in lilypond.
>>> lle = lily.lilyObjects.LyLyricElement('hel_') >>> lle <music21.lily.lilyObjects.LyLyricElement hel_> >>> print(lle) hel_
LyLyricElement
bases
LyLyricElement
read-only properties
Read-only properties inherited from LyObject
:
Read-only properties inherited from ProtoM21Object
:
LyLyricElement
methods
- LyLyricElement.stringOutput()¶
Methods inherited from LyObject
:
Methods inherited from ProtoM21Object
:
LyLyricMarkup¶
- class music21.lily.lilyObjects.LyLyricMarkup(lyricMarkupOrIdentifier=None, markupTop=None)¶
LyLyricMarkup
bases
LyLyricMarkup
read-only properties
Read-only properties inherited from LyObject
:
Read-only properties inherited from ProtoM21Object
:
LyLyricMarkup
methods
- LyLyricMarkup.stringOutput()¶
Methods inherited from LyObject
:
Methods inherited from ProtoM21Object
:
LyMarkup¶
- class music21.lily.lilyObjects.LyMarkup(simpleMarkup=None, optionalMarkupHeadList=None)¶
LyMarkup
bases
LyMarkup
read-only properties
Read-only properties inherited from LyObject
:
Read-only properties inherited from ProtoM21Object
:
LyMarkup
methods
- LyMarkup.stringOutput()¶
Methods inherited from LyObject
:
Methods inherited from ProtoM21Object
:
LyMarkupBracedList¶
- class music21.lily.lilyObjects.LyMarkupBracedList(listBody=None)¶
LyMarkupBracedList
bases
LyMarkupBracedList
read-only properties
Read-only properties inherited from LyObject
:
Read-only properties inherited from ProtoM21Object
:
LyMarkupBracedList
methods
- LyMarkupBracedList.stringOutput()¶
Methods inherited from LyObject
:
Methods inherited from ProtoM21Object
:
LyMarkupBracedListBody¶
- class music21.lily.lilyObjects.LyMarkupBracedListBody(markupOrMarkupList=None)¶
LyMarkupBracedListBody
bases
LyMarkupBracedListBody
read-only properties
Read-only properties inherited from LyObject
:
Read-only properties inherited from ProtoM21Object
:
LyMarkupBracedListBody
methods
- LyMarkupBracedListBody.stringOutput()¶
Methods inherited from LyObject
:
Methods inherited from ProtoM21Object
:
LyMarkupComposedList¶
- class music21.lily.lilyObjects.LyMarkupComposedList(markupHeadList=None, markupBracedList=None)¶
LyMarkupComposedList
bases
LyMarkupComposedList
read-only properties
Read-only properties inherited from LyObject
:
Read-only properties inherited from ProtoM21Object
:
LyMarkupComposedList
methods
- LyMarkupComposedList.stringOutput()¶
Methods inherited from LyObject
:
Methods inherited from ProtoM21Object
:
LyMarkupList¶
- class music21.lily.lilyObjects.LyMarkupList(markupIdentifierOrList=None)¶
LyMarkupList
bases
LyMarkupList
read-only properties
Read-only properties inherited from LyObject
:
Read-only properties inherited from ProtoM21Object
:
LyMarkupList
methods
- LyMarkupList.stringOutput()¶
Methods inherited from LyObject
:
Methods inherited from ProtoM21Object
:
LyMarkupTop¶
- class music21.lily.lilyObjects.LyMarkupTop(argument1=None, argument2=None)¶
LyMarkupTop
bases
LyMarkupTop
read-only properties
Read-only properties inherited from LyObject
:
Read-only properties inherited from ProtoM21Object
:
LyMarkupTop
methods
- LyMarkupTop.stringOutput()¶
Methods inherited from LyObject
:
Methods inherited from ProtoM21Object
:
LyMock¶
- class music21.lily.lilyObjects.LyMock¶
A test object for trying various music21 to Lily conversions
LyMock
bases
LyMock
read-only properties
Read-only properties inherited from LyObject
:
Read-only properties inherited from ProtoM21Object
:
LyMock
methods
Methods inherited from LyObject
:
Methods inherited from ProtoM21Object
:
LyModeChangingHead¶
- class music21.lily.lilyObjects.LyModeChangingHead(hasContext=False, mode=None)¶
represents both mode_changing_head and mode_changing_head_with_context
.hasContext = False .mode = [‘note’, ‘drum’, ‘figure’, ‘chord’, ‘lyric’]
>>> l = lily.lilyObjects.LyModeChangingHead(hasContext=True, mode='drum') >>> print(l.stringOutput()) \drummode >>> l2 = lily.lilyObjects.LyModeChangingHead(hasContext=False, mode='chord') >>> print(l2.stringOutput()) \chords
LyModeChangingHead
bases
LyModeChangingHead
read-only properties
Read-only properties inherited from LyObject
:
Read-only properties inherited from ProtoM21Object
:
LyModeChangingHead
methods
- LyModeChangingHead.stringOutput()¶
Methods inherited from LyObject
:
Methods inherited from ProtoM21Object
:
LyMultipliedDuration¶
- class music21.lily.lilyObjects.LyMultipliedDuration(stenoDur=None, multiply=None)¶
represents either a simple LyStenoDuration or a list of things that the steno duration should be multiplied by.
if stenoDur is None then output is None – thus also represents optional_notemode_duration
LyMultipliedDuration
bases
LyMultipliedDuration
read-only properties
Read-only properties inherited from LyObject
:
Read-only properties inherited from ProtoM21Object
:
LyMultipliedDuration
methods
- LyMultipliedDuration.stringOutput()¶
Methods inherited from LyObject
:
Methods inherited from ProtoM21Object
:
LyMusic¶
- class music21.lily.lilyObjects.LyMusic(simpleMusic=None, compositeMusic=None)¶
LyMusic
bases
LyMusic
read-only properties
Read-only properties inherited from LyObject
:
Read-only properties inherited from ProtoM21Object
:
LyMusic
methods
- LyMusic.stringOutput()¶
Methods inherited from LyObject
:
Methods inherited from ProtoM21Object
:
LyMusicList¶
- class music21.lily.lilyObjects.LyMusicList(contents=None)¶
can take any number of LyMusic, LyEmbeddedScm, or LyError objects
LyMusicList
bases
LyMusicList
read-only properties
Read-only properties inherited from LyObject
:
Read-only properties inherited from ProtoM21Object
:
LyMusicList
methods
- LyMusicList.stringOutput()¶
Methods inherited from LyObject
:
Methods inherited from ProtoM21Object
:
LyMusicPropertyDef¶
- class music21.lily.lilyObjects.LyMusicPropertyDef(isOnce=False, propertyDef=None)¶
LyMusicPropertyDef
bases
LyMusicPropertyDef
read-only properties
Read-only properties inherited from LyObject
:
Read-only properties inherited from ProtoM21Object
:
LyMusicPropertyDef
methods
- LyMusicPropertyDef.stringOutput()¶
Methods inherited from LyObject
:
Methods inherited from ProtoM21Object
:
LyNewLyrics¶
- class music21.lily.lilyObjects.LyNewLyrics(groupedMusicLists=None)¶
contains a list of LyGroupedMusicList objects or identifiers
LyNewLyrics
bases
LyNewLyrics
read-only properties
Read-only properties inherited from LyObject
:
Read-only properties inherited from ProtoM21Object
:
LyNewLyrics
methods
- LyNewLyrics.stringOutput()¶
Methods inherited from LyObject
:
Methods inherited from ProtoM21Object
:
LyNoteChordElement¶
- class music21.lily.lilyObjects.LyNoteChordElement(chordBody=None, optionalNoteModeDuration=None, postEvents=None)¶
LyNoteChordElement
bases
LyNoteChordElement
read-only properties
Read-only properties inherited from LyObject
:
Read-only properties inherited from ProtoM21Object
:
LyNoteChordElement
methods
- LyNoteChordElement.stringOutput()¶
Methods inherited from LyObject
:
Methods inherited from ProtoM21Object
:
LyNumberExpression¶
- class music21.lily.lilyObjects.LyNumberExpression(numberAndSepList=None)¶
any list of numbers or LyNumberTerms separated by ‘+’ or ‘-’ objects.
LyNumberExpression
bases
LyNumberExpression
read-only properties
Read-only properties inherited from LyObject
:
Read-only properties inherited from ProtoM21Object
:
LyNumberExpression
methods
- LyNumberExpression.stringOutput()¶
Methods inherited from LyObject
:
Methods inherited from ProtoM21Object
:
LyNumberTerm¶
- class music21.lily.lilyObjects.LyNumberTerm(numberAndSepList=None)¶
any list of numbers separated by ‘*’ or ‘/’ strings.
LyNumberTerm
bases
LyNumberTerm
read-only properties
Read-only properties inherited from LyObject
:
Read-only properties inherited from ProtoM21Object
:
LyNumberTerm
methods
- LyNumberTerm.stringOutput()¶
Methods inherited from LyObject
:
Methods inherited from ProtoM21Object
:
LyObject¶
- class music21.lily.lilyObjects.LyObject¶
LyObject is the base class of all other Lily Objects
>>> lyo = lily.lilyObjects.LyObject() >>> lyo.stringOutput() ''
LyObject
bases
LyObject
read-only properties
- LyObject.newlineIndent¶
Read-only properties inherited from ProtoM21Object
:
LyObject
methods
- LyObject.ancestorList()¶
returns a list of all unwrapped parent objects for the current object
- LyObject.comment(stringIn: str) str ¶
returns a comment that is %{ stringIn.strip() %}
(Don’t put %} etc. in comments – it will break the system.)
- LyObject.encloseCurly(arg)¶
- LyObject.getAncestorByClass(classObj, getAncestorNumber=1)¶
- LyObject.getFirstNonNoneAttribute(attributeList)¶
- LyObject.getParent()¶
- LyObject.newlineSeparateStringOutputIfNotNone(contents)¶
- LyObject.quoteString(stringIn)¶
returns a string that is quoted with internal quotation marks backslash’d out and an extra space at the end.
>>> m = lily.lilyObjects.LyObject() >>> print(m.quoteString(r'Hello "there"!')) "Hello \"there\"!"
- LyObject.setAttributes(m21Object)¶
Returns a dictionary and sets self.lilyAttributes to that dictionary, for a m21Object of class classLookup using the mapping of self.m21toLy[classLookup]
>>> class Mock(base.Music21Object): ... pass >>> m = Mock() >>> m.mockAttribute = 32 >>> m.mockAttribute2 = None
>>> lm = lily.lilyObjects.LyMock()
LyMock (our test class) defines mappings for two classes: to LyMock.lilyAttributes:
>>> print(lm.supportedClasses) [...'Mock', ...'Mocker']
Thus, we can get attributes from the Mock class (see setAttributesFromClassObject):
>>> lilyAttributes = lm.setAttributes(m) >>> for x in sorted(lilyAttributes.keys()): ... print(f'{x}: {lilyAttributes[x]}') mock-attribute: 32 mock-attribute-2: None
>>> lilyAttributes is lm.lilyAttributes True
- LyObject.setAttributesFromClassObject(classLookup, m21Object)¶
Returns a dictionary and sets self.lilyAttributes to that dictionary, for a m21Object of class classLookup using the mapping of self.m21toLy[classLookup]
>>> class Mock(base.Music21Object): pass >>> m = Mock() >>> lm = lily.lilyObjects.LyMock()
LyMock (our test class) defines certain mappings from the m21 Mock class to LyMock.lilyAttributes:
>>> for x in sorted(lm.m21toLy['Mock'].keys()): ... print(f"{x}: {lm.m21toLy['Mock'][x]}") mockAttribute: mock-attribute mockAttribute2: mock-attribute-2
Some of these attributes have defaults:
>>> for x in sorted(lm.defaultAttributes.keys()): ... print(f'{x}: {lm.defaultAttributes[x]}') mockAttribute2: 7
>>> m.mockAttribute = 'hello' >>> lilyAttributes = lm.setAttributesFromClassObject('Mock', m) >>> for x in sorted(lilyAttributes.keys()): ... print(f'{x}: {lilyAttributes[x]}') mock-attribute: hello mock-attribute-2: 7
>>> lilyAttributes is lm.lilyAttributes True
- LyObject.setParent(parentObject)¶
- LyObject.stringOutput()¶
Methods inherited from ProtoM21Object
:
LyOctaveCheck¶
- class music21.lily.lilyObjects.LyOctaveCheck(equalOrQuotesOrNone=None)¶
LyOctaveCheck
bases
LyOctaveCheck
read-only properties
Read-only properties inherited from LyObject
:
Read-only properties inherited from ProtoM21Object
:
LyOctaveCheck
methods
- LyOctaveCheck.stringOutput()¶
Methods inherited from LyObject
:
Methods inherited from ProtoM21Object
:
LyOptionalId¶
- class music21.lily.lilyObjects.LyOptionalId(content=None)¶
an optional id setting
LyOptionalId
bases
LyOptionalId
read-only properties
Read-only properties inherited from LyObject
:
Read-only properties inherited from ProtoM21Object
:
LyOptionalId
methods
- LyOptionalId.stringOutput()¶
Methods inherited from LyObject
:
Methods inherited from ProtoM21Object
:
LyOptionalRest¶
- class music21.lily.lilyObjects.LyOptionalRest(rest=False)¶
LyOptionalRest
bases
LyOptionalRest
read-only properties
Read-only properties inherited from LyObject
:
Read-only properties inherited from ProtoM21Object
:
LyOptionalRest
methods
- LyOptionalRest.stringOutput()¶
Methods inherited from LyObject
:
Methods inherited from ProtoM21Object
:
LyOssiaMusic¶
- class music21.lily.lilyObjects.LyOssiaMusic(musicList=None, startstop=True)¶
represents ossia music.
Can be tagged with startStaff and stopStaff if startstop is True
LyOssiaMusic
bases
LyOssiaMusic
read-only properties
Read-only properties inherited from LyObject
:
Read-only properties inherited from ProtoM21Object
:
LyOssiaMusic
methods
- LyOssiaMusic.stringOutput()¶
Methods inherited from LyObject
:
Methods inherited from ProtoM21Object
:
LyOutputDef¶
- class music21.lily.lilyObjects.LyOutputDef(outputDefBody=None)¶
This is an ugly grammar, since it does not close the curly bracket.
LyOutputDef
bases
LyOutputDef
read-only properties
Read-only properties inherited from LyObject
:
Read-only properties inherited from ProtoM21Object
:
LyOutputDef
methods
- LyOutputDef.stringOutput()¶
Methods inherited from LyObject
:
Methods inherited from ProtoM21Object
:
LyOutputDefBody¶
- class music21.lily.lilyObjects.LyOutputDefBody(outputDefHead=None, outputDefIdentifier=None, outputDefBody=None, assignment=None, contextDefSpecBlock=None, error=None)¶
- output_def_body: output_def_head_with_mode_switch ‘{’
- output_def_head_with_mode_switch ‘{’ OUTPUT_DEF_IDENTIFIERoutput_def_body assignmentoutput_def_body context_def_spec_blockoutput_def_body error
LyOutputDefBody
bases
LyOutputDefBody
read-only properties
Read-only properties inherited from LyObject
:
Read-only properties inherited from ProtoM21Object
:
LyOutputDefBody
methods
- LyOutputDefBody.stringOutput()¶
Methods inherited from LyObject
:
Methods inherited from ProtoM21Object
:
LyOutputDefHead¶
- class music21.lily.lilyObjects.LyOutputDefHead(defType=None)¶
defType can be paper, midi, or layout.
>>> lyODH = lily.lilyObjects.LyOutputDefHead() >>> lyODH.defType = 'midi' >>> print(lyODH.stringOutput()) \midi
According to Appendix C, is the same as LyOutputDefHeadWithModeSwitch
LyOutputDefHead
bases
LyOutputDefHead
read-only properties
Read-only properties inherited from LyObject
:
Read-only properties inherited from ProtoM21Object
:
LyOutputDefHead
methods
- LyOutputDefHead.stringOutput()¶
Methods inherited from LyObject
:
Methods inherited from ProtoM21Object
:
LyPaperBlock¶
- class music21.lily.lilyObjects.LyPaperBlock(outputDef=None)¶
LyPaperBlock
bases
LyPaperBlock
read-only properties
Read-only properties inherited from LyObject
:
Read-only properties inherited from ProtoM21Object
:
LyPaperBlock
methods
- LyPaperBlock.stringOutput()¶
Methods inherited from LyObject
:
Methods inherited from ProtoM21Object
:
LyPitch¶
- class music21.lily.lilyObjects.LyPitch(noteNamePitch=None, quotes=None)¶
represents a pitch name and zero or more sup or sub quotes also used for steno_pitch and steno_tonic_pitch
LyPitch
bases
LyPitch
read-only properties
Read-only properties inherited from LyObject
:
Read-only properties inherited from ProtoM21Object
:
LyPitch
methods
- LyPitch.stringOutput()¶
Methods inherited from LyObject
:
Methods inherited from ProtoM21Object
:
LyPostEvent¶
- class music21.lily.lilyObjects.LyPostEvent(arg1=None, arg2=None)¶
LyPostEvent
bases
LyPostEvent
read-only properties
Read-only properties inherited from LyObject
:
Read-only properties inherited from ProtoM21Object
:
LyPostEvent
methods
- LyPostEvent.stringOutput()¶
Methods inherited from LyObject
:
Methods inherited from ProtoM21Object
:
LyPostEvents¶
- class music21.lily.lilyObjects.LyPostEvents(eventList=None)¶
LyPostEvents
bases
LyPostEvents
read-only properties
Read-only properties inherited from LyObject
:
Read-only properties inherited from ProtoM21Object
:
LyPostEvents
methods
- LyPostEvents.stringOutput()¶
Methods inherited from LyObject
:
Methods inherited from ProtoM21Object
:
LyPrefixCompositeMusic¶
- class music21.lily.lilyObjects.LyPrefixCompositeMusic(type=None, genericPrefixMusicScm=None, simpleString=None, optionalId=None, optionalContextMod=None, music=None, fraction=None, repeatedMusic=None, pitchAlsoInChords1=None, pitchAlsoInChords2=None, modeChangingHead=None, groupedMusicList=None, modeChangingHeadWithContext=None, relativeMusic=None, reRhythmedMusic=None)¶
type must be specified. Should be one of:
scheme, context, new, times, repeated, transpose, modeChanging, modeChangingWith, relative, rhythmed
- prefix_composite_music: generic_prefix_music_scm
- “context” simple_string optional_id optional_context_mod music“new” simple_string optional_id optional_context_mod music“times” fraction musicrepeated_music“transpose” pitch_also_in_chords pitch_also_in_chords musicmode_changing_head grouped_music_listmode_changing_head_with_context optional_context_mod grouped_music_listrelative_musicre_rhythmed_music
LyPrefixCompositeMusic
bases
LyPrefixCompositeMusic
read-only properties
Read-only properties inherited from LyObject
:
Read-only properties inherited from ProtoM21Object
:
LyPrefixCompositeMusic
methods
- LyPrefixCompositeMusic.stringOutput()¶
Methods inherited from LyObject
:
Methods inherited from ProtoM21Object
:
LyPropertyOperation¶
- class music21.lily.lilyObjects.LyPropertyOperation(mode=None, value1=None, value2=None, value3=None)¶
Represents:
- property_operation: STRING ‘=’ scalar
- “unset” simple_string“override” simple_string property_path ‘=’ scalar“revert” simple_string embedded_scm
mandatory mode in [‘set’, ‘unset’, ‘override’, ‘revert’]
also represents simple_music_property_def which has the same forms
>>> lpo = lily.lilyObjects.LyPropertyOperation('unset', 'simple') >>> str(lpo) '\\unset simple '
>>> lpo = lily.lilyObjects.LyPropertyOperation('override', 'simple', 'x', 'y') >>> str(lpo) '\\override simple x = y '
>>> lpo = lily.lilyObjects.LyPropertyOperation('revert', 'x', 'y') >>> str(lpo) '\\revert x y '
TODO: should set be given?
LyPropertyOperation
bases
LyPropertyOperation
read-only properties
Read-only properties inherited from LyObject
:
Read-only properties inherited from ProtoM21Object
:
LyPropertyOperation
methods
- LyPropertyOperation.stringOutput()¶
Methods inherited from LyObject
:
Methods inherited from ProtoM21Object
:
LyPropertyPath¶
- class music21.lily.lilyObjects.LyPropertyPath(embeddedScheme=None)¶
represents both property_path and property_path_revved
has one or more of LyEmbeddedScm objects
LyPropertyPath
bases
LyPropertyPath
read-only properties
Read-only properties inherited from LyObject
:
Read-only properties inherited from ProtoM21Object
:
LyPropertyPath
methods
- LyPropertyPath.stringOutput()¶
Methods inherited from LyObject
:
Methods inherited from ProtoM21Object
:
LyReRhythmedMusic¶
- class music21.lily.lilyObjects.LyReRhythmedMusic(groupedMusic=None, newLyrics=None)¶
LyReRhythmedMusic
bases
LyReRhythmedMusic
read-only properties
Read-only properties inherited from LyObject
:
Read-only properties inherited from ProtoM21Object
:
LyReRhythmedMusic
methods
- LyReRhythmedMusic.stringOutput()¶
Methods inherited from LyObject
:
Methods inherited from ProtoM21Object
:
LyRelativeMusic¶
- class music21.lily.lilyObjects.LyRelativeMusic(content=None)¶
relative music
LyRelativeMusic
bases
LyRelativeMusic
read-only properties
Read-only properties inherited from LyObject
:
Read-only properties inherited from ProtoM21Object
:
LyRelativeMusic
methods
- LyRelativeMusic.stringOutput()¶
Methods inherited from LyObject
:
Methods inherited from ProtoM21Object
:
LyRepeatedMusic¶
- class music21.lily.lilyObjects.LyRepeatedMusic(simpleString=None, unsignedNumber=None, music=None, alternativeMusic=None)¶
LyRepeatedMusic
bases
LyRepeatedMusic
read-only properties
Read-only properties inherited from LyObject
:
Read-only properties inherited from ProtoM21Object
:
LyRepeatedMusic
methods
- LyRepeatedMusic.stringOutput()¶
Methods inherited from LyObject
:
Methods inherited from ProtoM21Object
:
LySchemeFunction¶
- class music21.lily.lilyObjects.LySchemeFunction(content=None)¶
Unsupported for now, represents all of:
function_scm_argument: embedded_scm 116 | simple_string 117 function_arglist_music_last: EXPECT_MUSIC function_arglist music 118 function_arglist_nonmusic_last: EXPECT_MARKUP function_arglist full_markup 119 | EXPECT_MARKUP function_arglist simple_string 120 | EXPECT_SCM function_arglist function_scm_argument 121 function_arglist_nonmusic: EXPECT_NO_MORE_ARGS 122 | EXPECT_MARKUP function_arglist_nonmusic full_markup 123 | EXPECT_MARKUP function_arglist_nonmusic simple_string 124 | EXPECT_SCM function_arglist_nonmusic function_scm_argument 125 function_arglist: EXPECT_NO_MORE_ARGS 126 | function_arglist_music_last 127 | function_arglist_nonmusic_last 128 generic_prefix_music_scm: MUSIC_FUNCTION function_arglist
We have usually been using LyEmbeddedScm for this
LySchemeFunction
bases
LySchemeFunction
read-only properties
Read-only properties inherited from LyObject
:
Read-only properties inherited from ProtoM21Object
:
LySchemeFunction
methods
- LySchemeFunction.stringOutput()¶
Methods inherited from LyObject
:
Methods inherited from ProtoM21Object
:
LyScoreBlock¶
- class music21.lily.lilyObjects.LyScoreBlock(scoreBody=None)¶
represents the container for a score ( score { … } )
with all the real stuff being in self.scoreBody
>>> lyScoreBlock = lily.lilyObjects.LyScoreBlock(scoreBody='hello') >>> print(lyScoreBlock) \score { hello }
LyScoreBlock
bases
LyScoreBlock
read-only properties
Read-only properties inherited from LyObject
:
Read-only properties inherited from ProtoM21Object
:
LyScoreBlock
methods
- LyScoreBlock.stringOutput()¶
Methods inherited from LyObject
:
Methods inherited from ProtoM21Object
:
LyScoreBody¶
- class music21.lily.lilyObjects.LyScoreBody(music=None, scoreIdentifier=None, scoreBody=None, lilypondHeader=None, outputDef=None, error=None)¶
represents the contents of a score { contents } block
can take one of the following attributes: music, scoreIdentifier, scoreBody, lilypondHeader, outputDef, error
>>> lsb = lily.lilyObjects.LyScoreBody(scoreIdentifier='score') >>> str(lsb) 'score'
LyScoreBody
bases
LyScoreBody
read-only properties
Read-only properties inherited from LyObject
:
Read-only properties inherited from ProtoM21Object
:
LyScoreBody
methods
- LyScoreBody.stringOutput()¶
Methods inherited from LyObject
:
Methods inherited from ProtoM21Object
:
LyScriptAbbreviation¶
- class music21.lily.lilyObjects.LyScriptAbbreviation(value=None)¶
Holds a script abbreviation (for articulations etc.), one of:
^ + - | > . _
LyScriptAbbreviation
bases
LyScriptAbbreviation
read-only properties
Read-only properties inherited from LyObject
:
Read-only properties inherited from ProtoM21Object
:
LyScriptAbbreviation
methods
- LyScriptAbbreviation.stringOutput()¶
Methods inherited from LyObject
:
Methods inherited from ProtoM21Object
:
LyScriptDir¶
- class music21.lily.lilyObjects.LyScriptDir(value=None)¶
Holds a script direction abbreviation (above below etc), one of:
_ ^ -
LyScriptDir
bases
LyScriptDir
read-only properties
Read-only properties inherited from LyObject
:
Read-only properties inherited from ProtoM21Object
:
LyScriptDir
methods
- LyScriptDir.stringOutput()¶
Methods inherited from LyObject
:
Methods inherited from ProtoM21Object
:
LySequentialMusic¶
- class music21.lily.lilyObjects.LySequentialMusic(musicList=None, displayTag=False, beforeMatter=None)¶
represents sequential music.
Can be explicitly tagged with “sequential” if displayTag is True
LySequentialMusic
bases
LySequentialMusic
read-only properties
Read-only properties inherited from LyObject
:
Read-only properties inherited from ProtoM21Object
:
LySequentialMusic
methods
- LySequentialMusic.stringOutput()¶
Methods inherited from LyObject
:
Methods inherited from ProtoM21Object
:
LySimpleElement¶
- class music21.lily.lilyObjects.LySimpleElement(parts=None)¶
A single note, lyric element, drum pitch or hidden rest:
simple_element: pitch exclamations (a string of zero or more ! marks) questions (a string of zero or more ? marks) octave_check optional_notemode_duration optional_rest | DRUM_PITCH optional_notemode_duration | RESTNAME optional_notemode_duration | lyric_element optional_notemode_duration
LySimpleElement
bases
LySimpleElement
read-only properties
Read-only properties inherited from LyObject
:
Read-only properties inherited from ProtoM21Object
:
LySimpleElement
methods
- LySimpleElement.stringOutput()¶
Methods inherited from LyObject
:
Methods inherited from ProtoM21Object
:
LySimpleMarkup¶
- class music21.lily.lilyObjects.LySimpleMarkup(simpleType='string', argument1=None, argument2=None)¶
simpleType can be ‘string’ (or markup identifier or lyric markup identifier, etc.) or ‘score-body’ or ‘markup-function’
takes 1 required arg, 2nd for markup_function
LySimpleMarkup
bases
LySimpleMarkup
read-only properties
Read-only properties inherited from LyObject
:
Read-only properties inherited from ProtoM21Object
:
LySimpleMarkup
methods
- LySimpleMarkup.stringOutput()¶
Methods inherited from LyObject
:
Methods inherited from ProtoM21Object
:
LySimpleMusic¶
- class music21.lily.lilyObjects.LySimpleMusic(eventChord=None, musicIdentifier=None, musicPropertyDef=None, contextChange=None)¶
LySimpleMusic
bases
LySimpleMusic
read-only properties
Read-only properties inherited from LyObject
:
Read-only properties inherited from ProtoM21Object
:
LySimpleMusic
methods
- LySimpleMusic.stringOutput()¶
Methods inherited from LyObject
:
Methods inherited from ProtoM21Object
:
LySimultaneousMusic¶
- class music21.lily.lilyObjects.LySimultaneousMusic(musicList=None, displayTag=False)¶
represents simultaneous music.
Can be explicitly tagged with ‘simultaneous’ if displayTag is True otherwise encloses in double angle brackets
LySimultaneousMusic
bases
LySimultaneousMusic
read-only properties
Read-only properties inherited from LyObject
:
Read-only properties inherited from ProtoM21Object
:
LySimultaneousMusic
methods
- LySimultaneousMusic.stringOutput()¶
Methods inherited from LyObject
:
Methods inherited from ProtoM21Object
:
LyStenoDuration¶
- class music21.lily.lilyObjects.LyStenoDuration(durationNumber=None, numDots=0)¶
the main thing that we think of as non-tuplet duration.
a duration number followed by one or more dots
>>> lsd = lily.lilyObjects.LyStenoDuration('2', 2) >>> print(lsd) 2..
LyStenoDuration
bases
LyStenoDuration
read-only properties
Read-only properties inherited from LyObject
:
Read-only properties inherited from ProtoM21Object
:
LyStenoDuration
methods
- LyStenoDuration.stringOutput()¶
Methods inherited from LyObject
:
Methods inherited from ProtoM21Object
:
LyTempoEvent¶
- class music21.lily.lilyObjects.LyTempoEvent(tempoRange=None, stenoDuration=None, scalar=None)¶
- tempo_event: “tempo” steno_duration ‘=’ tempo_range
- “tempo” scalar steno_duration ‘=’ tempo_range“tempo” scalar
>>> lte = lily.lilyObjects.LyTempoEvent(scalar='40') >>> str(lte) '\\tempo 40'
More complex:
>>> steno = lily.lilyObjects.LyStenoDuration('quarter') >>> tempoRange = lily.lilyObjects.LyTempoRange(70, 100) >>> lte = lily.lilyObjects.LyTempoEvent(tempoRange=tempoRange, stenoDuration=steno) >>> str(lte) '\\tempo quarter = 70~100 '
>>> lte.scalar = 85 >>> str(lte) '\\tempo 85 quarter = 70~100 '
LyTempoEvent
bases
LyTempoEvent
read-only properties
Read-only properties inherited from LyObject
:
Read-only properties inherited from ProtoM21Object
:
LyTempoEvent
methods
- LyTempoEvent.stringOutput()¶
Methods inherited from LyObject
:
Methods inherited from ProtoM21Object
:
LyTempoRange¶
- class music21.lily.lilyObjects.LyTempoRange(lowestOrOnlyTempo=None, highestTempoOrNone=None)¶
defines either a single tempo or a range
LyTempoRange
bases
LyTempoRange
read-only properties
Read-only properties inherited from LyObject
:
Read-only properties inherited from ProtoM21Object
:
LyTempoRange
methods
- LyTempoRange.stringOutput()¶
Methods inherited from LyObject
:
Methods inherited from ProtoM21Object
:
LyTopLevelExpression¶
- class music21.lily.lilyObjects.LyTopLevelExpression(lilypondHeader=None, bookBlock=None, bookPartBlock=None, scoreBlock=None, compositeMusic=None, fullMarkup=None, fullMarkupList=None, outputDef=None)¶
can contain one of:
lilypondHeader bookBlock bookPartBlock scoreBlock compositeMusic fullMarkup fullMarkupList outputDef
>>> bookBlock = lily.lilyObjects.LyBookBlock() >>> lyTopLevel = lily.lilyObjects.LyTopLevelExpression(bookBlock=bookBlock) >>> str(lyTopLevel) '\\book { } '
LyTopLevelExpression
bases
LyTopLevelExpression
read-only properties
Read-only properties inherited from LyObject
:
Read-only properties inherited from ProtoM21Object
:
LyTopLevelExpression
methods
- LyTopLevelExpression.stringOutput()¶
Methods inherited from LyObject
:
Methods inherited from ProtoM21Object
:
LyTremoloType¶
- class music21.lily.lilyObjects.LyTremoloType(tremTypeOrNone=None)¶
LyTremoloType
bases
LyTremoloType
read-only properties
Read-only properties inherited from LyObject
:
Read-only properties inherited from ProtoM21Object
:
LyTremoloType
methods
- LyTremoloType.stringOutput()¶
Methods inherited from LyObject
:
Methods inherited from ProtoM21Object
: