A browser reimplementation of AmigaKlang — design Commodore Amiga synth instruments in the browser and export the real, byte-identical Amiga code.
🎛️ Live: https://funklang.mkael.net
AmigaKlang (by Jochen "Virgill" Feldkötter) is a demoscene tool that renders
instrument samples with code instead of storing them — saving precious memory in
Amiga demos and intros. funklang is a from-scratch, fully client-side
reimplementation of its editor and code generator: everything (audio preview, m68k
assembly, the final .bin) runs in the browser, no server and no toolchain.
It is faithful where it counts: the audio engine matches the original
sample-for-sample, and the exported .bin matches the original generator
byte-for-byte.
- Edit instruments — up to 31 instruments, each a chain of phases (operators:
oscillators, envelopes, filters, FX, cross-instrument clone/chordgen…). Live
knobs, drag-to-reorder, per-note audition, undo/redo, autosave,
.akp/.akiload & save. - Hear it instantly — a bit-exact reimplementation of the AmigaKlang rendering core plays your instrument as you tweak it.
- Export real Amiga code — the CODE button generates, entirely in-browser:
- the m68k
.asm(AK_Generateroutine), - the C generators (to reuse in your own demo engine), and
- the exact Amiga
.bin, with its exact byte size.
- the m68k
- Know the size exactly — the footer shows the patch's real assembled
.binbyte count (not an estimate); click it for a per-phase breakdown of what each phase costs.
The exported .bin is a single position-independent m68k routine, AK_Generate,
followed by its data tables — raw bytes, no header, no relocation. Drop it into your
demo with incbin and call it. Set these registers and jsr to offset 0:
| Reg | Meaning |
|---|---|
a0 |
sample buffer start (output) |
a1 |
36864-byte temporary work buffer (freeable after rendering) |
a2 |
external samples address (used when the patch has imported samples) |
a3 |
rendering-progress address |
It's the same blob the original tool's Export ASM route produces (the author's
Aklang2Asm), assembled with vasm — typically ~half the size of the gcc-compiled
C build ("Export Amiga Binary"). Full details, including the progress modes and the
asm-vs-gcc distinction, are in docs/bin-format.md.
- No sample-import UI yet. funklang's focus so far is synthetic, code-generated
instruments. Samples that are already in a loaded
.akpare fully supported — read, played (theimported_sampleop), kept on save, and emitted in the exported asm/C/.bin. What isn't built yet is importing a new sample in the editor (wav / raw / mic); that's an early-scope choice, not a fundamental one, and it may well be added later. - The Amiga
.exe(Shrinkler-packed executable music) and Atari.prgexport routes of the original tool are out of scope; funklang focuses on the demo.bin.
funklang is a young reimplementation, so bug reports and feature requests are very welcome — please open an issue: https://github.com/elhigu/funklang/issues
Especially valuable are cases where funklang doesn't match the original AmigaKlang —
a patch that sounds different, or an exported .asm / .bin that differs from what the
real tool produces. The audio engine aims to be sample-for-sample and the assembly
byte-for-byte against Aklang2Asm, so any such mismatch is a bug worth reporting —
ideally with the .akp attached so it can be reproduced.
It's also very likely there are browser incompatibilities and rough edges in responsiveness and mobile / touch-screen support that still need fine-tuning. Reports here help a lot — please include your browser, OS, and (for touch issues) the device.
npm install
npm run dev # Vite dev server
npm test # Vitest: unit + bit-exact DSP + byte-exact asm
npm run typecheck # tsc --noEmit (strict)
npm run build # production build (bundles the vasm-WASM size worker)
./deploy.sh "msg" # build + publish to funklang.mkael.netArchitecture and module map: docs/architecture.md. Contributor/agent conventions (incl. the release process): AGENTS.md. Version history: CHANGELOG.md.
funklang stands entirely on the shoulders of the AmigaKlang ecosystem and its
authors. All synthesis design, the .bin format, and the code-generation approach
are theirs; funklang is a reimplementation, not original synth research. Full
attribution and third-party terms (incl. the bundled vasm/Emscripten) are in
THIRD-PARTY-NOTICES.md.
- AmigaKlang & AmigaKlang GUI — Jochen "Virgill" Feldkötter (Alcatraz / Haujobb / Maniacs of Noise). The synth, the editor, the rendering core.
- 4Klang — Gopher / Alcatraz — the "big brother" modular-synth lineage AmigaKlang follows.
- Aklang2Asm — Dan / Lemon — the patch→m68k-asm generator that
src/asm/akgen/reproduces byte-for-byte. - Shrinkler — Blueberry — the executable cruncher used by the original tool.
- LSP & STrinkler (Atari playback) — Leonard / Oxygene.
- Thanks credited by the original tool: Hellfire, Bartman, Antiriad, Leonard, and the tips crew (Soundy, H0ffman, Bifat, Stingray, Aceman, Juice, Tecon).
- vasm (m68k assembler, compiled here to WebAssembly without any modifications) — Volker Barthelmann & Frank Wille.
- Live app: https://funklang.mkael.net
- AmigaKlang Pouët: https://www.pouet.net/prod.php?which=85351
- AmigaKlang on GitHub: https://github.com/virgill1974/AmigaKlang
- Published site repo: https://github.com/elhigu/funklang.mkael.net
funklang reimplementation by Mikael Lepistö (elhigu / funktion). AmigaKlang © Jochen "Virgill" Feldkötter.