MCPcopy
hub / github.com/opensheetmusicdisplay/opensheetmusicdisplay

github.com/opensheetmusicdisplay/opensheetmusicdisplay @2.0.0 sqlite

repository ↗ · DeepWiki ↗ · release 2.0.0 ↗
3,234 symbols 7,201 edges 283 files 604 documented · 19%
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: headless/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 headless/browserless (e.g. for server-side rendering - see generateImages script)
  • 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: * Advanced Pedal marks (down/up brackets and lift wedge currently in early access for sponsors, "Ped." and "*" signs supported) * Tremolo between 2 notes (tremolo on a single note is supported) * Slurs across staves (e.g. from piano left hand to right hand)

Also, OSMD is a renderer, not a full interactive sheet music editor. Rendering takes some time for long scores, and you can't easily/quickly move notes, place new notes, etc.

There are however limited editing features like making notes invisible, coloring, hiding some instruments/staffs, not showing key or time signatures, and so on, see IOSMDOptions and EngravingRules

(You can manipulate the SVG nodes for instant changes like note re-coloring, see Exploring the Demo | Wiki)

How to Use OSMD

Sponsor OSMD and get early access to the audio player and more

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: * Use the Contact form on opensheetmusicdisplay.org to send a mail * Send a mail to support@opensheetmusicdisplay.org * Leave a (public) comment in our Discussions section * Join our Discord (chat) Server * Join the chat on Gitter.

Extension points exported contracts — how you extend this code

ISqueezable (Interface)
(no doc) [2 implementers]
src/MusicalScore/Graphical/ISqueezable.ts
ICapturedLine (Interface)
(no doc)
test/MusicalScore/Graphical/GeometricSkyBottomLine_Test.ts
Array (Interface)
(no doc)
src/Util/CollectionUtil.ts
IRenderNextOptions (Interface)
(no doc)
src/OpenSheetMusicDisplay/OpenSheetMusicDisplay.ts
ICharacterExtents (Interface)
Ink extents of a single character, in px for the font it was measured with. * inkLeft/inkRight are relative to the pen
src/MusicalScore/Graphical/GeometricSkyBottomLineContext.ts
ICompareOptions (Interface)
(no doc)
test/MusicalScore/Graphical/GeometricSkyBottomLine_Test.ts
IRenderNextResult (Interface)
(no doc)
src/OpenSheetMusicDisplay/OpenSheetMusicDisplay.ts
IGeometricContextState (Interface)
Drawing state that can be saved/restored with save()/restore(), mirroring canvas semantics.
src/MusicalScore/Graphical/GeometricSkyBottomLineContext.ts

Core symbols most depended-on inside this repo

push
called by 509
src/Common/DataObjects/MusicSheetErrors.ts
element
called by 176
src/Common/FileIO/Xml.ts
max
called by 165
src/Common/DataObjects/Fraction.ts
attribute
called by 123
src/Common/FileIO/Xml.ts
isStringInStringList
called by 118
src/MusicalScore/VoiceData/Expressions/AbstractExpression.ts
log
called by 86
src/Util/PSMath.ts
setAttribute
called by 64
src/VexFlowPatch/src/element.js
elements
called by 59
src/Common/FileIO/Xml.ts

Shape

Method 2,281
Function 431
Class 429
Enum 55
Interface 38

Languages

TypeScript100%
Python1%

Modules by API surface

src/MusicalScore/Graphical/MusicSheetCalculator.ts111 symbols
src/VexFlowPatch/src/stavenote.js73 symbols
src/VexFlowPatch/src/stave.js69 symbols
src/MusicalScore/Graphical/GraphicalMusicSheet.ts68 symbols
src/MusicalScore/MusicSheet.ts63 symbols
src/MusicalScore/Graphical/GeometricSkyBottomLineContext.ts63 symbols
src/OpenSheetMusicDisplay/OpenSheetMusicDisplay.ts62 symbols
src/MusicalScore/Graphical/MusicSheetDrawer.ts54 symbols
src/MusicalScore/Graphical/VexFlow/VexFlowMusicSheetCalculator.ts51 symbols
src/MusicalScore/Graphical/MusicSystemBuilder.ts50 symbols
src/MusicalScore/Graphical/BoundingBox.ts48 symbols
src/MusicalScore/MusicParts/MusicPartManagerIterator.ts46 symbols

Dependencies from manifests, versioned

@eslint/js10.0.1 · 1×
@stylistic/eslint-plugin5.10.0 · 1×
@types/chai5.2.3 · 1×
@types/mocha9.1.1 · 1×
@types/node24.12.2 · 1×
@types/vexflow1.2.38 · 1×
@typescript-eslint/eslint-plugin8.59.2 · 1×
@typescript-eslint/parser8.59.2 · 1×
canvas3.2.3 · 1×
chai6.2.2 · 1×
eslint10.3.0 · 1×
eslint-plugin-jsdoc62.9.0 · 1×

For agents

$ claude mcp add opensheetmusicdisplay \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact