schedule rests with null

This commit is contained in:
Yotam Mann 2015-11-10 23:01:14 -05:00
parent d98b560403
commit f893e2378b

View file

@ -116,11 +116,14 @@ define(["Tone/core/Tone", "Tone/event/Part", "Tone/core/Transport"], function (T
* @returns {Tone.Sequence} this
*/
Tone.Sequence.prototype.add = function(index, value){
if (value === null){
return this;
}
if (this.isArray(value)){
//make a subsequence and add that to the sequence
var subSubdivision = Math.round(this._subdivision / value.length) + "i";
value = new Tone.Sequence(this._tick.bind(this), value, subSubdivision);
}
}
Tone.Part.prototype.add.call(this, this._indexTime(index), value);
return this;
};