Rendering and Engraving options, more fine-grained than IOSMDOptions.
Not all of these options are meant to be modified by users of the library,
full support is only given for IOSMDOptions.
Nevertheless, there are many useful options here,
like Render* to (not) render certain elements (e.g. osmd.rules.RenderRehearsalMarks = false)
Offset to start of measure (barline) when chord symbol is on whole measure rest.
An offset of 0 would place the chord symbol directly above the barline, so the default is ~1.2.
Where to draw fingerings (Above, Below, AboveOrBelow, Left, Right, or Auto).
Default AboveOrBelow. Auto experimental.
FingeringPositionFromXML
FingeringPositionFromXML:boolean
FingeringPositionGrace
FingeringPositionGrace:PlacementEnum
FingeringTextSize
FingeringTextSize:number
FixedMeasureWidth
FixedMeasureWidth:boolean
Use the same measure width for all measures (experimental).
Note that this will use the largest width of all measures,
as Vexflow will mess up the layout with overlays if using less than minimum width.
See formatter.preCalculateMinTotalWidth()
FixedMeasureWidthFixedValue
FixedMeasureWidthFixedValue:number
Use a fixed width for all measures (experimental).
This is mostly for debugging or for when you already know how big the measures
in the target score are, because using a too low width will cause overlaps in Vexflow.
FixedMeasureWidthUseForPickupMeasures
FixedMeasureWidthUseForPickupMeasures:boolean
FlatBeamOffset
FlatBeamOffset:number
FlatBeamOffsetPerBeam
FlatBeamOffsetPerBeam:number
FlatBeams
FlatBeams:boolean
GlissandoDefaultWidth
GlissandoDefaultWidth:number
GlissandoNoteOffset
GlissandoNoteOffset:number
GlissandoStafflineEndOffset
GlissandoStafflineEndOffset:number
GlissandoStafflineStartMinimumWidth
GlissandoStafflineStartMinimumWidth:number
GlissandoStafflineStartYDistanceToNote
GlissandoStafflineStartYDistanceToNote:number
GraceLineWidth
GraceLineWidth:number
GraceNoteGroupXMargin
GraceNoteGroupXMargin:number
GraceNoteScalingFactor
GraceNoteScalingFactor:number
GraceNoteXOffset
GraceNoteXOffset:number
HorizontalBetweenLyricsDistance
HorizontalBetweenLyricsDistance:number
IdealStemLength
IdealStemLength:number
IgnoreBracketsWords
IgnoreBracketsWords:boolean
Ignore brackets - e.g. ( ) - that were supposed to be around a note,
but were inserted as a words element in the MusicXML, which can't be matched to the note anymore,
and would otherwise just be placed somewhere else. See OSMD Issue 1251.
Default alignment of lyrics.
Left alignments will extend text to the right of the bounding box,
which facilitates spacing by extending measure width.
LyricsExtraXShiftForShortLyrics
LyricsExtraXShiftForShortLyrics:number
Extra x-shift (to the right) for short lyrics to be better vertically aligned.
Also see ChordSymbolExtraXShiftForShortChordSymbols, same principle, same default value.
Threshold of the lyric entry's width below which the x-shift is applied. Default 1.4.
LyricsHeight
LyricsHeight:number
LyricsUseXPaddingForLongLyrics
LyricsUseXPaddingForLongLyrics:boolean
Whether to enable x padding (to the right) for notes with long lyrics, see LyricsXPaddingFactorForLongLyrics for the degree.
This helps avoid overlaps and shorten measures, because otherwise the whole measure needs to be stretched to avoid overlaps,
see MaximumLyricsElongationFactor
LyricsXPaddingFactorForLongLyrics
LyricsXPaddingFactorForLongLyrics:number
How much spacing/padding should be added after notes with long lyrics on short notes
(>4 characters on <8th note),
so that the measure doesn't need to be elongated too much to avoid lyrics collisions.
Default 1 = 10 pixels
Last note in measure needs less padding because of measure bar and bar start/end padding.
LyricsXPaddingReductionForLongNotes
LyricsXPaddingReductionForLongNotes:number
Long notes need less padding than short ones, by default we use 0.7 less padding.
LyricsXPaddingWidthThreshold
LyricsXPaddingWidthThreshold:number
How wide a text needs to be to trigger lyrics padding for short notes.
This is visual width, not number of characters, as e.g. 'zzz' is wider than 'iii'.
Default 3.3.
LyricsYMarginToBottomLine
LyricsYMarginToBottomLine:number
LyricsYOffsetToStaffHeight
LyricsYOffsetToStaffHeight:number
MaxInstructionsConstValue
MaxInstructionsConstValue:number
MaxMeasureToDrawIndex
MaxMeasureToDrawIndex:number
MaxMeasureToDrawNumber
MaxMeasureToDrawNumber:number
The setting given in osmd.setOptions(), which may lead to a different index if there's a pickup measure.
MaxPageToDrawNumber
MaxPageToDrawNumber:number
MaxSystemToDrawNumber
MaxSystemToDrawNumber:number
MaximumLyricsElongationFactor
MaximumLyricsElongationFactor:number
MeasureDynamicsMaxScalingFactor
MeasureDynamicsMaxScalingFactor:number
MeasureLeftMargin
MeasureLeftMargin:number
MeasureNumberLabelHeight
MeasureNumberLabelHeight:number
MeasureNumberLabelOffset
MeasureNumberLabelOffset:number
MeasureNumberLabelXOffset
MeasureNumberLabelXOffset:number
MeasureRightMargin
MeasureRightMargin:number
MetronomeMarkXShift
MetronomeMarkXShift:number
MetronomeMarkYShift
MetronomeMarkYShift:number
MetronomeMarksDrawn
MetronomeMarksDrawn:boolean
MinMeasureToDrawIndex
MinMeasureToDrawIndex:number
MinMeasureToDrawNumber
MinMeasureToDrawNumber:number
The setting given in osmd.setOptions(), which may lead to a different index if there's a pickup measure.
If there's a pickup measure (measure 0), and we want to draw from measure number 2,
we need to skip measure index 0 (the pickup measure).
MinNoteDistance
MinNoteDistance:number
MinSkyBottomDistBetweenStaves
MinSkyBottomDistBetweenStaves:number
MinSkyBottomDistBetweenSystems
MinSkyBottomDistBetweenSystems:number
MinimumCrossedBeamDifferenceMargin
MinimumCrossedBeamDifferenceMargin:number
MinimumDistanceBetweenDashes
MinimumDistanceBetweenDashes:number
MinimumDistanceBetweenSystems
MinimumDistanceBetweenSystems:number
MinimumNeededXspaceForTieGhostObject
MinimumNeededXspaceForTieGhostObject:number
MinimumStaffLineDistance
MinimumStaffLineDistance:number
MoodTextHeight
MoodTextHeight:number
MultipleRestMeasureAddKeySignature
MultipleRestMeasureAddKeySignature:boolean
MultipleRestMeasureDefaultWidth
MultipleRestMeasureDefaultWidth:number
NewPageAtXMLNewPageAttribute
NewPageAtXMLNewPageAttribute:boolean
NewPartAndSystemAfterFinalBarline
NewPartAndSystemAfterFinalBarline:boolean
NewSystemAtXMLNewPageAttribute
NewSystemAtXMLNewPageAttribute:boolean
Whether to begin a new system when a page break is given in XML ('new-page="yes"'), but newPageFromXML is false.
Default false, because it can lead to nonsensical system breaks after a single measure,
as OSMD does a different layout than the original music program exported from.
How many unique note positions a percussion score needs to have to not be rendered on one line.
To always use 5 lines for percussion, set this to 0. (works unless the XML says 1)
Makes the score position notes on the 2 cajon stafflines, and use 2 stafflines even if PercussionOneLineCutoff set.
Should only be set for cajon scores, as this will disable the PercussionOneLineCutoff.
PercussionUseXMLDisplayStep
PercussionUseXMLDisplayStep:boolean
PercussionXMLDisplayStepNoteValueShift
PercussionXMLDisplayStepNoteValueShift:number
PickupMeasureRepetitionSpacing
PickupMeasureRepetitionSpacing:number
The spacing between a repetition that is followed by an implicit/pickup/incomplete measure.
(E.g. in a 4/4 time signature, a measure that repeats after the 3rd beat, continuing with a pickup measure)
PickupMeasureSpacingSingleNoteAddend
PickupMeasureSpacingSingleNoteAddend:number
Multiplier for PickupMeasureRepetitionSpacing if there is only one note in the pickup measure. This usually needs a lot more space.
The skyline and bottom-line batch calculation algorithm to use.
Note that this can be overridden if AlwaysSetPreferredSkyBottomLineBackendAutomatically is true (which is the default).
RehearsalMarkFontSize
RehearsalMarkFontSize:number
RehearsalMarkXOffset
RehearsalMarkXOffset:number
RehearsalMarkXOffsetDefault
RehearsalMarkXOffsetDefault:number
RehearsalMarkXOffsetSystemStartMeasure
RehearsalMarkXOffsetSystemStartMeasure:number
RehearsalMarkYOffset
RehearsalMarkYOffset:number
RehearsalMarkYOffsetDefault
RehearsalMarkYOffsetDefault:number
RenderArpeggios
RenderArpeggios:boolean
RenderChordSymbols
RenderChordSymbols:boolean
RenderClefsAtBeginningOfStaffline
RenderClefsAtBeginningOfStaffline:boolean
RenderComposer
RenderComposer:boolean
Whether to render a label for the composer of the piece at the top of the sheet.
RenderCopyright
RenderCopyright:boolean
RenderCount
RenderCount:number = 0
How many times osmd.render() was already called on the currently loaded score.
Resets after osmd.load() (via osmd.reset()).
Can be relevant for transposition or generally informative.
RenderFingerings
RenderFingerings:boolean
RenderGlissandi
RenderGlissandi:boolean
RenderKeySignatures
RenderKeySignatures:boolean
RenderLyricist
RenderLyricist:boolean
RenderLyrics
RenderLyrics:boolean
RenderMeasureNumbers
RenderMeasureNumbers:boolean
RenderMeasureNumbersOnlyAtSystemStart
RenderMeasureNumbersOnlyAtSystemStart:boolean
RenderMultipleRestMeasures
RenderMultipleRestMeasures:boolean
RenderPartAbbreviations
RenderPartAbbreviations:boolean
RenderPartNames
RenderPartNames:boolean
RenderPedals
RenderPedals:boolean
RenderRehearsalMarks
RenderRehearsalMarks:boolean
RenderSingleHorizontalStaffline
RenderSingleHorizontalStaffline:boolean
RenderSlurs
RenderSlurs:boolean
RenderStringNumbersClassical
RenderStringNumbersClassical:boolean
Whether to render string numbers in classical scores, i.e. not the string numbers in tabs, but e.g. for violin.
RenderSubtitle
RenderSubtitle:boolean
RenderSystemLabelsAfterFirstPage
RenderSystemLabelsAfterFirstPage:boolean
Whether two render system labels on page 2+. This doesn't affect the default endless PageFormat.
Adds a percent of the stave's width (e.g. 0.4 = 40%) to the x position of end instructions like Fine or D.C. al fine
RepetitionEndingLabelHeight
RepetitionEndingLabelHeight:number
RepetitionEndingLabelXOffset
RepetitionEndingLabelXOffset:number
RepetitionEndingLabelYOffset
RepetitionEndingLabelYOffset:number
RepetitionEndingLineYLowerOffset
RepetitionEndingLineYLowerOffset:number
RepetitionEndingLineYUpperOffset
RepetitionEndingLineYUpperOffset:number
RepetitionSymbolsYOffset
RepetitionSymbolsYOffset:number
Not always a symbol, can also be text (RepetitionInstruction). Keeping the name for backwards compatibility.
RestCollisionYPadding
RestCollisionYPadding:number
RestoreCursorAfterRerender
RestoreCursorAfterRerender:boolean
RhythmRightMargin
RhythmRightMargin:number
SamplingUnit
SamplingUnit:number
SetWantedStemDirectionByXml
SetWantedStemDirectionByXml:boolean
SheetAuthorHeight
SheetAuthorHeight:number
SheetComposerHeight
SheetComposerHeight:number
SheetComposerSubtitleUseLegacyParsing
SheetComposerSubtitleUseLegacyParsing:boolean
Whether to use the (deprecated) OSMD < 1.8.6 way of parsing and displaying subtitles and composer,
which did not read multiple lines from XML credit-words tags.
Option will probably be removed soon.
deprecated
SheetCopyrightHeight
SheetCopyrightHeight:number
SheetCopyrightMargin
SheetCopyrightMargin:number
SheetMaximumWidth
SheetMaximumWidth:number
Maximum width of sheet / HTMLElement containing the score. Canvas is limited to 32767 in current browsers, though SVG isn't.
Setting this to > 32767 will break the canvas backend (no problem if you only use SVG).
The minimum number of measures in the sheet where the skyline and bottom-line batch calculation is enabled.
Batch is faster for medium to large size scores, but slower for very short scores.
SkyBottomLineWebGLMinMeasures
SkyBottomLineWebGLMinMeasures:number
The minimum number of measures in the sheet where WebGL will be used. WebGL is slower for short scores, but much faster for large ones.
Note that WebGL is currently never used in Safari and Firefox, because it's always slower there.
SlurEndArticulationYOffset
SlurEndArticulationYOffset:number
SlurHeightFactor
SlurHeightFactor:number
SlurHeightFlattenLongSlursCutoffAngle
SlurHeightFlattenLongSlursCutoffAngle:number
SlurHeightFlattenLongSlursCutoffWidth
SlurHeightFlattenLongSlursCutoffWidth:number
SlurHeightFlattenLongSlursFactorByAngle
SlurHeightFlattenLongSlursFactorByAngle:number
SlurHeightFlattenLongSlursFactorByWidth
SlurHeightFlattenLongSlursFactorByWidth:number
SlurMaximumYControlPointDistance
SlurMaximumYControlPointDistance:number
SlurNoteHeadYOffset
SlurNoteHeadYOffset:number
SlurPlacementAtStems
SlurPlacementAtStems:boolean
SlurPlacementFromXML
SlurPlacementFromXML:boolean
SlurPlacementUseSkyBottomLine
SlurPlacementUseSkyBottomLine:boolean
SlurSlopeMaxAngle
SlurSlopeMaxAngle:number
SlurStartArticulationYOffsetOfArticulation
SlurStartArticulationYOffsetOfArticulation:number
SlurStemXOffset
SlurStemXOffset:number
SlurTangentMaxAngle
SlurTangentMaxAngle:number
SlurTangentMinAngle
SlurTangentMinAngle:number
SlursStartingAtSameStaffEntryYOffset
SlursStartingAtSameStaffEntryYOffset:number
SoftAccentSizeFactor
SoftAccentSizeFactor:number
SoftAccentWedgePadding
SoftAccentWedgePadding:number
SoftmaxFactorVexFlow
SoftmaxFactorVexFlow:number
SpacingBetweenTextLines
SpacingBetweenTextLines:number
StaccatoScalingFactor
StaccatoScalingFactor:number
StaccatoShorteningFactor
StaccatoShorteningFactor:number
StaffDistance
StaffDistance:number
StaffHeight
StaffHeight:number
StaffLineColor
StaffLineColor:string
StaffLineWidth
StaffLineWidth:number
StaggerSameWholeNotes
StaggerSameWholeNotes:boolean
Stagger (x-shift) whole notes that are the same note, but in different voices (show 2 instead of 1).
This is not for tabs, but for classical scores, especially violin.
SubMeasureXSpacingThreshold
SubMeasureXSpacingThreshold:number
SystemBoldLineWidth
SystemBoldLineWidth:number
SystemComposerDistance
SystemComposerDistance:number
SystemDotWidth
SystemDotWidth:number
SystemLabelsRightMargin
SystemLabelsRightMargin:number
SystemLeftMargin
SystemLeftMargin:number
SystemLyricistDistance
SystemLyricistDistance:number
SystemRepetitionEndingLineWidth
SystemRepetitionEndingLineWidth:number
SystemRightMargin
SystemRightMargin:number
SystemThinLineWidth
SystemThinLineWidth:number
TPower3
TPower3:number[]
TabBeamsRendered
TabBeamsRendered:boolean
TabFingeringsRendered
TabFingeringsRendered:boolean
TabKeySignatureRendered
TabKeySignatureRendered:boolean
TabKeySignatureSpacingAdded
TabKeySignatureSpacingAdded:boolean
Whether space should be reserved as if there was a key signature.
False basically only works for tab-only scores, as it prevents vertical x-alignment with other staves.
False is more compact for tab-only scores.
TabStaffInterlineHeight
TabStaffInterlineHeight:number
TabTimeSignatureRendered
TabTimeSignatureRendered:boolean
TabTimeSignatureSpacingAdded
TabTimeSignatureSpacingAdded:boolean
Whether space should be reserved as if there was a key signature.
False basically only works for tab-only scores, as it prevents vertical x-alignment with other staves.
False is more compact for tab-only scores.
TabTupletYOffsetBottom
TabTupletYOffsetBottom:number
TabTupletYOffsetEffects
TabTupletYOffsetEffects:number
TabTupletYOffsetTop
TabTupletYOffsetTop:number
Additional offset applied to top tuplets (added to TabTupletYOffset).
You could apply a negative offset if the piece doesn't have effects like bends,
which often take some vertical space.
TabTupletsBracketed
TabTupletsBracketed:boolean
Whether to show brackets in tab tuplets. To not render tab tuplets entirely, set TupletNumbersInTabs = false.
TempoChangeMeasureValidity
TempoChangeMeasureValidity:number
TempoContinousFactor
TempoContinousFactor:number
TempoYSpacing
TempoYSpacing:number
TieGhostObjectWidth
TieGhostObjectWidth:number
TieHeightInterpolationD
TieHeightInterpolationD:number
TieHeightInterpolationK
TieHeightInterpolationK:number
TieHeightMaximum
TieHeightMaximum:number
TieHeightMinimum
TieHeightMinimum:number
TieYPositionOffsetFactor
TieYPositionOffsetFactor:number
TitleBottomDistance
TitleBottomDistance:number
TitleTopDistance
TitleTopDistance:number
TremoloBuzzRollThickness
TremoloBuzzRollThickness:number
TremoloStrokeScale
TremoloStrokeScale:number
TremoloYSpacingScale
TremoloYSpacingScale:number
TripletsBracketed
TripletsBracketed:boolean
Whether all triplets should be bracketed. Overrides tupletsBracketed for triplets.
If false, only triplets given as bracketed in XML (bracket="yes") will be bracketed.
(Bracketing all triplets can be cluttering)
TupletLineWidth
TupletLineWidth:number
TupletNumberAlwaysDisableAfterFirstMax
TupletNumberAlwaysDisableAfterFirstMax:boolean
TupletNumberLabelHeight
TupletNumberLabelHeight:number
TupletNumberLimitConsecutiveRepetitions
TupletNumberLimitConsecutiveRepetitions:boolean
TupletNumberMaxConsecutiveRepetitions
TupletNumberMaxConsecutiveRepetitions:number
TupletNumberUseShowNoneXMLValue
TupletNumberUseShowNoneXMLValue:boolean
Whether to use the value or to ignore it.
TupletNumberYOffset
TupletNumberYOffset:number
TupletNumbersInTabs
TupletNumbersInTabs:boolean
Whether to show tuplet numbers (and brackets) in tabs. Brackets can be disabled via TabTupletsBracketed.
TupletVerticalLineLength
TupletVerticalLineLength:number
TupletsBracketed
TupletsBracketed:boolean
Whether tuplets (except triplets) should be bracketed (e.g. |--5--| instead of 5). Default false.
Note that this doesn't affect triplets (|--3--|), which have their own setting TripletsBracketed.
If false, only tuplets given as bracketed in XML (bracket="yes") will be bracketed.
(If not given in XML, bracketing is implementation-dependent according to standard)
TupletsBracketedUseXMLValue
TupletsBracketedUseXMLValue:boolean
Whether to bracket like the XML says when 'bracket="no"' or "yes" is given.
Otherwise, OSMD decides bracket usage.
Note that sometimes the XML doesn't have any 'bracket' value.
TupletsRatioed
TupletsRatioed:boolean
Whether tuplets should display ratio (3:2 instead of 3 for triplet). Default false.
UnknownTextHeight
UnknownTextHeight:number
UseEndOffsetForExpressions
UseEndOffsetForExpressions:boolean
Whether to use the XML offset value for expressions, especially wedges (crescendo). See #1477
UsePageBackgroundColorForTabNotes
UsePageBackgroundColorForTabNotes:boolean
UseXMLMeasureNumbers
UseXMLMeasureNumbers:boolean
VerticalBetweenLyricsDistance
VerticalBetweenLyricsDistance:number
VexFlowDefaultNotationFontScale
VexFlowDefaultNotationFontScale:number
VexFlowDefaultTabFontScale
VexFlowDefaultTabFontScale:number
VoiceSpacingAddendVexflow
VoiceSpacingAddendVexflow:number
VoiceSpacingMultiplierVexflow
VoiceSpacingMultiplierVexflow:number
VoltaOffset
VoltaOffset:number
WedgeEndDistanceBetweenTimestampsFactor
WedgeEndDistanceBetweenTimestampsFactor:number
WedgeHorizontalMargin
WedgeHorizontalMargin:number
WedgeLineWidth
WedgeLineWidth:number
WedgeMeasureBeginOpeningLength
WedgeMeasureBeginOpeningLength:number
WedgeMeasureEndOpeningLength
WedgeMeasureEndOpeningLength:number
WedgeMinLength
WedgeMinLength:number
WedgeOpeningLength
WedgeOpeningLength:number
WedgePlacementAboveY
WedgePlacementAboveY:number
WedgePlacementBelowY
WedgePlacementBelowY:number
WedgeVerticalMargin
WedgeVerticalMargin:number
WholeRestXShiftVexflow
WholeRestXShiftVexflow:number
Static unit
unit:number = 1.0
A unit of distance. 1.0 is the distance between lines of a stave for OSMD, which is 10 pixels in Vexflow.
Returns the GraphicalNote corresponding to (its) note. Also used by Cursor.GNotesUnderCursor().
We don't want to save a GraphicalNote reference in Note, see Note.NoteToGraphicalNoteObjectId.
Makes it so that all musical elements (including key/time signature)
are colored with the given color by default,
unless an element has a different color set (e.g. VoiceEntry.StemColor).
Parameters
color: string
Returns void
Private calculateCurveParametersArrays
calculateCurveParametersArrays(): void
Calculate Curve-independend factors, to be used later in the Slur- and TieCurvePoints calculation
Returns void
clearMusicSheetObjects
clearMusicSheetObjects(): void
This should be done before a new sheet is loaded, not each re-render (otherwise the map would end empty).
Rendering and Engraving options, more fine-grained than IOSMDOptions. Not all of these options are meant to be modified by users of the library, full support is only given for IOSMDOptions. Nevertheless, there are many useful options here, like Render* to (not) render certain elements (e.g. osmd.rules.RenderRehearsalMarks = false)