Mapping samples for a sample selector??
-
I would like to build a template sample selector box that lets me choose a single sample that will be played over the entire keyboard range.
How would I map and script that exactly?This is how I would do it in Kontakt.
In Kontakt I make a group for every single sample.
The sample files are named how they should appear in the gui as well and are stored in sample category subfolders.
Using creator tools I create groups called A-01, A_02 etc. B_01, B_02 etc
A is the category of the subfolder (samples/drones, samples/Cellos etc), and _01 is just the number of the sample of that category.
Then Creator Tools places each sample in the correct group, detects the root note, velocity range and keyboard range.Very curious to learn how I would approach this in HISE
-
Are you letting the user import their own samples or will it be samples you're providing?
-
@d-healey I'd like to learn how to do both ideally
In Kontakt I had x num of factory samples, and then x num of empty user zones in user groups.
-
@observantsound For sample import I recommend this tutorial project - https://github.com/christophhart/hise_tutorial/tree/master/CustomSampleImport
-
@d-healey Thanks! I'll have a look at that.
And for factory samples? Should I just treat the RR groups as if they were Kontakt groups?
I was wondering if it's possible to trigger samples via their IDs and have them all inside one group, and then apply velocity and note scaling manually.
Might be way more work now that I think about it though... -
@observantsound Yeah you could do either. Groups are just another dimension. Note number, velocity, group number are the 3 ways you can map samples in a single sampler, use whichever combination works best for your situation.
-
@d-healey How would I trigger notes via the ID though?
I didn't find any suitable commands in the API list.
there is a sampler.play_note but that only asks for note number and velocity -
@observantsound Not something I've explored but you can create selections of samples and access their various data properties, so perhaps that would help.
-
@d-healey Thx. I'll give it a try
-
@observantsound
What about automatically setting the root for factory samples though?
It seems like I can either do set root automatically OR use the token parser but not both... : / ?Maybe I do it like this?
Drop everything in, detect root note automatically, export sample map as xml, then process the file to set each sample in its own group?