T("OscGen")

AR Oscillator x Envelope

Description

1
2
3
4
5
6
7
8
9
 
var osc = T("pulse");
var env = T("perc", {a:50, r:2500});
var oscenv = T("OscGen", {osc:osc, env:env, mul:0.15}).play();
 
T("interval", {interval:500}, function(count) {
  var noteNum  = 69 + [0, 2, 4, 5, 7, 9, 11, 12][count % 8];
  var velocity = 64 + (count % 64);
  oscenv.noteOn(noteNum, velocity);
}).start();

Properties

Methods

See Also

Source

https://github.com/mohayonao/timbre.js/blob/master/src/objects/synthdef.js