◀︎ ▲︎ ▶︎︎

Simple Sequencer App
Bass

		this.seq = [33, 33, 40, 33, 33, 40, 33, 33,
			    33, 33, 40, 33, 33, 40, 33, 33,
			    31, 31, 31, 38, 38, 31, 31, 38,	
			    29, 29, 36, 29, 36, 29, 29, 29];
}

Bass.prototype.play = function(n, tim) {
	var osc = ctx.createOscillator();
	osc.type = "sawtooth";
	osc.frequency.value
		= 440.0 * Math.pow(2.0, (this.seq[n % 32] - 69.0) / 12.0);
	osc.connect(this.vol);
	osc.start(tim);
	osc.stop(tim + 0.08);	
}