WebAssembly Music album

webassemblymusic.near.page is a web music album, with a music player that works on mobile devices, even with a locked screen to provide a continuous long listening experience. It's a showcase of the first generation of WebAssembly Music entirely stored on the NEAR-blockchain. It's also a demo of a smart contract written in Rust but with an embedded Javascript engine ( QuickJS ) in order to customise behavior using Javascript. See the full sources at github.com/petersalomonsen/quickjs-rust-near.

March 2022

GLSL pixel shaders like Twigl / Shadertoy

It is now possible to write WebGL fragment shader code that accompanies the music. Just add the gitrepo parameter to the URL, and a midisynth / midisequencer format song. Example url could be something like

Git repositories are stored in your browsers IndexedDB using wasm-git. If you also want to store/sync with a remote git server, you can create a repository at https://wasm-git.petersalomonsen.com (requires a NEAR account).

Full source code, including the shader can also be exported to a compressed PNG, and an example of such an export can be found at mintbase (click the link for "More info").

October 2021


I was at NEARCON and had the pleasure of speaking about my projects. Check it out!

Also check out the original music at psalomo.near.page, which is also available on streaming platforms.

June 2021

Pianoroll and mixer UI

A simple but efficient web app for creating music in the browser. Preloaded with a set of instruments from a WebAssembly synth. The instrument pack/synth is actually an NFT stored on NEAR protocol blockchain. No samples, just physical modeling (Waveguide synthesis).

April 2021

Improvements on physical modeling synths

Check out a live recording when playing the piano, and also my entry for the Revision 2021 executable music competition where the music and synth was packed into a 22kb HTML file. The article from december is also updated.

NFT music

I found that the NEAR blockchain is easy for developing smart contracts for selling music NFTs and creating interactive experiences. Have a look at my latest NFT 3 project where you can rearrange and remix and post remixes back on the blockchain (without buying the NFT itself).

December 2020

Notes on physical modeling synthesis with AssemblyScript

An article about my first experiments with physical modeling synthesis (waveguide) in the WebAssembly music studio. Read it here

September 2020

What is WebAssembly, and what is it not?

A high level summary of WebAssembly, what to use it for and also when maybe not to use it. Read the article

Introducing WASM-git

WASM-git is a port of libgit2 to WebAssembly using Emscripten. Having a git client in the browser makes it possible to store data locally and make it available when disconnected from the internet, and synchronize when online. A perfect match for any Progressive Web App in need of persisting data, where you also can take advantage of GITs capabilties of revisioning and merging remote and local changes. Have a look at this brief demo video of WASM-git integrated into the WebAssembly music studio.

July 2020

An article on using WebAssembly modules from C.

June 2020

An article on programming midi sequences in Javascript.

May 2020

Yoshimi is a soft-synth for Linux with long history and great sounds (forked from ZynAddSubFX). Not long ago I discovered the WebAssembly port of Yoshimi by Jari Kleimola, and wanted to have a go integrating it into my own WebAssembly music environment.

The result of the first attempt on creating a song is here:

Peter Salomonsen ยท Chill and feel

April 2020

Among my first experiences on creating music with computers was using "trackers" on the Commodore Amiga. And so I had to implement support for creating Protracker modules in my WebAssembly music studio. Here's a ProTracker module that plays on the Amiga. Written in Javascript and AssemblyScript, but you can download it as a "MOD" file: Amiga Retro Shuffle

February 2020

Slides from my talk at WebAssembly summit 2020 are here (use arrow keys left/right to switch page, f to toggle fullscreen, l to open synth in a separate window).

January 2020

A new version of the live coding environment where you can also edit the synthesizer code in the browser. Have a look at the demo video below, or go directly to the live coding environment.

It's also possible to load synth code from github gist and here's a demo song. You can find many more gists on github.

November 2019

An article on chip music generated by WebAssembly. Read about the background and technology for the WebAssembly live-coding music environment.

From the live-coding studio I added a feature to record live video and audio output, and you can see the result here. Also see the source code for the song.

September 2019

Now able to import music JS code and synth WASM binary from GIST. See code and listen here, or watch the video.

June 2019

Now able to create music in the browser. Check out the live coding music studio and also have a look at the demo video.

Apr 2019

The first webassembly music experiment with a synth written in AssemblyScript, and music expressed in Javascript. Also check out the video, and see the sources at github.