Sample and preset probleme
-
hello, i just noticed a problem. I did a sampler with twenty samples in it. each sample has its own sample map ok. I use the preset panel to load the samples I want until everything works. except that, when I want to add a new sample and sample map to my sampler, the whole preset panel is adjusted as if the samples map were sorted by order of addition and not by name. So each new sample that I want to add I have to redo presets from 0 because it no longer loads the right samples. someone a solution?
-
@yall Why are you only putting one sample in each sample map?
-
@d-healey no actually i wrote this to go faster because i use the translator .. i put about 90 samples per sample map ... i will try to explain again more simply.
I have 20 sample maps which each have 90 samples. I assigned each sample map in a preset panel and everything works fine. even when i export the vst everything is fine. when I come back to my project, if I want to add a new sample map in addition to the 20 already present, the import goes without problem but at the level of the preset panel everything is bad.
forward> preset 1 = sample map 1
preset 2 = Sample map 2 ....
ok cool....after importing a new sample map
preset1 = sample map2
preset 2 = sample map 15
preset 3 = sample map 5
for example.so that all my preset and sample map correspond, I must correct, with each import of new sample map, all the presets to reassign them to their sample map.
I tried to be simple ^^ -
@yall I'd need to see the code you're using to connect presets to sample maps.
-
i use this
//Sampler
const var Sampler1 = Synth.getChildSynth("Sampler1");//Sample maps array
const var sampleMaps = Sampler.getSampleMapList();//Combo box
const var cmbSampleMap = Content.getComponent("cmbSampleMap")
cmbSampleMap.set("items", sampleMaps.join("\n"));inline function oncmbSampleMapControl(component, value)
{
Sampler1.asSampler().loadSampleMap(sampleMaps[value-1]);
};Content.getComponent("cmbSampleMap").setControlCallback(oncmbSampleMapControl);
-
I think the sample map song arranged in alphabetical order and when I add a new sample map after assigning my preset panels, everything goes wrong because the samples map and sample are no longer in the correct order.
-
Do you recompile your plugin after adding more sample maps?
-
I tried to compile and not do it. it doesn't change anything.
-
the samples map correspond well to the sample by cons on this side the no problem. it's really bizarre.
I worked with hise then I tried with the scriptnode version, it didn't change anything. Besides, on the scipnode version, on the scripteditor my keyboard does not work. ^^ only the H key works. i must have the computer coronavirus lol -
@yall So I think your core problem is you are trying to use the preset system (which has no inherent ordering - they're files in folders) for something its not designed to do - load sample maps in order.