Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

opensheetmusicdisplay

opensheetmusicdisplay5.4kBSD-3-Clause1.9.0TypeScript support: included

An open source JavaScript engine for displaying MusicXML based on VexFlow.

sheet, music, vexflow, musicxml

readme

OSMD logo OpenSheetMusicDisplay (OSMD)

A MusicXML renderer for the Browser

opensheetmusicdisplay.org
Gitter Appveyor Build status Commitizen friendly

About OSMDDemoKey FeaturesLimitationsHow to Use OSMDSponsor OSMDAbout UsGet In Touch

:star: - Star us on Github - It really helps us a lot!
:pray: - Become our Sponsor - Support our work and receive awesome perks!

About OSMD

OpenSheetMusicDisplay renders MusicXML sheet music in the browser. It is the missing link between MusicXML and VexFlow. Built upon many years of experience in both sheet music interactivity and engraving, it is the perfect solution for app developers seeking to build digital sheet music services.

MusicXML is the de facto standard for exchanging sheet music between music software.
VexFlow is widely used for rendering sheet music. It features an extensive library of musical elements, but each measure and symbol has to be created and positioned by hand in Javascript.

OpenSheetMusicDisplay brings the two together and offers an open source turnkey solution for your digital sheet music project.

Demo

Try the Public Demo to see what OSMD can do.
Learn more about the demo and OSMD in the OSMD Wiki.

Developers can also run a local development demo (see Wiki):

Local OSMD Developer Demo

