mirror of
https://github.com/Tonejs/Tone.js
synced 2024-11-16 16:48:00 +00:00
schedule rests with null
This commit is contained in:
parent
d98b560403
commit
f893e2378b
1 changed files with 4 additions and 1 deletions
|
@ -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;
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue