mirror of
https://github.com/Tonejs/Tone.js
synced 2024-11-16 08:38:00 +00:00
applying defaults API to control classes
This commit is contained in:
parent
b3dd6513b9
commit
4057252566
5 changed files with 9 additions and 4 deletions
|
@ -24,7 +24,8 @@ define(["Tone/core/Tone", "Tone/type/Type"], function (Tone) {
|
||||||
*/
|
*/
|
||||||
Tone.CtrlInterpolate = function(){
|
Tone.CtrlInterpolate = function(){
|
||||||
|
|
||||||
var options = this.optionsObject(arguments, ["values", "index"], Tone.CtrlInterpolate.defaults);
|
var options = Tone.defaults(arguments, ["values", "index"], Tone.CtrlInterpolate);
|
||||||
|
Tone.call(this, options);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The values to interpolate between
|
* The values to interpolate between
|
||||||
|
|
|
@ -32,6 +32,8 @@ define(["Tone/core/Tone"], function (Tone) {
|
||||||
*/
|
*/
|
||||||
Tone.CtrlMarkov = function(values, initial){
|
Tone.CtrlMarkov = function(values, initial){
|
||||||
|
|
||||||
|
Tone.call(this);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The Markov values with states as the keys
|
* The Markov values with states as the keys
|
||||||
* and next state(s) as the values.
|
* and next state(s) as the values.
|
||||||
|
|
|
@ -23,7 +23,8 @@ define(["Tone/core/Tone"], function (Tone) {
|
||||||
*/
|
*/
|
||||||
Tone.CtrlPattern = function(){
|
Tone.CtrlPattern = function(){
|
||||||
|
|
||||||
var options = this.optionsObject(arguments, ["values", "type"], Tone.CtrlPattern.defaults);
|
var options = Tone.defaults(arguments, ["values", "type"], Tone.CtrlPattern);
|
||||||
|
Tone.call(this);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The array of values to arpeggiate over
|
* The array of values to arpeggiate over
|
||||||
|
|
|
@ -18,7 +18,8 @@ define(["Tone/core/Tone", "Tone/type/Type"], function (Tone) {
|
||||||
*/
|
*/
|
||||||
Tone.CtrlRandom = function(){
|
Tone.CtrlRandom = function(){
|
||||||
|
|
||||||
var options = this.optionsObject(arguments, ["min", "max"], Tone.CtrlRandom.defaults);
|
var options = Tone.defaults(arguments, ["min", "max"], Tone.CtrlRandom);
|
||||||
|
Tone.call(this);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The minimum return value
|
* The minimum return value
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
define(["Tone/control/CtrlInterpolate", "helper/Basic"], function (CtrlInterpolate, Basic) {
|
define(["Tone/control/CtrlInterpolate", "helper/Basic", "Tone/core/Transport"], function (CtrlInterpolate, Basic, Transport) {
|
||||||
|
|
||||||
describe("CtrlInterpolate", function(){
|
describe("CtrlInterpolate", function(){
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue