Web Audio Assembler Examples
2. Create simple synth
var ac = new AudioContext()
var Synth = Assembler.assemble({
name: 'simple-synth',
amp: { node: 'Gain', type: 'sawtooth', gain: 0.2, connect: '$context' },
filter: { node: 'BiquadFilter', type: 'lowpass', frequency: 400, connect: 'amp' },
osc: { node: 'Oscillator', connect: 'filter' }
})
Synth(ac).osc.start()