MIT music DSL
Synth8
A tiny pattern language for TypeScript games, browser experiments and retro-flavoured soundtracks.
song(
melody("c4+e4+g4 f4+a4+c5")
.arp("updown")
.preset("chip-lead")
.delay(0.12)
.echo(0.25),
beat("kick _ snare _")
.bank("arcade")
.loop()
)
Why?
Music patterns for games
Pattern based
Write beats, melodies, chords, arpeggios and song structures as compact text patterns.
Game ready
Use streamed, prerendered or live playback modes depending on your project needs.
Sound shaping
Layer presets, banks, gain, pan, envelopes and effects without polluting musical events.
MIT licensed
Designed to be usable in free, commercial and ad-supported games.
Playground
Learn, edit and experiment
The Synth8 playground includes editable examples, tutorials and experimental labs. Write a pattern, change the BPM and hear the result directly in the browser.
> open playground
> load tutorial
> tweak pattern
> press play █
Packages
Use it from npm
Synth8 is split into a core parser/compiler package, a player package and optional tools such as MIDI import.
pnpm add @vibuca/synth8-core
pnpm add @vibuca/synth8-player