{"id":13804338,"url":"https://github.com/infojunkie/musicxml-player","last_synced_at":"2026-04-09T00:31:25.034Z","repository":{"id":73966161,"uuid":"571407257","full_name":"infojunkie/musicxml-player","owner":"infojunkie","description":"Play MusicXML scores in the browser using Web Audio and Web MIDI.","archived":false,"fork":false,"pushed_at":"2026-03-12T17:58:45.000Z","size":283758,"stargazers_count":71,"open_issues_count":12,"forks_count":13,"subscribers_count":4,"default_branch":"main","last_synced_at":"2026-03-12T22:33:21.821Z","etag":null,"topics":["midi","music-i18n","music-notation","musicxml","web-audio"],"latest_commit_sha":null,"homepage":"https://blog.karimratib.me/demos/musicxml/","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/infojunkie.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null},"funding":{"github":"infojunkie"}},"created_at":"2022-11-28T03:51:12.000Z","updated_at":"2026-03-12T17:58:45.000Z","dependencies_parsed_at":"2024-06-03T07:28:51.164Z","dependency_job_id":"faa3fdfe-01d0-4949-b73f-4ce9f9e80a99","html_url":"https://github.com/infojunkie/musicxml-player","commit_stats":null,"previous_names":[],"tags_count":99,"template":false,"template_full_name":null,"purl":"pkg:github/infojunkie/musicxml-player","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/infojunkie%2Fmusicxml-player","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/infojunkie%2Fmusicxml-player/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/infojunkie%2Fmusicxml-player/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/infojunkie%2Fmusicxml-player/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/infojunkie","download_url":"https://codeload.github.com/infojunkie/musicxml-player/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/infojunkie%2Fmusicxml-player/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31579839,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-08T14:31:17.711Z","status":"ssl_error","status_checked_at":"2026-04-08T14:31:17.202Z","response_time":54,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["midi","music-i18n","music-notation","musicxml","web-audio"],"created_at":"2024-08-04T01:00:46.117Z","updated_at":"2026-04-09T00:31:25.026Z","avatar_url":"https://github.com/infojunkie.png","language":"TypeScript","funding_links":["https://github.com/sponsors/infojunkie"],"categories":["Packages"],"sub_categories":["Libraries"],"readme":"MusicXML Player\n===============\n\n[![npm](https://img.shields.io/npm/v/%40music-i18n%2Fmusicxml-player)](https://www.npmjs.com/package/@music-i18n/musicxml-player)\n[![build](https://github.com/infojunkie/musicxml-player/actions/workflows/test.yml/badge.svg?branch=main)](https://github.com/infojunkie/musicxml-player/actions/workflows/test.yml)\n\nA TypeScript component that loads and plays MusicXML files in the browser using Web Audio and Web MIDI.\n\n![Screenshot](screenshot.png?raw=true)\n\n# Getting started\n```\nnpm install\nnpm run build\nnpm test\nnpm run demo:develop\n```\nThen open http://127.0.0.1:8080/\n\nNOTE! To use the MMA (Musical MIDI Accompaniment) feature, you need to [install and run `musicxml-midi`](https://github.com/infojunkie/musicxml-midi) separately. Typically, running `PORT=3000 npm run start` from the `musicxml-midi` folder in a separate console should be enough.\n\n# Theory of operation\nThis component synchronizes rendering and playback of MusicXML scores. Rendering is done using existing Web-based music engraving libraries such as [Verovio](https://github.com/rism-digital/verovio) or [OpenSheetMusicDisplay](https://github.com/opensheetmusicdisplay/opensheetmusicdisplay). Rendering can also use pre-rendered assets (SVG, metadata) obtained from MuseScore or Verovio. Playback uses standard MIDI files that are expected to correspond to the given MusicXML, and sends the MIDI events to either a Web MIDI output, or to a Web Audio synthesizer, using the module [`spessasynth_lib`](https://github.com/spessasus/spessasynth_lib).\n\nThe crucial part of this functionality is to synchronize the measures and beats in the MusicXML file with the events of the MIDI file. In a nutshell, the player expects the provider of the MIDI file (an implementation of `IMidiConverter`) to supply a \"timemap\", which associates each measure in the MusicXML file to a timestamp at which this measure occurs. In the case of repeats and jumps, the same measure will be referenced several times in the timemap.\n\nThere are 3 bundled implementations of `IMidiConverter` in this module:\n- An API client that connects to the [`musicxml-midi`](https://github.com/infojunkie/musicxml-midi) API server. `musicxml-midi` is a converter whose major contribution is to generate a MIDI accompaniment in addition to the music in the MusicXML score.\n- [Verovio](https://github.com/rism-digital/verovio), that generates a faithful rendition of the MusicXML score but lacks accompaniment generation.\n- It is also possible to hand-craft the MIDI and timemap files, and instruct the player to read those explicitly.\n\n# Development\nAt the moment, the only documentation available for the usage of the player is located in the [demo app](demo/demo.mjs) and the tests.\n\nThis project uses Vitest for testing:\n- Unit tests run in Node.\n- Integration tests (that might rely on browser-like APIs) run with a jsdom environment.\nUse the commands below to run all tests, a single file, or a single test in watch or non-watch mode.\n\n```bash\nnpm test\nnpm test -- src/helpers/fetish.spec.ts\nnpm test -- -t \"should throw if not ok\"\nnpm test -- --watch\nnpm test -- src/helpers/fetish.spec.ts --watch\nnpm test -- src/helpers/fetish.spec.ts -t \"should throw if not ok\" --watch\n```\n\nWhen creating a new version, some tests will fail - run `npm run build:snap` to update the snapshots.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finfojunkie%2Fmusicxml-player","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Finfojunkie%2Fmusicxml-player","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finfojunkie%2Fmusicxml-player/lists"}