Changing Instruments
-
@d-healey Ok cool that simplifies things somewhat.
-
@d-healey I tried already but it didn't do anything at all
-
@jay Post code please
-
==========onInit========
const var mainSampler = Synth.getSampler("Sampler");
const var CmbSampleMap = Content.addComboBox("CmbSampleMap", 220, 480);
const var samplemaps = ["SampleMaps NAME Instruments", "a - Classic Tiney", "b - DX-Seven II", "k - Full Tines on Steroids"];
CmbSampleMap.set("items", samplemaps.join("\n"));=========onControl============
function onControl(number, value)
{{ case CmbSampleMap: Sampler.loadSampleMap(CmbSampleMap.getItemText()); break; }
}
-
@jay
Sampler.loadSampleMap(CmbSampleMap.getItemText());
Your sampler variable is called mainSampler not Sampler. -
Well I've just bought a book for javascript newbies. Hopefully I'll be up to speed soon.
-
@tod-slaughter It will help but remember that although HISE script looks like javascript it isn't javascript and a lot of stuff (beyond the basics) won't be applicable to HISE.
-
@d-healey Hi David, I need to know the basics or I'll never understand what's going on. From what I gather the syntax is similar/same but the naming is different?
-
A knowledge of Javascript basics is definitely useful, but don’t overdo it because a lot of advanced language features are not supported by HISE and there are a few additions in the scripting engine that are not part of the Javascript standard (mostly stuff adapted from C/C++ for meeting realtime requirements).
-
@d-healey Thanks David, that was it.