A a wrapper for Timbre.js library.
See the demo...
JZZ.synth.Timbre(obj); // or JZZ.synth.Timbre(name, obj); // or JZZ.synth.Timbre.register(name, obj); JZZ().openMidiOut(name);
where obj - is a Timbre.js synth. See more details in the Timbre.js documentation...
<script src='JZZ.js'></script> <script src='timbre.js'></script> <script src='JZZ.synth.Timbre.js'></script> ... <script><!-- var timbre = T("SynthDef").play(); timbre.def = function(opts) { var osc1, osc2, env; osc1 = T("sin", {freq:opts.freq, mul:0.25}); osc2 = T("sin", {freq:opts.freq + 8, mul:0.25}); env = T("linen", {s:450, r:2500, lv:0.5}, osc1, osc2); return env.on("ended", opts.doneAction).bang(); }; JZZ.synth.Timbre(timbre).noteOn(0, 'C5', 127).wait(500).noteOff(0, 'C5'); --></script>