update for multiple instruments, use drum + piano

This commit is contained in:
Michael Deal 2012-11-21 02:03:56 -08:00
parent 30c224b067
commit 0560bae4f5
4 changed files with 4 additions and 95 deletions

View file

@ -66,7 +66,7 @@ RefreshFrame = function () {
var len = circleRadius * (1 + 1.0 / nbrPoints - r);
if (Math.floor(a / PI2) !== Math.floor(tines[i] / PI2)) {
MIDI.noteOn(0, i + 21, 100, 0);
MIDI.noteOn(24, i + 21 + 36, 100, 0);
MIDI.noteOn(1, i + 21 + 36, 100, 0);
lastSound[i] = ms;
}
var x = (cx + Math.cos(a) * len);
@ -86,7 +86,7 @@ RefreshFrame = function () {
window.onload = function () {
MIDI.loadPlugin({
instruments: [ "acoustic_grand_piano", "acoustic_guitar_nylon" ], // or multiple instruments
instrument: "acoustic_grand_piano", // or multiple instruments
callback: function() {
loader.stop();
var canvas = document.getElementById('mycanvas');