WebAssembly Music
Authors/Creators
Description
The WebAssembly Music project was started in 2019 after some experiments with writing midi songs in nodejs, and then also the 4klang x86 assembly synth. I wanted to create a fully browser based music composition and instrument synthesis environment with the possibility to write and compile sequence and synthesizer code in the browser without any server assistance.
WebAssembly and AudioWorklet was the obvious choice for rendering instruments in real time, with low enough latency to be able to play it with a midi-keyboard. JavaScript is excellent for writing code to produce sequencer data, but does not compile to WebAssembly, so then AssemblyScript was chosen for the synthesizer part. The AssemblyScript compiler runs entirely in the browser, and updates synthesizer Wasm binaries on the fly. The result is a live coding environment for both sequencing and sound synthesis, and also with midi performance and recording capabilities.
Writing music in JavaScript and synthesizers in AssemblyScript is a powerful and flexible combination. In my talk I’ll give you a brief demonstration of this.
Also I’d like to play the AssemblyScript synthesizer, both using a midi-keyboard and also full compositions. My instruments has evolved from simple waveforms with envelopes and filters to more realistic sounding instruments based on WaveGuide physical modeling synthesis. Still it’s all rendered from code, in real time. No pre-calculation or recorded/sampled sounds.
Given music fully rendered from code, it’s also possible to ship it in WebAssembly binaries to be embedded in Web apps or apps outside the browser. These are small binaries and I’ll show you a few demos of fully self-contained music players less than 50kb.
Among recent additions there are also the possibility to write WebGL pixel shader visuals, connected to the music, opening up for interesting demos with both music and visuals. Will see if there is time to show a bit of this too.
The WebAssembly music project also integrates with other synths than the built-in AssemblyScript synths too, such as Yoshimi ( through the WAM project ) and also can also produce Amiga tracked music.
And it also has a built-in git client for version control of the music / synth code, and it’s even possible to use the web app without an internet connection.
Notes
Files
28_WebAssemblyMusic.pdf
Files
(106.6 kB)
| Name | Size | Download all |
|---|---|---|
|
md5:ba2eec72cb87cb0919504c27657c318e
|
106.6 kB | Preview Download |