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
editmode (or, presstab) - Right-click to add modules
- Toggle to
playmode 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
editmode, right-click and create aNoteIncomponent - Next, right-click and create a
VCO(voltage-controlled oscillator) component - Connect the
freqoutput of theNoteInto thefreqinput of theVCO - Create an
Envcomponent; connect theveloutput of theNoteInto thevelinput of theEnv - Create a
VCAcomponent; connect the outputs from both theVCOandEnvto its inputs - Connect the outputs of the
VCOto theout-1andout-2("master outs") in the bottom left corner - Switch to
playmode and turn on the patch (bottom right). You can trigger notes usingASDFGon 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.