Key Features

  • Displays MusicXML sheet music in a browser(less) environment (Javascript, Typescript, server-side: browserless NodeJS script)
  • Soon: Audio Playback (work in progress, early access build available for Github sponsors)
  • Uses Vexflow for rendering and (partly) layout
  • Parses most MusicXML tags and integrates it into an accessible and modifiable data model (e.g. to change a note's color)
  • Offers many options (OSMDOptions / EngravingRules): Page Format, Font Family, Positioning, not rendering certain elements like the title or lyrics, etc.
  • Allows modification of the displayed score, like hiding parts or instruments, hiding instrument names, title or composer, a more compact layout, or coloring notes
  • Outputs SVG or PNG, also via nodejs script in the command line, completely browserless (e.g. for server-side rendering)
  • Written in Typescript with complete type information, 100% compatible with Javascript (minified build is .js)
  • Can display tablature (guitar tabs) from MusicXML, including effects like bends and glissandi. Can be combined with treble clef.

 

Limitations

Not all MusicXML tags are (fully) supported:

  • Pedal marks (currently in early access for sponsors)
  • Glissando lines
  • Wavy-line (currently in early access for sponsors)
  • Etc, see OSMD 1.0 Project

Also, OSMD is a renderer, not an interactive sheet music editor. Rendering takes some time, and you can't easily/quickly move notes, place new notes, etc.
(You can, however, manipulate the SVG nodes for instant changes like note re-coloring, see Exploring the Demo | Wiki)

How to Use OSMD


It would be great if free software were sustainable on its own. But to keep on improving and developing OpenSheetMusicDisplay we need your support. Your monthly sponsorship subscription - especially if you are already actively using OSMD - would mean everything to us - it’s a stable way of enabling us to continue our work, and improve and expand OSMD.
Features already available in early access:

  • OSMD Audio Player
  • Native modules + example projects (React Native, Kotlin/Android, Swift/iOS) - NEW!
  • Jianpu Display (Numbered Musical Notation), with playback

Features in the making, potentially available in future:

  • Annotations (Add custom text, music symbols, etc. to the score and export to and import from XML)
  • and more (we're always working on OSMD improvements or additional features, just look at our release history / changelog!)

Besides the early access features, you can get other perks like a personal postcard from the team in Vienna. Check them out at our GitHub sponsors page.

 

And there are other ways to contribute to the community - we plan on starting a blog and newsletter, and sharing our knowledge. We encourage our sponsors to bring up their desired features and pitch blog post ideas.

Though we highly recommend the sponsor route, you can also donate via Paypal:

paypal
Any support is highly appreciated.

About Us

OSMD is made by Phonicscore - a music-tech company based in Vienna. We create solutions for musicians, sheet music publishers, app developers, music stores and researchers:

Our mission is to provide state of the art software solutions for building MusicXML apps and to include the community in a constant thrive for improvement. We want to take away the pain of building music software from scratch and offer a shortcut when it comes to building your next MusicXML sheet music application.

We also want to thank our Github Contributors, who show that with open source many people come together to not only share but improve software.

Get In Touch

To contact us directly, you can:

changelog

1.9.0 (2025-03-20)

Bug Fixes

  • AlignRests: Fix rare null error in Vexflow when AlignRests option used on rest ghost notes (747f3db)
  • Breath Mark: Fix breath mark to the left instead of right of last note in measure in rare cases (#1548) (c567ab7)
  • Chord Symbols: Prevent invisible measures with chord symbols making other measures longer (vertically aligned, in other instruments) (#1444) (aae428e)
  • Courtesy Accidentals: Display courtesy accidentals if given in the XML (#1149, #1096, #747) (were previously ignored) (76ec229)
  • Courtesy accidentals: Fix wrong courtesy accidentals under tied notes in certain cases (#1096) (0d1a12d)
  • Fingering: Fix fingerings reversed in rare situations (#1587) (4953e1c)
  • GraceNote Spacing: Prevent overlap for grace note groups of more than 1 note, clarify settings (17b53c9)
  • Metronome Mark: Fix metronome mark placements with anacrusis (pickup measure) (#1567) (604a984)
  • Metronome: Fix rare null error with metronome expressions (#1553) (b907aa4)
  • MusicPartManagerIterator.CurrentVisibleVoiceEntries: Fix voice entries in sub instrument (e.g. piano left hand) ignored (PR #1580) (4faf7b8)
  • Rehearsal Marks: Fix rehearsal mark not visible if first instrument hidden (#1555) (7b17892)
  • Tabs: Don't switch to classical measure (non-tab) when ClefInstruction given. Don't render clef (#1592) (d3223b9)
  • Tabs: Fix 3-string tab (e.g. Cuban Tres) erroring because Vexflow didn't support 3 staffline setting (#596) (ed67eed)
  • Tabs: Fix bounding boxes for notes and voice entries in tabs. y-position exactly on string now, was 0 before (9c80648)
  • Tabs: Fix collision detection not working for tab notes (5e706b7)
  • Ties: Fix missing tie in rare cases where it was incorrectly deleted (#1530) (21fe371)
  • Ties: Fix missing ties when note duration given incorrectly in MusicXML (exceeding measure) (#1530) (a57e709)
  • Timestamp/Placement: Fix timestamp+placement of Dynamics, Direction and Words nodes (#1581) (688829f)
  • Transpose: Fix notes displayed in wrong octave in OctaveShift (#1556) when transposing to F#, or other edge cases potentially (16572f9)

Features

  • Articulation / Layout: Add option to place accents (>) and other articulations above note even if stem is up (849c719)
  • Fingerings: Able to set fontFamily via voiceEntry.TechnicalInstructions (#737) (b1d55cb)
  • Note: Add Note.CustomNoteheadVFCode (#1562), which allows setting custom vexflow notehead codes (e.g. "vb" for quarter notehead on a whole note) (c53a5a2)
  • Number of Measures per line: Able to set a constant number of measures per line / system (#1579). Add EngravingRules.RenderXMeasuresPerLineAkaSystem (14a3a2a)
  • Rehearsal Marks: Avoid collisions with multiple measure rest numbers. Add EngravingRules.RehearsalMarkYOffsetAddedForRehearsalMarks (9b81825)
  • Tabs X Notehead: Use x notehead from classical notes by default, instead of fret number (#1584). Add options TabUseXNoteheadShapeForTabNote, TabUseXNoteheadAlternativeGlyph, TabXNoteheadScale (da67c02)

1.8.9 (2024-07-15)

Bug Fixes

  • Breath Mark: Fix breath mark beyond measure boundary when placed at end of measure in certain cases (#1548) (765c5dd)
  • Cursor: Fix osmd.cursor.Iterator.CurrentRelativeInMeasureTimestamp not updated when moving/updating cursor (33b54dc)
  • Cursor: osmd.cursor.hidden is now true instead of undefined after first cursor init + render. (30b5ff1)
  • Drawing range: Fix rendering from measure number 1 instead of 2 when drawFromMeasureNumber 2 set if piece has pickup measure. (2352e27)
  • Drawing range: Fix rendering up to measure number 9 instead of 10 when drawUpToMeasureNumber 10 set if piece has pickup measure. (3ec051c)
  • Fingering: Fix fingering order reversed for left fingerings after first note (rules.FingeringPosition = 2) (#1538, #1442, #406) (875d568)
  • GetNearestStaffEntry: Fix sometimes a non-staffentry being returned (e.g. voice entry) (c86587e)
  • Layout: Fix unison notes not displaced, e.g. causing accidental overlap (c4c675a)
  • MeasureNumber: Fix measure.MeasureNumber repeating for two measures late in a piece when they have implicit (pickup) measures later on (4ac1a0a)
  • SingleLine: Fix measure bounding boxes and thus cursor type 3 (measure highlight) for RenderSingleHorizontalStaffline = true (#1533, PR #1244) (e190090)
  • Tabs: Add option not to clear transparent rectangle around tab notes in case Renderer handles transparent as black (#1514) (3fb0e7f)
  • Tuplets: Fix cursor.next() going through complex tuplets in wrong order (#1540), fix display (x-pos) for certain complex tuplets (#1478) (57b3acf)

Features

  • Cursor: Add cursor.Dispose(), make osmd.cursorsOptions public and add jsdoc, which simplifies adding and removing cursors (bba460c)
  • Measure: Add osmd.GraphicSheet.findGraphicalMeasureByMeasureNumber() (7c5a0ff)
  • Measure: Add Sheet.MeasureWidthFactor (scales all measure widths) (#1534, PR #1536). Parse score-partwise.osmdMeasureWidthFactor from XML. (0c79a49)
  • Multi-Measure Rest: Improve bounding box for staffentry in multi-measure rest (MultiRestMeasure) (#506). Helps click events. (a9cad37)
  • OnXMLRead: Make the function public, add definition and jsdoc. (allows to modify XML before parsing) (3722cc6)
  • osmd.GraphicSheet: Add generic GetNearestObject<T>(clickPos) method, e.g. for GraphicalMeasure (2de6b62)
  • SVG: Add SVG groups for lyrics, lyrics dashes (#1531) (742a232)
  • SVG: Add SVG groups for stafflines, measures, instrument braces and brackets (groups) (#1531) (1b264bc)
  • SVG: Added SVGElement property to GraphicalLine, save node from drawLine in drawContinuousDynamic (#1542) (8a890bf)
  • SVG: Save SVGElement for glissando line in drawLine usage (PR #1542), rename to SVGElement (capital E) (8495b7e)
  • WidthFactor: Add SourceMeasure.widthFactor, parse osmdWidthFactor attribute from xml (#1534, PR #1535). Enables shortening individual measures. (0dc770b)

1.8.8 (2024-03-18)

Bug Fixes

  • Barline: Add missing double bar line when location="right" is not supplied in MusicXML (#1522), which is non-mandatory. (b1ed898)
  • Crescendo: Fix wedge offset not used, changing end points of wedges (#1525) (decrescendo too) (7226993)
  • Cursor: Fix color not updated after setting osmd.cursor.CursorOptions.color and calling update(). Add osmd.Cursor getter (f78ff0e)
  • MXL: Fix Sibelius-exported MXL files with UTF-16 encoding erroring on load due to a limitation in JSZip (#1523). (1f11be7)

1.8.7 (2024-02-23)

Bug Fixes

  • Fraction: Return a minimum GCD of 1, preventing NaNs and wrong note x-positions in rare complex rhythms (#1511). Prevent a rare infinite loop that could have otherwise resulted after this change. (84b94c3)
  • Lyricist: Fix collision for very long lyricist name with other elements (rare), apply same default offset as for composer (likely no effect if composer is present too, because of y-alignment) (#1513) (764890c)
  • Tabs: Fix tab tuplet (triplet) x-alignment with classical staffs/instruments vertically, fix EngravingRules.TabBeamsRendered = false edge case showing beams (#1515). Add some EngravingRules. (341f523)
  • Tabs: Fix wrong tab number background color in dark mode / when PageBackgroundColor set (#1514), export tab background as white instead of transparent by default for PNG (11c4446)

1.8.6 (2024-02-02)

Bug Fixes

  • Crescendo: Fix wrong wedge startX in certain multi-instrument scores (further) (#1480, PR #1506) (c2a6def)
  • PageFormat: Fix page 2+ system labels (e.g. part abbreviation) not rendered. Add EngravingRule RenderSystemLabelsAfterFirstPage (PR #1507). (does not affect default endless format) (70013be)
  • Subtitle + Composer: Read and display multiline subtitles and composer lines from XML credit-words tags correctly (PR #1508). Add EngravingRule SheetComposerSubtitleUseLegacyParsing (71e9576)

Note that to restore the old behavior (subtitle and composer as in OSMD <= 1.8.5), you can use the deprecated option osmd.EngravingRules.SheetComposerSubtitleUseLegacyParsing = true, but we recommend adapting your MusicXML files instead, as this option might be removed soon.

  • SVG Export: Fix key signature rendered black instead of invisible in some systems by adding visibility="hidden" to the SVG group. (ec6c209)
  • SVG Export: Fix time signature potentially rendered black instead of invisible in some systems by adding visibility="hidden" to the SVG group. (354d92d)
  • Test: Fix karma-webpack 5.0.1 incompatibility (npm test). Delete karma-webpack patch (dev dependency) (PR #1509) (7fa22db)

Features

  • Lyrics: Make scores with lyrics shorter and more evenly spaced by improving long lyrics padding (#1394, PR #1395, PR #1474) (975c5ee).

See PR #1474 for settings you can fine-tune.

  • Note: add ToStringShortGet and ToStringShort() to Note and GraphicalNote (#1510), shortcut for Pitch.ToStringShort (4221ce3)
  • Pitch: Add ToStringShort method that returns a short string like "F#4" (F#, octave 4). Add getter, e.g. gNote.sourceNote.Pitch?.ToStringShortGet (#1510) (45bdb20)

1.8.5 (2024-01-09)

Bug Fixes

  • Buzz Roll: Fix error in SVG export for buzz rolls (PR #1493, #1413) (e565af1)
  • Crescendo: Fix crescendo wedges for multi instrument scores (#1480, PR #1499) (3d60d46)
  • Noteflight: Fix rare error in erroneous Noteflight samples (#1473) (0695159)
  • Fontstyle: Fix BoldItalic text displayed as Bold instead of BoldItalic (#1487) (0e229dd), closes #1483 #1483
  • Fraction: Fix rare infinite loop with complex rhythms and floating point inaccuracies in greatestCommonDenominator (#1478) (8e33752)
  • In-Measure Clefs: Wrong clef at end of measure no longer appears in certain Sibelius-exported scores (#1461) (dab58b2)
  • Ledger Lines: Fix whole and half rests outside staff lines not having ledger lines (#1142, PR #1463) (e273c1c)
  • Subtitle: Recognize subtitle by credit-type element (even if given y value above title) (#1456) (7c7329f)
  • SVG Export: Fix octave shift bracket text overlapping (#1482) (only affects SVG export via JSDOM script). (e62cd28)
  • Tab Bends: Fix Tab bend moving on second render (re-render) (#1496, PR #1497) (df69d9d)
  • Tabs: Don't show fingerings by default in a tab staff (#1468). Add EngravingRule TabFingeringsRendered (82068b7)
  • Tabs: Don't show time and key signature by default in a tab staff (#1467). Add EngravingRules TabTimeSignatureRendered, TabKeySignatureRendered (10f9c78)
  • Tuplet: Respect show-number="none" (#1460). Add EngravingRule TupletNumberUseShowNoneXMLValue (68320ab)

Features

  • Color: Words nodes / expressions use XML color by default. Add EngravingRule ExpressionsUseXMLColor (#1492, PR #1498) (207fcd4)
  • Expressions: Show words text in bold if given in XML (PR #1471), add tempo expressions like allegro vivace to parsing (4580100)
  • Tabs: Add EngravingRules TabKeySignatureSpacingAdded, TabTimeSignatureSpacingAdded (for tab-only scores). Fix tabs x-alignment broken (no release affected) (#1489, PR #1490) (47cdd11)

1.8.4 (2023-09-19)

Bug Fixes

  • Error: Fix faulty MusicXML files from Sibelius/GuitarPro erroring on open for faulty xml pedal, octaveshift (#1450) (d1ea681)
  • iOS: Fix memory leak when using Canvas on iOS in Safari (#1411) (22d349d)
  • Layout: Fix invisible parts/measures affecting layout, especially when very note-dense (#1444) (8bc6c6c)
  • Lyrics: Fix lyrics position / staffentry x position if there's a whole rest in a secondary voice (#1267). Fix SourceStaffEntry.hasOnlyRests getter (52b7116)
  • Percussion: Fix position of whole rest note for 1-staffline rendering (#1034) (25521e9)
  • Repetitions: Fix volta number not read from ending node text value (Finale) (#1367). Respect print-object="no". (5fb6c56)
  • Subtitle: Fix subtitle sometimes not displayed with certain MusicXML structures (#1456) (642b83d)
  • Wedges: Add missing in-between wedges for multiline crescendo/decrescendo (#1277, PR #1459) (45440a8)

1.8.3 (2023-08-17)

Bug Fixes

  • Chord Symbols: Fix chords not displayed when not above a note, e.g. multiple per note (#1445, PR #1446) (75a2f8a), closes #599 #791 #1443 #1443
  • Chord Symbols: Chord Symbols on whole measure rests now start near the beginning of the measure, not in the middle above the rest note (#1443) (0b7df62)
  • Fingering: Fix multiple fingerings per note not shown/parsed (Sibelius xml syntax) (#1442) (e121c0a)
  • Fingering: Fix fingerings drawn if drawFingerings: false option was set, for above/below position (6233d5a), closes #650 #1442
  • OctaveShift: Fix error for multiline shifts when (first) instrument hidden (#1439) (c3d3402)
  • OctaveShift: Fix short octave shifts (single note) overlapping text+bracket (#1440, #1378). Add EngravingRule OctaveShiftOnWholeMeasureNoteUntilEndOfMeasure (7ea0911)
  • Tabs: Fix tab notes not x-aligned vertically when multiple ghost notes needed (#1062) (6495011)

Features

  • API: Add osmd.EngravingRules.RenderCount (how many times render() was called) (#1383, #1420) (1e16c6d)
  • Tabs: Tab beams can be disabled optionally. Add EngravingRules.TabRenderBeams (fb78862)

1.8.2 (2023-07-28)

Bug Fixes

  • Measure Numbers: Avoid collisions with group brackets / instrument brackets (shift measure numbers upwards) (a43875f), closes #1430
  • Metronome Marks: Prevent multiple metronome marks per measure drawn (#1393). (Side effect: some marks less bold) (c457922)
  • Tabs: Fix errors for faulty tab xml files, add info log when fret, string missing (#1432) (6b65369)
  • Build: Fix npm install with node v18 and on MacOS when OSMD is a dependency, updating gl dependency etc (#1433)

Features

  • Tempo: Render more tempo expressions like poco meno (#1431) by treating them as instant expressions graphically (94b3dec)

1.8.1 (2023-07-14)

Bug Fixes

Features

1.8.0 (2023-06-23)

Bug Fixes

  • Beams: Fix beams and noteheads missing in rare cases (#1073) where Vexflow returns denominator 0. (6bf4140)
  • Chord Symbols: Fix chord symbol centering above note for short chords (#1396). Add EngravingRules ChordSymbolExtraXShiftForShortChordSymbols, ChordSymbolExtraXShiftWidthThreshold (3e7ed58), closes #1376
  • Dynamics: Fix crescendo, decrescendo, wedges start x and end x, wedge overlaps. Widen most wedges (#1404) (e1476b4), closes #1405
  • FixedMeasureWidth: Fix not applied to first measure (#1314). Add EngravingRule FixedMeasureWidthUseForPickupMeasures, default false. (c1f86f4)
  • Lyrics, ChordSymbols: Fix measure elongation (to prevent overlaps) applied when lyrics or chord symbols not rendered (#324, #597, #819) (bd0ce39)
  • Lyrics: Fix short lyrics not looking vertically centered below notes. Fix dash overlap in short intervals. (#1407, PR #1408) (6798b69)
  • Repeats: Fix left barline of first measure not allowed to be repeat barline (#1410). Add EngravingRule RepetitionAllowFirstMeasureBeginningRepeatBarline (525c48d)
  • Tuplets: Fix repeated bracketed tuplet missing tuplet number with TupletNumberLimitConsecutiveRepetitions enabled (#1402) (c2db9d7), closes #1401 #1401 #1401
  • Tuplets: Fix tuplets not bracketed when not on single beam (e.g. including rest note) (#1400, #1401). Add EngravingRule TupletsBracketedUseXMLValue (a7fde50)
  • Visual Regression Tests: Use lower threshold (#1398). Fix scientific notation causing syntax error for low thresholds/hashes, not working+creating diff (2286564)

Features

  • Cajon: Add Option to fix note placement for 2-staffline cajon (#1409). Add EngravingRules.PercussionUseCajon2NoteSystem (default false) (d2bfb90)
  • Dynamics: Add EngravingRule IgnoreRepeatedDynamics, default false (#767), works for most situations (except e.g. repetition 2nd+ volta) (2fadf05)
  • Lyrics Spacing: Reduce measure sizes for short notes with long lyrics by adding x-padding (#1394, PR #1395). Add EngravingRules.LyricsUseXPaddingForShortNotes, LyricsXPaddingFactorForLongLyrics, LyricsXPaddingWidthThreshold (8e1301f)
  • Options: Add EngravingRules SlurPlacementAtStems, SlurPlacementUseSkybottomLine (default false). Improve slur end articulation detection (#1224) (5384272)
  • Tremolo: Render Buzz Roll (unmeasured tremolo) (#1413). Add EngravingRule TremoloBuzzRollThickness (4b66d1b)
  • Words: Add option to place words inside staffline at defaultY XML value (#1412). Add EngravingRules PlaceWordsInsideStafflineFromXml, PlaceWordsInsideStafflineYOffset (f884ec7)

1.7.6 (2023-06-05)

Bug Fixes

  • OctaveShift: Fix error when octave shift end note/measure not found (e.g. IsExtraGraphicalMeasure). (#1377) (3011019), closes #1378 #1376
  • OctaveShift: Fix octave shift not ending at measure end for multiline and whole measure notes (#1378, PR #1379), make multi-line shift open-ended for in-between stafflines (14493aa), closes #1376
  • OctaveShift: Fix octave shift notes not shifted under certain conditions (end not respected) (#1382, PR #1386) (242dad0)
  • Typo: Rename EngravingRules.AutoGenerateMutipleRestMeasuresFromRestMeasures AutoGenerateMultipleRestMeasuresFromRestMeasures (missing 'l')(PR #1373) (4276613)

Features

  • Copyright: New option to render copyright: osmd.EngravingRules.RenderCopyright = true (renders identification/rights tag) (#1365) (a489d47), closes #353 #727
  • Expressions: Add a few more expressions texts, e.g. ritard. now supported (PR #1361) (e9859a2), closes #1357 #1347
  • FixedMeasureWidth: Add EngravingRules.FixedMeasureWidth and FixedMeasureWidthFixedValue options (#1314, PR #1368) (4c31dde)
  • System/Line break: Add option newSystemFromNewPageInXML to do a system break for XML new-page even when newPageFromXML = false (PR #1357) (f46c5cd)

1.7.5 (2023-03-24)

Bug Fixes

  • Chord Symbols: Fix chord symbols associated with the wrong note/timestamp (#1270, PR #1342) (f36ab0c)
  • Dorico Parsing: Fix slur end missed when slur+tie stops simultaneous/in separate notation elements (PR #1341) (cd4f125)
  • EmptyMeasure: Fix EngravingRules.FillEmptyMeasuresWithWholeRest = 1 (YesVisible) erroring when no voice was created yet (first measure) (#1339) (1c1baf3)
  • Fingering: Don't place above for upper staff if EngravingRules.FingeringPosition was set to Below (#1348, PR #1349) (bdb1f51)
  • Multiple Rest Measures: Fix an issue where the sheet containing pickup measures lead to the isReducedToMultiRest flag not set correctly (#1327) (b5ba101)
  • Multiple Rest Measures: Fix repetition at the end of multiple rest measures not rendered (#1333) (a7278cc)
  • SVG Export / Tabs: Fix tabnote not clearing/painting white rectangle around number (PR #1321) (304076a)

Features

  • Options: Add GraphicalMeasure.ShowKeySignature, EngravingRules.MultipleRestMeasureAddKeySignature options (#1329) (e8439a1)

1.7.4 (2023-02-02)

Bug Fixes

  • Articulation: Support "harmonic" technical notation (naturalharmonic), e.g. drums open hi-hat (8dcaa08)
  • Cursor: Fix cursor.previous() not setting Iterator.currentTimestamp correctly when going back from full measure note (#1309) (66f0e1c)
  • Cursor: Fix EndReached position display when first instrument is hidden (#1310) (e52385f)
  • Cursor: If instrument at current position is now invisible, show the previous position instead of nothing (#1312) (4dd73f5)
  • Cursor: Show last position in score if hiding cursor, moving past end of sheet, then showing, instead of showing nothing (#1308) (d899128)
  • Tremolo: Offset tremolo strokes if note has a beam (e30fcbc)

Features

  • Cursor: If going beyond confines of sheet (previous() at first note, or next() at last note), show cursor visually at start/end of measure (#1308), creating a visual difference to first/last note positions (d091cd9)
  • Glissando: Implement glissando and slide MusicXML elements. Fix tab slides too long. Add EngravingRules.RenderGlissandi. (#1318, PR #1319, #344) (460e920)
  • Glissando: Add EngravingRules.GlissandoDefaultWidth. Add GraphicalGlissando.Color (#1318) (b1e67d5)
  • Tabs: Add Id to tabnotes in SVG/DOM (460e920/tabnote.js)

1.7.3 (2023-01-23)

Bug Fixes

  • Build: Fix ES2017/Android API 28 incompatibility by not using Array.flat() from ES2019 (#1299, PR #1301) (cea8bf8)
  • Cursor: Fix cursor not appearing on show() if previous() was executed when at the start of the sheet, going beyond the beginning (#1303) (a1bfecf)
  • Cursor: Fix cursor.previous() infinite loop after advancing past the end of the sheet (#1302) (601fc64)
  • Cursor: Fix next() skipping first position in score after going beyond beginning of score (e.g. cursor.previous() after cursor.reset()) (#1304) (6b31846)
  • Pedal: Fix Pedal ending at end of measure instead of before last note ([#1291(https://github.com/opensheetmusicdisplay/opensheetmusicdisplay/issues/1291), PR #1305) (09dc868)
  • Slurs: Fix bad slur placement when SlurPlacementFromXML is used (default), but XML doesn't provide placement values (#1298) (d854976)
  • Tuplets: Fix consecutive tuplet label number disabling not respecting note length (#1207, PR #1300) (eb69f32)

Features

  • Pedal: Start at beginning of stave (after modifiers) if start note is whole measure rest (and e.g. measures above it have non-rest notes) (#1306, PR #1307) (92eb9b6)

1.7.2 (2023-01-18)

Bug Fixes

  • Clefs: Fix Clef at measure end in wrong measure if backup nodes used (#1294, PR #1295) (e.g. Sibelius) (9a6aa3f)
  • Build: Fix umlauts in key identifiers error (#1293)

1.7.1 (2022-12-30)

Bug Fixes

  • Build: Make Array prototype changes writeable to prevent conflicts with other libraries (#980, #1288, PR #1289) (f69d532)
  • Lyrics: Fix non-numeric lyric number handling, unnecessary space for unused lyric lines (PR #1284, #1271, #1272) (fac88af)

1.7.0 (2022-12-12)

Bug Fixes

  • Fermata: Fix inverted fermata placement/overlap with multiple voices (#1278, PR #1279) (15e4015)
  • OctaveShift: Fix rare error when startX greater stopX (#1281, PR #1282) (e8d89a0)
  • Overlap: Fix overlap with implicit / pickup measure after repeat with single note pickup (#1286, #1236) (f667f67)
  • Overlap: Fix overlap with implicit / pickup measure without repeat with single note pickup (#1286, #1236) (700be56)
  • Tempo: Increase TempoYSpacing from 0 to 0.5 (prevents (near-)overlaps, no apparent downside) (#1243) (9e584d0)

Features

  • Articulation: Add breath mark support (#527, PR #1285). Add EngravingRules.BreathMarkDistance (default 0.8 = 80%) (f98b9a2)
  • Cursor: Add getter and setter for CursorOptions (#1276) (b1b6492)
  • Pedal: Support pedal. Show (piano) pedal signs and brackets (#347). Add EngravingRule RenderPedals (393b25f)

1.6.1 (2022-11-14)

Bug Fixes

  • Cursor: cursor.next(): Skip positions that only contain invisible notes (#1264) (9805f09)
  • Error: Fix error when dynamics node has no elements, leading to an empty measure (#1269) (5f98841)
  • Repetitions: Fix D.C. Al Coda read as DalSegnoAlCoda (#920) (8ab2a00)
  • Repetitions: Fix repetition symbols like D.C. or Coda too far left (#920, PR #1265). Add EngravingRules.RepetitionEndInstructionXShiftAsPercentOfStaveWidth (4ff0226)
  • Slur: Fix double slur with different placement ignored as "duplicate" (#1275) (fa14941)

Features

  • Cursor: Add cursor.previous(), moving back to previous note, counterpart to next() (#1266) (ddb0189)

1.6.0 (2022-10-28)

Bug Fixes

  • Brackets text: Ignore [ ] square brackets (originally around notes) too with EngravingRules.IgnoreBracketsWords (#1251) (e5b9047)
  • Marcato: Always place above staff (#1261), in line with Gould - Behind Bars (0e7421d)
  • Ties: Set downward tie direction for downward ties split over two systems in vexflow (#1262) (5a155ef)
  • Ties: Use downward arc for ties in secondary voices (#1262) (01398b9)
  • Wedges: Ignore duplicate wedges given in MusicXML (e.g. crescendo) (#1259, PR #1260) (7f235fe)

1.5.8 (2022-10-14)

Bug Fixes

  • BoundingBox: Fix bounding box of MusicSystem and SystemLeftLine too large (#1245) (62cd3fa)
  • BoundingBox: Fix bounding box of voice entries of whole notes with many ledger lines too large (#1245) (30676bf)
  • BoundingBox: Fix PageTopMargin also partly added to a bottom margin / container size in certain cases (#1245) (fa5fa7c)
  • Brackets: Ignore brackets = '( )' words/text by default (#1251) supposed to be around a note, but can't be matched to the note. (32060b7)
  • Margins: Fix page bounding box too long. Respect EngravingRules.PageLeftMargin and PageRightMargin for renderSingleHorizontalStaffline (#643) (dbb1f18), closes #1244

1.5.7 (2022-09-28)

Features

  • Options: Add EngravingRules.TempoYSpacing (#1243) to be able to set spacing/padding for tempo (e.g. beginning "Allegro") (194e765)
  • Performance: Marginal speedup potential for getImageData by using willReadFrequently attribute for CanvasContext. Fix Chrome warning (#1242) (c60c0d6), closes #1241

1.5.6 (2022-09-22)

Bug Fixes

  • Canvas: Fix rehearsal marks not rendered in browser with Canvas backend (a4d5a3b)
  • DefaultColorLyrics: Fix not applied on re-render (aa1945a)
  • DefaultColorMusic: Fix CanvasBackend overwriting and not using DefaultColorMusic (#1218) (285878e)
  • DefaultColorMusic: Fix EngravingRules.DefaultColorMusic not applying to octave brackets, crescendo/decrescendo wedges (#1218) (145e715)
  • DefaultColorMusic: Fix rehearsal marks ignoring defaultColorMusic (#1218) (svgcontext.rect ignoring stroke) (2702667)
  • EngravingRules: Fix GraphicalVoiceEntries creating their own EngravingRules. Reduce EngravingRules creations also via DrawingParameters. (1a96112)
  • Spacing: Fix implicit measure spacing after repeat (#1236). Add EngravingRules.PickupMeasureRepetitionSpacing (3da2244), closes #1234

Features

  • DefaultColorLyrics: Add EngravingRules.DefaultColorLyrics, independent from DefaultColorMusic (#1218) (3445343)

1.5.5 (2022-09-15)

Bug Fixes

  • Drums: Fix Slash notehead overwriting other noteheads in chord/VoiceEntry (#1228) (66390b1), closes #1229
  • Measure Numbers: Fix EngravingRules.RenderMeasureNumbersOnlyAtSystemStart not showing measure number 1 after pickup measure (2e7011f)

1.5.4 (2022-09-12)

Bug Fixes

  • Layout: Fix hiding first instrument causing shift of lyrics, dynamics, etc (#1222) (280075c), closes #1223
  • Slurs: Fix overlap of slurs with accents on slur start note (part of #1224) (229f0dd), closes #1226
  • Slurs: Fix slurs overlapping with articulations like staccato on slur end note (part of #1224) (336b0ad), closes #1225

1.5.3 (2022-09-05)

Bug Fixes

  • Tuplets: Fix rest notes not having TypeLength set. EngravingRules.TupletNumberLimitConsecutiveRepetitions: Fix tuplet count not reset for next voice (rare issue) (#1207) (8d55514)

Features

  • GraceNotes: Reduce unnecessary margin/spacing to main note (#1221). Add EngravingRules.GraceNoteGroupXMargin (default 0) (332d625)
  • Lyrics: Add EngravingRules.LyricsYMarginToBottomLine (#389). New default 0.2 prevents overlap of stems with lyrics. (fd6868d)

1.5.2 (2022-08-29)

Bug Fixes

  • binarySearch: Fix rare infinite loop in CollectionUtil.binarySearch (#1201, merge #1202) (552b23f)

Features

  • Accents: Support soft-accent as crescendo+decrescendo wedge on one note/entry (#1214, merge #1215) (db340ac)
  • Tuplets: Add EngravingRules.TupletNumberLimitConsecutiveRepetitions (default true) etc. (breaking change) #1207, merge #1208 (0744bcd)

1.5.1 (2022-07-18)

Bug Fixes

  • generateImages: Fix rehearsal marks not having a box around them due to node canvas restriction. (48799ba)
  • Layout: Fix 12/8 rhythm with rest measures overflowing notes, other rest measure issues (#1187, merge #1188) (b524d77)
  • Rehearsal Mark: Position correctly when EngravingRules.RehearsalMarkFontSize is increased (#1176) (d32bc1a)

1.5.0 (2022-04-22)

Bug Fixes

  • Cursor: Fix undefined errors when drawFromMeasureNumber changed after cursor was shown (5a13bfb)
  • Tabs: AutoBeamNotes no longer beams tab notes by default. Add EngravingRule AutoBeamTabs (c5fa3eb)
  • Ties: Fix note.NoteTie undefined for tie end note in different voice than start note (8f9c373)

Features

  • ChordSymbols: Can replace accidentals via e.g. osmd.rules.ChordAccidentalTexts.setValue(1, "♭") (PR #1154) (ced5cb4)
  • Performance: 30-60% performance boost: Compute SkyBottomLines with WebGL and in batches depending on browser and number of measures (#1158) (66ab7ce)
  • Performance: Add EngravingRules SkyBottomLineWebGLMinMeasures and AlwaysSetPreferredSkyBottomLineBackendAutomatically (#1158) (e1c8826)
  • Performance: Prefer Plain over WebGL in Firefox (and Safari) for performance (#1158) (1ac2bd5)
  • Performance: Add EngravingRules.DisableWebGLInFirefox and DisableWebGLInSafariAndIOS for options (#1158) (c48f66d)
  • SVG: Create SVG group with class for beamed note stems, put beam SVG into <g> node (67f6ac3)
  • TimeSignatures: Can disable time signature for GraphicalMeasure (#1150) with measure.ShowTimeSignature = false (411a35c)

1.4.5 (2022-01-28)

Bug Fixes

  • Wedges: Simultaneous wedges possible, start/stop corrected (#1131), respect xml number attribute (44a0dce), closes #1134
  • OctaveShift: Fix octave-shift not rendered when type attribute (e.g. "down") not given (even though required) (44a0dce)

Features

  • Options/Clefs: Add osmd.EngravingRules.RenderClefsAtBeginningOfStaffline (#1135) (03cb762)

1.4.4 (2022-01-27)

Bug Fixes

  • Release: Fix types pointing at wrong (sub-)folder. Could solve type/import problems. (2a18295)

Features

  • Options: Able to set osmd.EngravingRules.SheetMaximumWidth > 32767 for SVG / renderSingleHorizontalStaffline (6ef37db)

1.4.3 (2022-01-18)

Bug Fixes

  • Ties: Fix ties not containing all notes, created multiple times (#1126) (a8fe5ae), closes #1097

Features

1.4.2 (2022-01-17)

Bug Fixes

  • Release: Fix typings location for npm release (8171984)

1.4.1 (2022-01-17)

Bug Fixes

  • Credit Error: Fix NaN error when <credit> element has justify attribute (dec2f1f)
  • Release: Fix typings not included in release (1.4.0) (5829be3)

Features

  • Color: Able to set the option {defaultColorMusic: string} (#1125) to apply a color to the whole sheet (2b3ea16)
  • Cursor: Visible with PageBackgroundColor set (SVG) (#1125), transparency dependent on PageBackgroundColor (a10f779)
  • Options: Add darkMode option (#1125) (d5a2d70)

1.4.0 (2022-01-14)

Bug Fixes

  • Beam SVG: VexFlowGraphicalNote.getBeamSVGs() gets SVGs of all beams starting on the note (#1108) (f4675fd)
  • Clefs: Fix specific end of measure clef missing (#1120)
  • Cursor: Fix follow for multiple cursors, can set cursor.cursorOptions.follow for each (#1111) (37f9002)
  • Grace Notes: Don't draw multiple grace note slashes for a set of grace notes (#1107) (89394db)
  • GroupBrackets: Don't draw if only one instrument visible (b72ef4e)
  • Note overlaps: Fix notes overlapping / not staggering sometimes (#1098) (05c1ca7)
  • Cross Stave Notes: Fix ghost notes only created for first few notes in measure, fixing cross stave positioning (#1062) (0507917)
  • Rehearsal Marks: Fix undefined error with multi-measure rests and rehearsal marks (76d5252)
  • Ties: Fix ties missing/doubled, orientations (#1097)

Features

  • ChordSymbols: Add EngravingRules.DefaultColorChordSymbol (#1106) (7f00a9b)
  • Note: Store TransposedPitch (for API access) (72633da)
  • Options: Add EngravingRules.StaggerSameWholeNotes option to x-shift whole notes on same line (#1098) (dc04dc5)
  • Slurs: GraphicalSlurs save their SVGElement (but not GraphicalTies) (5686daa)
  • SVG: Stems and beams have an id in the DOM (#1108) (a9b2c10)
  • Transposing: Able to transpose single instrument (#1115) independently of other instruments (e997df9)
  • VexFlowGraphicalNote: Add getStemSVG() and getBeamSVGs() helper methods (#1108) (79b28c8) (f4675fd)

1.3.1 (2021-11-26)

Bug Fixes

  • Clefs: Fix in-staff clefs missing or misplaced (2nd voice or with backup/forward tags) (#1102) (acdf8b0), closes #1103
  • Metronome: Fix some measures with very long metronome numbers not rendering (70e1654)
  • OctaveShift: Fix incorrect display octave for first of two octave shifts in measure (#1099) (c090c71)

Features

  • GraphicalStaffEntry: Add helper functions getHighestYAtEntry, getSkylineMin, same for bottomline, getAbsoluteStartAndEnd (2b364a8). For usage see Wiki | Exploring the Demo

1.3.0 (2021-11-13)

Bug Fixes

  • Accidentals: Render Slash-flat correctly (#1074) (2394de7)
  • Fingerings: Fix Fingerings collisions above/below notes (#1081), improve performance, implement as Labels with correct bboxes (df9b441), closes #1086
  • Infinite Loop: Fix rare infinite loop with certain rhythms (#1073) (a09f702)
  • Multiple Rest Measures: Display clef at end of multirest measure and fix wrong clef in following measures (#1064) (53a57fe)
  • MusicSystemBuilder: Prevent index error when MinMeasureToDrawIndex > 0 (#1069) (293cfb4)
  • OctaveShift: Fix ExtraGraphicalMeasure used as last measure, no endnote (#1080) (08640e7)
  • Rests: Fix rest collisions with notes (y coordinate) (#621, #1076). Add EngravingRules.RestCollisionYPadding (32b649a)
  • Slash-Flat Accidentals: Fix quarter flats shown after slash-flat accidentals (#1075) (87b681f)
  • Slurs: Fix slur starting on tie end note not shown (#1092) (265fa73)
  • Tuplets: Fix dots not corresponding to XML (#1082) (3899031)

Features

  • Accidentals: Support remaining microtonal accidentals available in MusicXML and Vexflow (#1084) (9ccc215)
  • ChordSymbols: Fix collision with notes, add staffline/measure alignment options (#1087, #934) (d814986)
  • Cursor: Add GNotesUnderCursor() function, returning GraphicalNotes (8c0e2d1)
  • Labels: Always save SVG Node as a reference for GraphicalLabel, allowing SVG manipulation without re-render (f888939), closes #711

1.2.0 (2021-09-23)

Bug Fixes

  • Note X-Positions: Fix Cross Stave Note Position X-Shift and Ghost Notes for complex fractions (#1063) (a04fd58), closes #1062
  • Repeats: Fix Repeat end+start (:||:) collision (#1061) by adding padding (88d7467). Add EngravingRule RepeatEndStartPadding (previous default 0.0, now 2.0)
  • Undefined errors: (#1051) Add some more safeguards for undefined variables in complex/messy midi scores (e0d70bc)

Miscellaneous

  • Dependencies: Update JSZip to 3.7.1

1.1.0 (2021-07-27)

Bug Fixes

  • BPM: Correctly parse float BPM and dotted beats (#1045, merge #1046) (aa2a0e7)
  • ChordSymbols: Prevent multiple rest measure generated over rest measures with chords (#955) (d1e454b)
  • GetNearestNote: Handle undefined parentStaffEntry (#1029, PR #1031) (6ca4a05)
  • Multirest: Fix repetition measures included in multiple rest measure (#901) (e624f6a)
  • Note Alignment: Fix notes not sharing stems/note heads (#414), voices not aligned (#947). Fix visual differences on re-render. (d9aabab)
  • Slurs: Ignore measure numbers, improve staff split slurs, add optional softening mechanism (bc71de7)
  • Tabs: Correctly read number of stafflines if staff-details node is given for multiple staves (#1041) (341b696)

1.0.0 (2021-05-06)

Bug Fixes

  • Barlines: Correctly place thin double line as end barline/StaveConnector (#1019), instead of beginning (eee1c03)
  • Error: Fix error when sorting unpitched note in a chord (#995) (47d7beb)
  • GraphicalNote: Fix getSVGElement throwing exception instead of returning undefined for MultiRestMeasure (b38693d)
  • RepetitionSymbols: Fix d.c., d.s. x position (#990) (eae08cd)
  • SingleStaffline: FollowCursor: Don't center the vertical axis (#1014) (f3bc721)
  • Skyline: Fix bottom line values undefined (#992), fixes issues with PageFormat for tabs (8559527)
  • Tabs: Correctly set number of stafflines, e.g. 4 for bass guitar (#991) (8d83c90)
  • Ties: Highest tie goes upwards (orientation), lower ties downwards (in same location) (d8af331)
  • Ties: Read orientation from XML, reliably set it above/below for chords (#1020) (070de0f)
  • Tuplet/Repeat: Fix tuplet number placement, fix repeat lines across multiple stafflines (StaveConnector) (#1016)
  • Wedges: Fix crescendo/decresc. lengths, positioning, etc (3e65761)

Features

  • Accidentals: Add support for three-quarter flats and sharps (#999) (98a5793)
  • Options: Add osmd.rules.FingeringPositionFromXML (#993), can be auto by setting false now. (d864b9e)
  • Cursors: Can now add multiple cursors, with new options like highlighting the current measure, color and alpha value, see PR 972 and #1005 (comment) for usage.
  • TransposeCalculator: Add TransposeCalculator, allowing arbitrary transposing of sheets by x semitones. Now out of early access and open source thanks to our Github Sponsors. See #733 (comment).

Before 1.0: See CHANGELOG_old.md - the changelog was too big for Github to render, see #1227.