Repository navigation
Building from Source
Niraj Khetre edited this page Nov 25, 2026
·
1 revision
You need Node.js 20 or newer and Windows 10 or 11.
git clone https://github.com/nirajkhetre/mondegreen.git
cd mondegreen
npm install
npm start| Command | What it does |
|---|---|
npm start |
Runs the app from source |
npm test |
Beat tracker checks (several tempos, half-time, a tempo change) and lyrics parsing and clean-up |
npm run dist |
Builds dist/mondegreen-setup-<version>.exe and dist/mondegreen-portable-<version>.exe
|
npm run art |
Rebuilds the logo, the Windows icon, and every README, website and wiki image |
| Command | What it does |
|---|---|
npm start -- --peek |
Prints what it hears and a live sync report every 5 s, and saves frames to shots/
|
npm start -- --peek --demo |
Plays a built-in demo song and saves every look to shots/<look>-a.png and -b.png
|
npm start -- --peek --demo --listen |
Opens listen mode and saves every scene to shots/scene-<name>-a.png and -b.png
|
npm start -- --peek --demo --listen --scene=texts |
One scene, plus a burst of six frames |
To pretend a song is playing without any music (real lyrics are fetched):
$env:MG_FAKE = "Artist|Title|lengthMs|startMs"; npm start -- --peekOnly one copy of mondegreen runs at a time. Quit the tray app before starting another from source, or the new one exits right away.
-
npm start -- --peek --demoandnpm start -- --peek --demo --listento capture fresh looks and scenes intoshots/. -
npm run art. It trims the overlay captures, converts the scenes to JPEG, and renders the cards inassets/(card.htmlfor the banner and social preview,looks.htmlfor the collage) intodocs/img/.
The logo is assets/logo.svg (and assets/logo-small.svg for sizes up to 48 px). npm run art -- logo turns them into build/icon.ico, the app's icon.png, and the website's favicons.
| Path | What it is |
|---|---|
main.js |
Windows, tray, shortcuts, settings, the now-playing reader |
nowplaying.ps1, control.ps1
|
Read and control the Windows media session |
lyrics.js |
Kugou and LRCLIB lookups, KRC decoding, caching |
beat-worklet.js |
The beat tracker (AudioWorklet) |
live.js |
The shared song clock, lyrics, colours and beat |
engine.js, styles.css, overlay.*
|
The overlay and its twelve looks |
listen.*, scenes.js
|
Listen mode and its ten scenes |
settings.* |
The settings window |
test/check.js |
Tests |
assets/, tools/render.js
|
Logo and picture sources, and the script that renders them |
docs/ |
The website (GitHub Pages) and every image |
wiki/ |
These wiki pages |
- Bump
versioninpackage.json. -
npm run dist. - Create a GitHub release tagged
v<version>and attach both exes fromdist/.