Is there a way to order samplemaps in the sampler
-
I think the answer to this is no, but is there a way to order/re-order samplemaps in the sampler? Specifically which samplemap is saved in which preset.
I think by default they are sorted alphabetically but I'm wondering if they can be manually ordered?
Basically I have presets that use particular samples that change when you pick a different preset.This works fine, but if I add another samplemap that would appear somewhere in the middle of the existing list then it affects any presets that use a sample that comes after it. It will remap the preset to use what would have been the 1 sample earlier before I added the new one. I hope that makes sense?
I presume the presets look at and use the samplemaps in order so preset 5 uses sample 5 for example and not a specific name - this makes sense so that you can rename a sample map and not break it I guess.
But if I add a sample that comes before samplemap 5 then the preset will use whatever is now samplemap 5 after the new one has been added and not the original samplemap 5.Is there a way around this?
Basically I would like to have my samplemaps in groups so all basses are together, all bells etc. But if I add any of those in now it shunts everything along and all the presets that come after it are now using the wrong samples. I have over 120 presets so it is a lot of presets to note down the samples used and remap them by hand. I'd like to avoid having the first ones sorted by name/group and then a mishmash at the end that I have added on later.
-
@rzrsharpeprod said in Is there a way to order samplemaps in the sampler:
Specifically which samplemap is saved in which preset.
Sample maps aren't saved in the preset, that's under your control.
A simple solution is to have an array containing all the sample map names. When you add a new sample map it goes at the end of the array. Then you have a control on your UI, a knob/slider for example, and inside this control's callback you load the sample map into the sampler, using the control's value as the array index.
In this video I show how to do it with a combo box. I'm not manually creating the array here because I'm happy with the default order (I'm using the getSampleMapList() function to give me a pre-made array, but just swap that out with your custom array).
-
@d-healey Thankyou David, I'll look at this later when I'm home and see if I can implement it.
Would the new samplemap that goes to the end of the array then appear at the end of the list in a combo box drop down or alphabetically?
Thinking about it, that is actually what I am ultimately trying to do isn't it? Sort the samplemaps in the combo box drop down alphabetically so that they all appear to be in order for the user to select from.
Then it doesn't matter what order I add them in or Hise sees them as as long as I can sort the list in the combo box alphabetically. -
@rzrsharpeprod said in Is there a way to order samplemaps in the sampler:
Would the new samplemap that goes to the end of the array then appear at the end of the list in a combo box drop down or alphabetically?
You can have them show up in any order, but that requires a little more work.
If you have a fixed amount of sample maps (you won't be adding or removing them once the product is released), and you want them to be alphabetical. You can use the in built getSampleMapList() function I use in the video, and then run the sort command to automatically arrange them alphabetically.
-
@rzrsharpeprod a "no-coding" hack I found was to rename the XML files in the sample maps folder in your project folder...I had to do that on one of my compiled projects that I had to come back and add in new samplemaps...when I added the new ones in it messed up my presets...took a bit of going back and forth but renaming the XMLs worked for me
-
@d-healey said in Is there a way to order samplemaps in the sampler:
@rzrsharpeprod said in Is there a way to order samplemaps in the sampler:
Would the new samplemap that goes to the end of the array then appear at the end of the list in a combo box drop down or alphabetically?
You can have them show up in any order, but that requires a little more work.
If you have a fixed amount of sample maps (you won't be adding or removing them once the product is released), and you want them to be alphabetical. You can use the in built getSampleMapList() function I use in the video, and then run the sort command to automatically arrange them alphabetically.
Thankyou David, that makes sense and should give me what I need I think
-
@johnmike said in Is there a way to order samplemaps in the sampler:
@rzrsharpeprod a "no-coding" hack I found was to rename the XML files in the sample maps folder in your project folder...I had to do that on one of my compiled projects that I had to come back and add in new samplemaps...when I added the new ones in it messed up my presets...took a bit of going back and forth but renaming the XMLs worked for me
That is kind of what I have been doing up until now.
But now I have so many presets that it will be a fair bit of work to figure out which presets use which 2 samples and then remap them all once I have added new ones. I'm hoping I can get the sort to work so I can just tack some on the end but they will still show up in the 'right order' on the combo box drop down.If it's just a small number of presets then this is a nice workaround I agree. I did it with my last project and it worked well
-
@rzrsharpeprod yeah that makes sense!
-
@d-healey said in Is there a way to order samplemaps in the sampler:
@rzrsharpeprod said in Is there a way to order samplemaps in the sampler:
Would the new samplemap that goes to the end of the array then appear at the end of the list in a combo box drop down or alphabetically?
You can have them show up in any order, but that requires a little more work.
If you have a fixed amount of sample maps (you won't be adding or removing them once the product is released), and you want them to be alphabetical. You can use the in built getSampleMapList() function I use in the video, and then run the sort command to automatically arrange them alphabetically.
After messing with this a bit I'm now back to being convinced that it's not possible.
I have 2 samplers and any given preset uses 2 samplemaps, 1 for each sampler. If I add new samplemaps using a name such as Bells 10 for example, then that will appear on the drop down in the right place but it will mess up the presets as it will reference the wrong samplemaps as everything after bell 10 is now 1 sample further along.
If I give bell 10 a name like zzz bell 10 (silly example) that will put it at the end of the list and won't mess.up any presets. But it also doesn't allow me to have all the bells together which is really what I want. I can't use the sort function as it will put zzz bell 10 at the end of the list alphabetically.
I just don't think it's possible without going into each of the 135 presets (I just counted them) and noting down which 2 samples are used, qdding the new samplemaps with the correct names and then manually changing the samplemaps on the 135 presets again.
That's a lot of work and I wouldn't mind doing it once, but it's still in development and we may conceivably want to add more samples between now and beta testing. I don't want to have to do this every time I add a samplemap and I'd like to avoid having all of the bells at the start of the drop down but 1 or 2 at the end of the list.I'm struggling to figure out a way to make it work.
-
@rzrsharpeprod explain clearly - with an example - what it is you are trying to achieve...DONT talk about how it would be implemented -just what the user sees...
-
@Lindon said in Is there a way to order samplemaps in the sampler:
@rzrsharpeprod explain clearly - with an example - what it is you are trying to achieve...DONT talk about how it would be implemented -just what the user sees...
Ok I will try and explain more clearly, thankyou.
There are 2 samplers each with a drop down combobox
There user can select presets using the preset browser
When they choose a preset, it loads a samplemap into sampler 1 and another into sampler 2.All the samplemaps are listed alphabetically in the drop downs. If I add a new samplemap that would appear in the middle of the list alphabetically then any presets using samplemaps that appear after the one I have just added are now incorrect.
I think this is because if the preset is looking at/using samplemaps 20 & 25 say. If I added a new samplemap that appears anywhere before (1st to 19th in the list for example) then the preset is still looking at samplemaps 20 & 25 which are now different due to the added samplemap. The original samplemap 20 is no 21 and so on.Basically I would like to be able to add new samplemaps that would appear in the 'right' place alphabetically but really they are at the end of the samplemaps/array so that everytime I add one I can call it something so if goes in the right place alphabetically but I don't have to go through my presets and reassign the samplemaps in them.
I hope that makes more sense?
-
You need to separate the visual list that the user sees (the combo box) from the list of sample maps that are actually loaded. There are a few ways to do this, probably the one that is easiest to visualise is a lookup object.
Here is a simple example I made.
HiseSnippet 950.3ocsV01aaaCDlxIpaV6EzBze.B9Sx.YF1Mu1MTrTaGuYrkTi4rhArMTvPcNlvTjBhzowXH++1Om8OX6HkjkxhQVq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qb84ne9c6zkjfut9NFyl9eE1NtYedwV3y9agOGrE9b3V3yQagOGuE9bxi5i8Cad8RiJIuc.Alblafmm2YRJVY4pBI+C3C6JSA
-
@rzrsharpeprod OK, so - Dont use a comboBox to load the samplers - use a Label - which you set to saveInPreset
- populate the label using a comboBox....
So the label does the Sampler Load based upon the text value it is holding:
The comboBox uses its getItemText() call to populate the Label and calls changed() on the Label...
HiseSnippet 914.3ocsV01habCDVx2oj3MuPBje.BCArIWNrSujVHDpieKXZtKN0WC4aoxZGeVbZkV1U95YBA5W5+29OncztqsWmy2QwzLev34MMOynYFsiRrRHM0lPnUOcQLPn2iMdgwMq6LgxPF1iPe.6XQpCR34h5rHVjlBgDJcu25EPqtOIi96etiPKLRXsHB4iVkDdmJR4VKcT6eQo0CDgvopnRVeT6gRqoqUami3YOVSRrPdt3L3Dg2rJLB8V8CUNaxXmvAoD59crgKFOy9Glb6+nJUMQCdlVjw3AkKdfUG5QrWJo6LkNbzx7Nkfmxn0Ug8xqBOlcrJTsR95pwCyTvW6Q45AsxlvauMfWqxvqYI3sEHQKAo8ygziXikIpX2ZMd7bW1PCd4LUfk8xPI2VRk+pBqqEsv3NLRbNLHAYV4Q8W1r4Ab7mFuJH.K8oN9EhD96DS.cK9q4K87Lv00FEaMHS8Z4pq48IiTFsx.7oyMRmxZ39qvnI1N1Ka4OfDqttbo2GfAPOGZD7kfp4mygo.dlN3RWsC3qryGxgNH5TTd8FXnVZsblvbFDVuwqpF7UDAaGhq.PsF9yu.FcEZ8Drip9UQXVxb0DIOn2XVfJSsZ3v3DkOxZqHjK3ohnXMDIh4RLnPHuF+oalcE4rO2t97XYod6IwFnymAkP9IVG7dS8LHF70.92pZ5zspq3vzPxVU6mWStIGqalGMARJWf7FhMwaNYvt9IixCtx7pRICslgFk68wf45FmIEkR7e+1vdBmvONUHCsKFRbJODn8fKvcS4CWUY8fzyc1XbMyp5OgdaWl1GVL5srqgnB8SdqZhHWtdIVu1KVwz92aGIPcL5sQNE1Oi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bBwU3auNV9QayEwZnq4mJYTvgDRoR8LiU7VcirZhbKg9wllNci1x2ckHYilciJRtu.anmGMQjTlQcNB8Oq2Th2dSY4YFbOCTxQidnVZearPusIInbZC92eLrGyxbcx45.+hEIVoCBA8DWCiE8800v8DoWYMw.RWw0nfu1lY8Q4c8KodjLz0zu5KA5lUyO+23iVrZw+7aGEw.a3f8gURn6.12Cv9lJxwfP5.BoKHjdfP5CBY.HjWCBAkxtVLTOJQ.eocSTPk.G1CtGlCtriOYHaer+nTIXg5sNrbGVgA4XGFPeNI8YaKoneIOoO.eBzz.8Hmxh+rR8y2FM9QoldrO02c5LbufIbthYW+xB2Mj4FfCqqMg1MEVmJsKJeC5+a2f7oBwGiGIs7YaFiU1.FgizeIvX98tOD2e5TA2V.v8vC9yuLWxh9cybqTe4oLahz0pb17nwvSO3BX20ZgxMrHnhqs1utkasiAFKzgYKdOH4Fa6VGjar8RinHFOw7NteDk6l88yz.XRm8nlZvqqf0z1nrwVPb3VG1BEAOx3cbtq7eJLoYyw7rcHlmuCw7hcHleXGh4k6PL+3NDyOcuw3de2wyslHe6.nXT+rY4AA80L3jU1oPzG.wKDEaA
-
Thankyou both. I tried both methods and have come up with something that works.
I need to do a little rejigging of the samples once to get it working 100%.
That is a one time job and after that I can add new samplemaps without messing up my presets and having to manually reassign the samplemaps which is exactly what I wanted.Thanks again, your help is much appreciated