tmhglnd / mercury-playground

The Mercury live coding environment running in the browser

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Create custom synthesis

tmhglnd opened this issue · comments

commented

An option to extend the playground with custom synthesizers. How it should actually be implemented is an open question. Maybe a synth can be defined and the oscillators/adsr's can be connected as functions with variables like:

// define the synth with variables
define synth myNewFMSynth sineOsc( dc(#freq) + sineOsc(#freq * #harmonicity) * dc(#freq * #harmonicity * #index) ) * shape()

// use the synth where variables can be set through the functions
new synth myNewFMSynth freq(200) harmonicity(2.013) index(2) shape(1 500)