HISE Logo Forum
    • Categories
    • Register
    • Login

    Is there a way to order samplemaps in the sampler

    Scheduled Pinned Locked Moved General Questions
    15 Posts 4 Posters 705 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • R
      rzrsharpeprod @d.healey
      last edited by

      @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

      1 Reply Last reply Reply Quote 0
      • R
        rzrsharpeprod @johnmike
        last edited by

        @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

        J 1 Reply Last reply Reply Quote 0
        • J
          johnmike @rzrsharpeprod
          last edited by

          @rzrsharpeprod yeah that makes sense!

          1 Reply Last reply Reply Quote 1
          • R
            rzrsharpeprod @d.healey
            last edited by

            @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.

            LindonL 1 Reply Last reply Reply Quote 0
            • LindonL
              Lindon @rzrsharpeprod
              last edited by

              @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...

              HISE Development for hire.
              www.channelrobot.com

              R 1 Reply Last reply Reply Quote 0
              • R
                rzrsharpeprod @Lindon
                last edited by

                @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?

                LindonL 1 Reply Last reply Reply Quote 0
                • d.healeyD
                  d.healey
                  last edited by

                  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++1Om8OX6HkjkxhQVqAl+fAum6Nx6d3cG0jLECzZUFwq4kqRAh2m6OckzLevbJWRFOj38k9mS0FHKLGp+pTpVCwDOuc9NKfWycIte+021mJnRFTAQHuUwYvOxS3lJzIm9CbgXDMFtjmTy5CNcLSIGnDpkX7rieWRJksfdMbA0ZVCeh2SNKlaTYSMTCnQa5qhWMct58xb6eKWyuR.Vgdjo3FkCSFLmKhmTlqZBwa2IUY9N4Y9y8OmGyWiWw.O0oHrxi5bfWiGKj58QDRd0BocyCom4OkkwSMUZrwym4OVhWHynHUWOTxskz3Oa3OPgVHMcRnKfQYnvZOhNpa28Bw+Z+MAAHcqMgTIOgJzguJL3OBZ150Nwvds95vVCUW2ZuJrWXwFPM0w12hMhqmWG7.KXedVbcvCcdqdecribXy4rEfrN9wV7uGIFnN5IVzyUxEvp5vuzYLMwVlVGuWWWrkgIQvcX5FDvkBtDBmsTxLbkLzVtkbkpu51dVJKSIhXpjTkDIu8BugJVBssjhPwv8SCBfYf3wFHAYq0V14ZvXwtDt0Dg7Zg447JZXAA+q08+2QyBZxmEFw0CgYXTEGkaW61AMwirIFPZk.5jlwklRcnW20zkLkWw3YOnLPhZsNcZ0ti1pwkTCnBwUXuTzCyWbGqwFWnLvajQtbN3tfv+spYy1nth8R.YaTssMO6wbLRtL4JHqNiaMD6Ctey0S9vZtX4TSMCUxwRt4MoPg7HkH11zXW+vVQRA2hq94wCoFps6r.CsKExLba33MDtAGuk2q1zeHnWXToNaKtPHdehwo8oEcxkzOgGaajWeaPtsZN33SWUWHgh578BPANV3fm6u4WVfGT1XVtX+xEGTt3vxEGUt33xEmTt3kAq6XHZ5MvX4jL.KerSUHObrDNPTEuTPM2eJo84fBE3s68FMYG+H0byp5OW7QL5r6iN57CMDel+DtgMeywXiMDi389+GwXwCNeg+YylgCDpBvc8G8Ka6qK+GG+OoVZ3xqOmZx315oKVlLEemkA3oKkfPaqwZXq8yk6ZksLvTPF6D9a7WgxdVYuBk8JURRnrL06X48z1mz9TGBFSR2K3MwOk.kC6Qb84ne9c6zkjfut9NFyl9eE1NtYedwV3y9agOGrE9b3V3yQagOGuE9bxi5i8Cad8RiJIuc.Alblafmm2YRJVY4pBI+C3C6JSA
                  

                  Libre Wave - Freedom respecting instruments and effects
                  My Patreon - HISE tutorials
                  YouTube Channel - Public HISE tutorials

                  1 Reply Last reply Reply Quote 1
                  • LindonL
                    Lindon @rzrsharpeprod
                    last edited by Lindon

                    @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+1vdBmvONUHCsKFRbJODn8fKvcS4CWUY8fzyc1XbMyp5OgdaWl1GVL5srqgnB8SdqZhHWtdIVu1KVwz92aGIPcL5sQNE1Oiw8Ir2fTPGjB5hTPOjB5iTv.jBdKRAjTwEvPynD.u48yyjRnhkip6Wfpr1fLHcGVdKw0gm+7Cs8Mc3ZTlOd3l3qrkA2uYCmqEtMW542zWn.uu2XSieahIU4VT9kf+21D9eEhOhMR4jy1NFqrELhcEeOvXw6G2m0e5TP5VCv8YC9z2mGKH+pctSYN6XgKQ461NYdzX7ITIfQ2X.sediVwOYjy2zy6q.iASXFy+fTgxVddZgxVKURhDxD6mk4S49WntSlDDSlrGmqhek.xyaQxl7Q+XMOrIIBer7yRoO8eFNrtced9N3yOrC9bzN3yK1Aed4N3yOtC97S2nO9uS4Myc1n7wATvn9YqCoz9FA1Yk0ER9W7nKCmO
                    

                    HISE Development for hire.
                    www.channelrobot.com

                    LindonL 1 Reply Last reply Reply Quote 1
                    • LindonL
                      Lindon @Lindon
                      last edited by

                      @Lindon

                      Slight update:

                      HiseSnippet 982.3ocsV0saaaCElxNbKlqcnEXO.b9Jazz.61ttALzsD+WgQSR8lyB1cEzTzwDghTPhNKFCAXOp6QXuAsG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AFKzgYKdOH4Fa6VGjar8RinHFOw7NteDk6l88yz.XRm8nlZvqqf0z1nrwVPb3VG1BEAOx3cbtq7eJLoYyw7rcHlmuCw7hcHleXGh4k6PL+3NDyOcuw3de2wyslHe6.nXT+rY4AA80L3jU1oPzG.wKDEaA
                      

                      HISE Development for hire.
                      www.channelrobot.com

                      R 1 Reply Last reply Reply Quote 1
                      • R
                        rzrsharpeprod @Lindon
                        last edited by

                        @Lindon @d-healey

                        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

                        1 Reply Last reply Reply Quote 1
                        • First post
                          Last post

                        47

                        Online

                        1.7k

                        Users

                        11.7k

                        Topics

                        101.8k

                        Posts