p5.Part = function(steps, bLength) { this.length = steps || 0; // how many beats this.partStep = 0; this.phrases = []; this.isPlaying = false; this.noLoop(); this.tatums = bLength || 0.0625; // defaults to quarter note this.metro = new p5.Metro(); this.metro._init(); this.metro.beatLength(this.tatums); this.metro.setBPM(bpm); p5sound.parts.push(this); this.callback = function(){}; };
p5.Part = function(steps, bLength) { this.length = steps || 0; // how many beats this.partStep = 0; this.phrases = []; this.looping = false; this.isPlaying = false; // what does this looper do when it gets to the last step? this.onended = function(){ this.stop(); }; this.tatums = bLength || 0.0625; // defaults to quarter note this.metro = new p5.Metro(); this.metro._init(); this.metro.beatLength(this.tatums); this.metro.setBPM(bpm); p5sound.parts.push(this); this.callback = function(){}; };