osc = T("func", numOfSamples=0, func=function(x) { return x; }, freq=440); // numOfSamples [Number] // func [Function] // freq [Object] Frequency osc.play();
osc.func // [Function] osc.numOfSamples // [Number] osc.freq // [Object] Frequency osc.phase // [Number] Initial phase offset
// Reset phase osc.bang();
T("func", function(x) { return (x < 0.1) ? -1 : +1; }, 880).play(); // x is a phase in the range 0.0 to 1.0
T("func", 3, function(x) { // numOfSamples is 3 return return [x-0.5, 0, 0]; // return.length is 3 }, 880).play();