remove Array.map reference (issue #27)
This commit is contained in:
parent
f81d040e48
commit
7a64663b60
1 changed files with 7 additions and 4 deletions
|
@ -27,10 +27,13 @@ MIDI.loadPlugin = function(conf) {
|
||||||
/// Get the instrument name.
|
/// Get the instrument name.
|
||||||
var instruments = conf.instruments || conf.instrument || "acoustic_grand_piano";
|
var instruments = conf.instruments || conf.instrument || "acoustic_grand_piano";
|
||||||
if (typeof(instruments) !== "object") instruments = [ instruments ];
|
if (typeof(instruments) !== "object") instruments = [ instruments ];
|
||||||
instruments.map(function(data) {
|
///
|
||||||
if (typeof(data) === "number") data = MIDI.GeneralMIDI.byId[data];
|
for (var n = 0; n < instruments.length; n ++) {
|
||||||
return data;
|
var instrument = instruments[n];
|
||||||
});
|
if (typeof(instrument) === "number") {
|
||||||
|
instruments[n] = MIDI.GeneralMIDI.byId[instrument];
|
||||||
|
}
|
||||||
|
};
|
||||||
///
|
///
|
||||||
MIDI.soundfontUrl = conf.soundfontUrl || MIDI.soundfontUrl || "./soundfont/";
|
MIDI.soundfontUrl = conf.soundfontUrl || MIDI.soundfontUrl || "./soundfont/";
|
||||||
/// Detect the best type of audio to use.
|
/// Detect the best type of audio to use.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue