Online Sequencer Forums

Full Version: Want to BETA TEST new instruments?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3
oh wait I got some new stuff
no worries

AND NOW THEY WON'T LOAD. COME ON.


oh yeah and one more thing... when will the beta instruments finally be fully released?
(06-10-2018, 08:27 AM)Frank Wrote: [ -> ]
Code:
insts=[];
for(i=0;i<instrumentSelect.length;i++)
{
  insts.push(parseInt(instrumentSelect[i].value))
}
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];
    instrumentSelect.add(opt);
  }
}



Slight modification to the above. Now includes the instrument ID enclosed in parenthesis after the instrument name. Saves you the trouble of guessing what instrument id to use with audioSystem.setReverb(<instrumentID>, <value>), audioSystem.setDelay(<instrumentID>, <value>), and audioSystem.setInstrumentVolume(<instrumentID>, <value>):

Code:
insts=[];
for(i=0;i<instrumentSelect.length;i++)
{
  insts.push(parseInt(instrumentSelect[i].value))
}
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].concat(' (', String(i), ') ');
    instrumentSelect.add(opt);
  }
}
Pages: 1 2 3