petersalomonsen/javascriptmusic
petersalomonsen/javascriptmusic has 428 GitHub stars and 34 forks. GitHot measured 0 stars in 24 hours and 0 in 7 days. Last checked 2026-11-10 01:28 UTC. Last push 2026-10-29.
A.K.A. WebAssembly Music. Live coding music and synthesis in Javascript / AssemblyScript (WebAssembly)
Measured star growth
- in 24h
- 0
- in 7 days
- 0
- in 15 days
- Update delayed
- in 1 month
- Update delayed
Net star changes over overlapping periods, not daily totals. Missing measurements are left blank. Stars measure attention, not software quality.
README.md
OriginalMusic written in Javascript
This project demonstrates writing music in Javascript. In the beginning I used NodeJS with MIDI to control a synth, and then got into 4klang which is a very compact but extremely powerful synth, which finally inspired me to atttempt writing a synth in WebAssembly running entirely in the browser.
Webassembly music in the browser
This is a live-coding environment for music running entirely in the browser, synthesizing music in webassembly using AssemblyScript.
You can test it yourself at the hosted app: https://webassemblymusic.pages.dev/
The two repos used for the IFC 2026 talk load directly via the ?gitrepo= parameter:
- https://webassemblymusic.pages.dev/?gitrepo=ifc2026-concert.gitfactory.testnet
- https://webassemblymusic.pages.dev/?gitrepo=ifc2026-faust2as.gitfactory.testnet
An older version is hosted at petersalomonsen.com (load a gist with the gist url parameter, or remove it for a clean project):
https://petersalomonsen.com/webassemblymusic/livecodev2/?gist=5b795090ead4f192e7f5ee5dcdd17392
Demo videos: https://www.youtube.com/watch?v=C8j_ieOm4vE&list=PLv5wm4YuO4IxRDu1k8fSBVuUlULA8CRa7
Sources are in the wasmaudioworklet folder. See the documentation guides for writing songs, animating visuals, and hosting projects.
There are also more resources like articles and earlier versions at https://petersalomonsen.com
4klang
My experiments with the 4klang synth can be found int the 4klang folder.
If you just want to listen to the songs: https://soundcloud.com/psalomo/4klang-lazy-grooves https://soundcloud.com/psalomo/4klang-first-attempt
You may check out the windows exe of the "first attempt" song (link to zip with exe found in video description):
https://www.youtube.com/watch?v=zHrbLSjKmxQ
NodeJS MIDI
My first attempt on writing music with Javascript used NodeJS with MIDI routed to ZynAddSubFX for the sounds
And you can listen to the song songs/upbeat.js here: https://soundcloud.com/psalomo/80s-nostalgica
Run directly from nodejs, only dependes on the node midi package, and connect to a midi device.
License
This project is licensed under the GNU General Public License v3.0 — see LICENSE for the full text. Bundled third-party components (e.g. 4klang) retain their own licenses.
Explore related projects
ytdl-org/youtube-dl
Command-line program to download videos from YouTube.com and other video sites
141,527 starsexcalidraw/excalidraw
Virtual whiteboard for sketching hand-drawn like diagrams
135,396 starsgodotengine/godot
Godot Engine – Multi-platform 2D and 3D game engine
119,942 starsmrdoob/three.js
JavaScript 3D Library.
117,983 stars