Getting Started
Prerequisites
- Node.js 18+
- pnpm (recommended) or npm
- An MXL (compressed MusicXML) score file
Installation
Install the packages you need from the monorepo:
Peer dependencies react and react-dom (>=18) must be installed in your project.
You must install either @muse-player/server or @muse-player/cli. The @muse-player/core package cannot parse MXL files — it only consumes pre-rendered static artifacts produced by the server or CLI.
Step 1: Pre-render an MXL File (Required)
MXL files cannot be loaded directly in the browser. You must pre-render them to static assets first using either the CLI or the server API.
Option A: CLI (recommended for static sites)
Option B: Server API (for dynamic rendering)
Both produce the same output structure:
When using the CLI, the output directory looks like:
When using the server API, you get a ScoreRenderResult object in memory. You can serve it directly from an API endpoint or write it to disk yourself.
Step 2: Load and Render the Score
Step 3: Add Playback
The PlaybackControls component requires importing @muse-player/component/style.css for styles to work.
Next Steps
- Architecture — understand the data flow and package responsibilities.
- API: Core — detailed hook signatures and return values.
- API: Server — programmatic server-side rendering.

