11-11-2019, 11:33 AM
This has been asked time and again.
- Browse to a sequence or create an new one
- If you use Chrome, open the console (CTRL+SHFT+J)
- Paste the code snipper below
- press ENTER
- Enjoy!
- Browse to a sequence or create an new one
- If you use Chrome, open the console (CTRL+SHFT+J)
- Paste the code snipper below
- press ENTER
- Enjoy!
Code:
function loadInstruments() {
var insts=[];
for(var i=0;i<instrumentSelect.length;i++)
{
insts.push(parseInt(instrumentSelect[i].value))
}
var grp = document.createElement("optgroup");
grp.label = "Unfinished";
instrumentSelect.add(grp);
for(i=0;i<settings.instrumentColors.length;i++)
{
if(!insts.includes(i))
{
var opt = document.createElement("option");
opt.value = i;
opt.text = settings.instruments[i];
grp.appendChild(opt);
var instSettings = document.createElement("div");
instSettings.innerHTML = "<div class=\"instrument_option\"><div><div id=\"instrument_lock_" + i + "\" class=\"instrument_lock btn tooltipstered\" onclick=\"lockInstrument(" + i + ")\"></div><span id=\"instrument_name_" + i + "\" onclick=\"selectInstrument(" + i + ")\">" + settings.instruments[i] + "</span><div class=\"chip instrument" + i + "\"></div></div><div class=\"row\"><input id=\"instrument_volume_" + i + "\" class=\"slider\" type=\"range\" min=\"0\" max=\"2\" step=\"0.01\" oninput=\"audioSystem.setInstrumentVolume(" + i + ", this.value)\"><div id=\"instrument_delay_" + i + "\" class=\"button tooltipstered\" onclick=\"selectDelay(" + i + ")\">D</div><div id=\"instrument_reverb_" + i + "\" class=\"button tooltipstered\" onclick=\"selectReverb(" + i + ")\">R</div></div></div>;"
document.getElementById("instrument_options").appendChild(instSettings.firstChild);
}
}
console.log("instruments loaded");
}
loadInstruments();