Skip to content

Overview of what's new and changed from old timbre.js v12.XX

mohayonao edited this page · 1 revision

using named parameters instead of an order of arguments

// v12.XX
T("sin", 880, 0.5).play();

// v13.XX
T("sin", {freq:880, mul:0.5}).play();

.on() / .off() are used for dealing with events like jQuery or node.js.

// v12.XX
T("perc", 1000).bang().onended = function() {
  this.bang();
};

// v13.XX
T("perc", {r:1000}).on("ended", function() {
  this.bang();
}).bang();

You can use .bypass() instead of old .on() / .off().

Sort out objects

remove some objects, and add some objects
new documentation

Something went wrong with that request. Please try again.