add USE_JAZZMIDI variable to enable experimental Web MIDI API, add utf8 meta tags to demos

This commit is contained in:
Michael Deal 2013-01-28 12:27:53 -08:00
parent a7d5b8a06e
commit 072eadb4af
7 changed files with 9 additions and 4 deletions

View file

@ -258,7 +258,7 @@ if (window.Audio) (function () {
api: "audiotag"
};
var note2id = {};
var volume = 1; // floating point
var volume = 127; // floating point
var channel_nid = -1; // current channel
var channels = []; // the audio channels
var notes = {}; // the piano keys
@ -276,7 +276,7 @@ if (window.Audio) (function () {
var time = (new Date()).getTime();
var audio = channels[nid];
audio.src = MIDI.Soundfont[id][note.id];
audio.volume = volume;
audio.volume = volume / 127;
audio.play();
channel_nid = nid;
};