Whether to align rests. 0 = Never, 1 = Always, 2 = Auto. Currently not recommended because rests are now positioned to avoid collisions with notes.
Whether to always set preferred backend (WebGL or Plain) automatically, depending on browser and number of measures.
Whether an accent should by default be placed above the note if its note stem is above. Default false (below). Applies to accents (>/^), staccato (.), pizzicato (+), mainly (in our samples) Note that this can be overwritten if the MusicXML says "placement='below'".
Whether to automatically beam notes that don't already have beams in XML.
Options for autoBeaming like whether to beam over rests. See AutoBeamOptions interface.
Whether to automatically generate new beams for tabs. Also see TabBeamsRendered for existing XML beams.
Percent distance of breath marks to next note or end of staff, e.g. 0.8 = 80%.
Additional x-shift for short chord symbols (e.g. C, but not Eb/7), to appear more centered.
Threshold width below which to apply ChordSymbolExtraXShiftForShortChordSymbols.
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.
Whether the cursor should ignore / skip repetitions (alternative name: SkipRepetitions). False by default
Whether dark mode is enabled. This is read-only, to set this, please use osmd.setOptions({darkMode: true}).
Default color for all musical elements including key signature etc. Default undefined.
Whether to consider using WebGL in Firefox in EngravingRules.setPreferredSkyBottomLineBackendAutomatically()
Whether to consider using WebGL in Safari/iOS in EngravingRules.setPreferredSkyBottomLineBackendAutomatically()
Where to draw fingerings (Above, Below, AboveOrBelow, Left, Right, or Auto). Default AboveOrBelow. Auto experimental.
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()
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.
Caches for the geometric skyline calculation (text measurements, flattened glyph outlines). Owned here (per OSMD instance, like NoteToGraphicalNoteMap) instead of statically, so that multiple OSMD instances stay independent.
Set this to e.g. -0.5 or -0.8 to put grace notes a lot closer to the main note.
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.
X offset applied after label was moved to not overflow the staffline to the left. Without this offset, simply removing the overflow is usually too strict, moving it too far unnecessarily. e.g. see Beethoven Geliebte sample ("Ziemlich langsam")
Internal cache-gate for lazy (renderAppend) rendering: when true, the lazy reuse caches (skyline) are active. Set by OpenSheetMusicDisplay.renderAppend() and forced false by a normal render(), so the caches never affect a non-lazy render. Not a user toggle.
Default alignment of lyrics. Left alignments will extend text to the right of the bounding box, which facilitates spacing by extending measure width.
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.
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
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.
Reduction applied for the last note of a measure when its lyric is a multi-syllable mid-word continuation (a dash trails to the next syllable, which lives in the next measure). Lower than LyricsXPaddingReductionForLastNoteInMeasure because the next measure's first note has a syllable + dash glyph right at its start — the usual measure-end buffer doesn't apply. Set to 0 for maximum cross-measure clearance (no reduction), or up to LyricsXPaddingReductionForLastNoteInMeasure for the same reduction as a normal last note. Default 1.0 (regular note 1.2).
Long notes need less padding than short ones, by default we use 0.7 less padding.
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.
The setting given in osmd.setOptions(), which may lead to a different index if there's a pickup measure.
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).
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
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.
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)
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, if UseGeometricSkyBottomLineCalculation is false. Note that this can be overridden if AlwaysSetPreferredSkyBottomLineBackendAutomatically is true (which is the default).
Lift a rehearsal mark above a chord symbol in the same measure so the two don't overlap, and reserve skyline space for it. The mark is a fixed-offset VexFlow StaveSection that isn't part of the skyline, while chord symbols are placed (earlier) against the skyline and can end up right where the mark goes.
y offset added to avoid collisions of rehearsal marks (e.g. "A" or "Verse") with multiple measure rest numbers.
Whether to render a label for the composer of the piece at the top of the sheet.
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.
Whether to render measure numbers for measures marked implicit (e.g. implicit="yes" in the MusicXML, like pickup measures or measures without a meter as in Satie's Gnossiennes). Default false: implicit measures don't show a measure number, as per the MusicXML standard.
Whether to render slurs that go across staves (e.g. left hand to right hand for piano). Supplementary to [[RenderSlurs]]: with RenderSlurs = true and RenderSlursAcrossStaves = false, all slurs are rendered except the ones across staves.
Whether to render string numbers in classical scores, i.e. not the string numbers in tabs, but e.g. for violin.
Whether two render system labels on page 2+. This doesn't affect the default endless PageFormat.
Whether to render a (default) time signature for samples that don't have a time signature in the source (e.g. MusicXML), like Satie's Gnossiennes. Default false, i.e. these samples are rendered without a time signature, as intended. For normal samples that do have a time signature, this rule has no effect (use RenderTimeSignatures to control those).
Force OSMD to render only x measures per line/system, creating line breaks / system breaks. Disabled if set to 0.
Whether the first measure is allowed to have a left repeat barline, if explicitly given in the MusicXML.
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
Not always a symbol, can also be text (RepetitionInstruction). Keeping the name for backwards compatibility.
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.
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).
Height (size) of the sheet title.
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.
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.
How much a cross-staff slur (e.g. left hand to right hand) bows out, as a factor of the distance between its two notes. See [[SlurCrossStaffMinBow]] and [[SlurCrossStaffMaxBow]] for the limits.
Whether to snap the y positions of stafflines and music systems to positions where the (1px) staff lines render as crisp single pixel rows, instead of being spread (anti-aliased) over two half-covered, gray-ish pixel rows. Default true. This makes the staff line weight consistent across all systems (and across releases: otherwise sub-pixel layout changes shift the anti-aliasing per system, which shows up as bolder/lighter staff lines, e.g. in visual regression tests). Exact at zoom 1 (and its integer multiples), within a page.
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.
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.
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.
Whether to show brackets in tab tuplets. To not render tab tuplets entirely, set TupletNumbersInTabs = false.
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.
Use an X in tabs when the note has an X notehead, e.g. in the staff above in the classical notes, instead of the fret number
Maximum length of the strokes of a tremolo between two notes, as a fraction of the space between the stems (or noteheads for stemless notes). (Gould - Behind Bars: the strokes span about two thirds of the space between the notes)
Maximum vertical rise/fall (slant) of the strokes of a tremolo between two notes, in units.
Vertical gap between the strokes of a tremolo between two notes, in units.
Vertical thickness of one stroke ("tremolo beam") of a tremolo between two notes, in units (1 unit = staff space).
Minimum horizontal padding between the strokes of a tremolo between two notes and the stems (or noteheads for stemless notes), in units.
Vertical padding between the strokes of a tremolo between two notes and the notehead (edge), in units. Stems are lengthened where necessary to make room for the strokes (e.g. for 4+ strokes), as recommended by Gould (Behind Bars).
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)
Whether to show tuplet numbers (and brackets) in tabs. Brackets can be disabled via TabTupletsBracketed.
Whether to use the
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)
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.
Whether tuplets should display ratio (3:2 instead of 3 for triplet). Default false.
Whether to show a ratio when the XML says "show-number: both". Otherwise uses the default TupletsRatioed.
Whether to use the XML offset value for expressions, especially wedges (crescendo). See #1477
Whether to calculate the skyline and bottom-line geometrically, from the extents of the VexFlow draw calls, instead of drawing each measure on a hidden canvas and reading back its pixels (getImageData), which is much slower (see #937). Default true. If set to false, the previous pixel-based calculation is used, see PreferredSkyBottomLineBatchCalculatorBackend etc.
Currently only used in audio player
StaticunitA unit of distance. 1.0 is the distance between lines of a stave for OSMD, which is 10 pixels in Vexflow at osmd.Zoom = 1 (default).
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).
This should be done before a new sheet is loaded, not each re-render (otherwise the map would end empty).
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.
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)