infojunkie / musicxml-player

A TypeScript component that loads and plays MusicXML files in the browser using Web Audio and Web MIDI.
https://blog.karimratib.me/demos/musicxml/
GNU General Public License v3.0
35 stars 6 forks source link

Static SVG renderer #38

Closed infojunkie closed 1 month ago

infojunkie commented 2 months ago

There are use cases where the score does not need to be responsive, and thus can be rendered offline and displayed statically.

Create a new renderer that accepts an SVG and a map of graphic elements to time entries to allow the player to perform the same interactions as the current interactive renderers.

Examples of SVG renderers: Verovio CLI tool, Lilypond.

infojunkie commented 1 month ago

MuseScore has a similar system for its web platform, using a space+time map like the following: https://musescore.com/static/musescore/scoredata/g/f71d1977c4c104dd3b136b0d291d46bb71633e12/space.jsonp?revision=1612934314&no-cache=1728193068

infojunkie commented 1 month ago

Currently working on this at https://github.com/infojunkie/musicxml-player/pull/43

infojunkie commented 1 month ago

The MusicXML Player Demo now includes a sample called "Après un rêve" which features pre-rendered SVG + MIDI assets from MuseScore. These assets are directly loaded into the player for rendering and playback. The only requirement is that the asset metadata include both a timemap from timestamps to measures/notes, and a spacemap from coordinates to measures/notes.