Skip to content
Live coding music in Javascript
JavaScript Assembly TypeScript C++ HTML Shell Other
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
4klang
midi
pattern
songs
tools
wasmaudioworklet
.gitignore
README.md
drumtrack.js
package-lock.json
package.json
playback.js
record.js
recording.json
runosx.sh
startjack.sh
test.xmz
testmidi.js
testpattern.js
testpattern2.js
testpattern3.js
testpattern4.js
trackerpatterntest.js

README.md

Music 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.

Sources are in the wasmaudioworklet folder.

Live demos / videos

Live music coding: https://petersalomonsen.com/webassemblymusic/livecodev1/ (demo video https://youtu.be/ZQUo2fZwUgw)

Simple recorder / sequencer: https://petersalomonsen.com/webassemblymusic/test1/ (demo video https://youtu.be/6dem1GHOmos)

And there are more videos that can be seen here:

https://www.youtube.com/watch?v=ThkIgYcvkMU&list=PLv5wm4YuO4IxRDu1k8fSBVuUlULA8CRa7

This is all very much work in progress. More stuff coming soon....

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

https://youtu.be/oPfOeEbM4M0

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.

You can’t perform that action at this time.