Experiments in WebAudio
Note: much of this code inspired by:
- https://tonejs.github.io
- https://github.com/cwilso/WebAudio
- https://github.com/idflood/Threenodes.js
- Visit malformed.ca.
- From the switch on the top right, switch the patch into
edit
mode (or, presstab
) - Right-click to add modules
- Toggle to
play
mode to adjust parameters, etc.
This demo presumes an existant knowledge of modular synthesis. For example, how to generate a note by modulating the amplitude of an oscillator with a envelope generator.
- While in
edit
mode, right-click and create aNoteIn
component - Next, right-click and create a
VCO
(voltage-controlled oscillator) component - Connect the
freq
output of theNoteIn
to thefreq
input of theVCO
- Create an
Env
component; connect thevel
output of theNoteIn
to thevel
input of theEnv
- Create a
VCA
component; connect the outputs from both theVCO
andEnv
to its inputs - Connect the outputs of the
VCO
to theout-1
andout-2
("master outs") in the bottom left corner - Switch to
play
mode and turn on the patch (bottom right). You can trigger notes usingASDFG
on your keyboard*
* or you can use MIDI or even OSC :)
All patch data is, by default, stored in LocalStorage. However, if you wish to persist data from multiple patches and parameter sets, you may can create an account / sign in by clicking the glowing ring in the top right. I use Firebase
to store patch data in JSON format.