MidiWriterJS vs Scribbletune
Both produce MIDI from JavaScript. MidiWriterJS is a file writer; Scribbletune is a pattern and music-theory layer that happens to output MIDI.
Side by side
| MidiWriterJS | Scribbletune | |
|---|---|---|
| Level | Low — tracks and events | High — patterns and theory |
| Music theory | No | Scales, chords, progressions |
| Rhythm notation | Manual durations | Pattern strings like x_x_ |
| Output | MIDI file | MIDI file, plus Tone.js integration |
| Dependency size | Small | Larger |
| Language | JavaScript | JavaScript |
| License | MIT | MIT |
| Platforms | macOS Windows Linux Web | macOS Windows Linux Web |
| First released | 2016 | 2014 |
| Maintained | Yes | Yes |
Where they actually differ
Scribbletune thinks in patterns
Rhythm is expressed as strings — x for a note, _ for a sustain, - for a rest — and pitches come from scale and chord helpers. Expressing "the notes of C minor, this rhythm, over four bars" is a line or two. MidiWriterJS needs you to enumerate every note and duration.
MidiWriterJS is the better primitive
If the musical decisions are already made — by your own algorithm, by user input, by data — you want a writer that does exactly what it is told and nothing more. MidiWriterJS is smaller, more predictable and easier to reason about in that role.
Scribbletune reaches into the browser
It integrates with Tone.js, so the same patterns can play in a browser as well as export to a file. MidiWriterJS only writes files.
A reasonable combination
Generate musical material however you like, then hand the resulting notes to MidiWriterJS. Scribbletune’s value is the generation layer; if you have your own, you do not need it.
Which should you choose?
Choose MidiWriterJS when…
- You already know exactly which notes to write
- You want a small, predictable dependency
- Your own code makes the musical decisions
- You need precise control over the MIDI output
Choose Scribbletune when…
- You want to generate from scales and chords
- You like expressing rhythm as pattern strings
- You want browser playback via Tone.js
- You are sketching musical ideas rather than rendering fixed ones