samplemap recall w/user presets. what is the standard practice? not working ever lol
-
i have used the code people have given me and been troubleshooting for about a week and i cannot get samples and samplemaps to recall per user presets in compiled standalone and vsti on windows. the first thing i noticed is the compiled version doesnt even include the user presets you have to locate the folder and manually paste them, secondly it changes the name between UserPresets and User Presets. At no point did it ask me where to put these files..it placed them in app data/roaming...took a while to figure that out. but yes a person in the forum gave me a code about utilizing a combobox etc
it had this in oninit
const var mainSampler = Synth.getSampler("Sampler"); // create a sampler variable
const var cmbSampleMap = Content.addComboBox("CmbSampleMap", -110,-110); //add a dummy combobox
const var samplemaps = Sampler.getSampleMapList(); // create a variable containing automaticaly the samplemaps adresses
cmbSampleMap.set("items", samplemaps.join("\n")); // let this variable assigned as the combobox itemsand this in oncontrol
function onControl(number, value)
{
switch(number)
{
case CmbSampleMap:
Sampler.loadSampleMap(CmbSampleMap.getItemText());
break;
};
}this does not work for me. it recalls no samples or samplemaps. i would really like to know how to do this as a sample based plugin creator seems pretty useless without being able to properly recall samples per patch? can i get a working hise snippet or exact description of code how to do so. it feels weird that this is not documented anywhere this far into hise being around. its like people figure it out and never tell anyone lol
-
Actually there is at least one full example somewhere on the forum, the trick is finding it :p I'll put together a demo for you tomorrow if I have time, unless someone beats me to it.
-
im slowly loosing my sanity lol. thanks in advance though :)
-
can somebody point me to the particular post he is talking about that shows how to get samplemap recall to work. ive been scouring the forum :/
-
Hi, sorry I haven't had chance to put a demo together today. I think the thread it's in is this one - http://178.62.82.76:4567/topic/202/multiple-instruments-single-project-or-multiple-projects/42
-
yeah i read through and didnt see an exact solution let alone an explanation of what to actually do. hopefully soon can get it cleared up ive compiled probably 250 times troubleshooting at this point haha
-
Maybe if you upload a simple project that shows this behavior we could take a look but hitting compile 250 times and hoping it will go away on the 251th is not the strongest debugging technique ;)
My guess is that you didn't export the samplemaps correctly as the script is actually correct.
-
i have tried copying a few samples into the project folder, dragging in and mapping, saving samlemap and converting to monolith and not. ive tried keeping the files external and setting the LinkWindows, ive tried copying samples folder into app data and any combination of variables between those options.
the real question is why wouldnt someone actually assist me instead of commenting or seeing this same topic in the forum brought up 20+ times, seems kind of mean :/
i have made plugins in about 5 different platforms all of which had sample recall without any extra attention, its a very rudimentary aspect of what is clearly a sample based plugin creation platform. there is no documentation anywhere about the simplest thing that should exist in a sample based plugin creation platform.
i am trying to use hise to create something, i am in the forum everyday 14+ hours i have posted multiple topics asking the same questions essentially. there is clearly a solution here that alot of people have figured out but that doesnt seem like a very good sense of community sitting and watching someone struggle and never helping :(
-
and how could i not save the samplemaps correctly lol. you click save samplemaps...it saves them...it says samplemaps saved :/ ill upload a simple project that has the code exactly how the only help ive had here tells me how to do it
-
Hey mwplugs,
i just checked your code, and found, that you perhaps accidently misnamed this line:
const var cmbSampleMap = Content.addComboBox("CmbSampleMap", -110,-110); //add a dummy combobox
The variable declaration should always match the StringName of the Content Component. Lowercase c is it.
//onInit Callback Content.makeFrontInterface(600, 500); const var mainSampler = Synth.getSampler("Sampler"); const var cmbSampleMap = Content.addComboBox("cmbSampleMap", 0,0); const var samplemaps = Sampler.getSampleMapList(); cmbSampleMap.set("items", samplemaps.join("\n"));
The Combobox should now give you all the Samplemaps that are saved in the SampleMaps folder. Try it out.
Best,
d -
here is a zip of an example of where im at
http://www.mediafire.com/file/p96u8ouvxx1iri2/Test_Sampler.zip -
thanks @Dominik-Mayer i replaced the code but it still doesnt change the samplemap when i change user presets. i even tried selecting the corresponding samplemap and saving the user preset. in fact when i compile it doesnt even recall any samplemap it makes no noise
-
and fyi it showed the samplemaps before actually. it even shows on the combobox that they change, but the audio never reflects it its the same sample sitting there
-
You've got a typo in your case statement (uppercase instead of lower case)
-
ha!!! figured it out. it was actually a mix of two things. first the Cmb case was wrong, and it was referring to the wrong name for sampler. i got it to properly recall samples and samplemaps now thanks guys!!! wow that was a stressful 15 days lmao
-
Console.print()
is your friend here... -
so is there a way to have the currently loaded samplemap be selected in the combobox? basically so i can hide it and not have to select the corresponding samplemap before saving the user preset everytime. as of now the only way i can get it so recall correctly is by selecting the samplemap in the dropdown before saving. thanks in advance
-
No, but you might be able to just edit the
.preset
files (they are plain XML files after all) and change the value of the combobox in the text editor.Depending on the workflow, this might be more faster - check out the latest video tutorial from David for this:
-
@mwplugs how did you manage to solve it? I can't figure it out