HISE Logo Forum
    • Categories
    • Register
    • Login

    Help With SampleMap Selector

    Scheduled Pinned Locked Moved General Questions
    20 Posts 4 Posters 1.9k 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.
    • DalartD
      Dalart
      last edited by

      Anyone ?

      1 Reply Last reply Reply Quote 0
      • Christoph HartC
        Christoph Hart
        last edited by

        Content.makeFrontInterface(600, 500);
        
        
        const var Viewport = Content.addViewport("Viewport", 0, 0);
        
        Content.setPropertiesFromJSON("Viewport", {
        "text": "Presets",
        "width": 189,
        "height": 300,
        
        "useList": true,
        "pluginParameterName": "Presets",
        "items": ""
        });
        // [/JSON ComboBox]
        
        const var Sampler = Synth.getSampler("Sampler");
        const var sampleMapList = Sampler.getSampleMapList();
        Viewport.set("items", sampleMapList.join("\n"));
        
        inline function onViewportControl(component, value)
        {
            Sampler.loadSampleMap(sampleMapList[value]);	
        };
        
        Viewport.setControlCallback(onViewportControl);
        

        The main difference is to set the useList property to true to transform the viewport to a selectable list. Also note that the index is zero based, so you don't need to subtract 1 in the callback (please don't ask why).

        DalartD 1 Reply Last reply Reply Quote 2
        • DalartD
          Dalart @Christoph Hart
          last edited by Dalart

          @christoph-hart Thank you very much !

          1 Reply Last reply Reply Quote 0
          • DalartD
            Dalart
            last edited by

            Is there a way to recall the knob settings along with the SampleMap ?

            For instance I have a simple reverb unit, but may have different amount for each SampleMap, when selecting SampleMap using the above code none of the knob settings recall.

            I feel like I am missing or not understanding something.
            Hopefully someone can help, or help me understand.

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

              @dalart You can use the user preset system

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

              DalartD 1 Reply Last reply Reply Quote 1
              • DalartD
                Dalart @d.healey
                last edited by Dalart

                @d-healey Thank you for responding.

                Is there an example available that loads both the SampleMap & UserPreset at the same time ?

                1 Reply Last reply Reply Quote 0
                • staiffS
                  staiff
                  last edited by staiff

                  if you choose 1 samplemap + knob settings and saving it in a preset, this preset will recall all (samplemap + settings).

                  As David said just use the preset system. Don't forget of course to set your viewport to "save in preset" = yes.

                  ;)

                  Excuse me i'm French.

                  DalartD 1 Reply Last reply Reply Quote 1
                  • DalartD
                    Dalart @staiff
                    last edited by

                    @staiff Thanks for responding. I'll have to try that out :)

                    DalartD 1 Reply Last reply Reply Quote 0
                    • DalartD
                      Dalart @Dalart
                      last edited by

                      @dalart It seems once I change the setting "save inPreset" to enabled on the Viewport it crashes Hise.
                      Im starting with the CustomUserPreset example, adding a sampler, and changing the setting on the viewport then it crashes. :(

                      1 Reply Last reply Reply Quote 0
                      • DalartD
                        Dalart
                        last edited by

                        Ok, I have downloaded and compiled the latest development branch, to use the newest method of the preset browser after finding out in another forum thread that new customization options had been added to the branch.

                        Everything seems to work and appears to be exactly what I need, but I have a couple questions about hiding certain elements of the preset browser.

                        Id like to hide the search bar element and the star element, I looked through the documentation and the API but was unable to locate the info.

                        Any guidance would be appreciated tremendously.

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

                          @dalart Can't be done yet as far as I can see.

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

                          1 Reply Last reply Reply Quote 1
                          • DalartD
                            Dalart
                            last edited by

                            @staiff said in Help With SampleMap Selector:

                            if you choose 1 samplemap + knob settings and saving it in a preset, this preset will recall all (samplemap + settings).

                            As David said just use the preset system. Don't forget of course to set your viewport to "save in preset" = yes.

                            ;)

                            Im not seeing the saveInPreset property when using the floating tile PresetBrowser :(

                            1 Reply Last reply Reply Quote 0
                            • staiffS
                              staiff
                              last edited by staiff

                              save in preset
                              samplemap is saved inside the preset !
                              text alternatif

                              Excuse me i'm French.

                              DalartD 1 Reply Last reply Reply Quote 1
                              • DalartD
                                Dalart @staiff
                                last edited by

                                @staiff Thanks, I managed to get it working !

                                I have a question about customizing the the default PresetBrowser that's in the floating tile properties:

                                I would like to customize it to look like this:
                                0_1541016215776_display.jpg

                                If none of this can be achieved using the default PresetBrowser, is there a way to build one to fit these needs ?

                                d.healeyD DalartD 2 Replies Last reply Reply Quote 0
                                • d.healeyD
                                  d.healey @Dalart
                                  last edited by

                                  @dalart That can't be done with the default browser. You can create your own using panels and the load preset function but last time I checked the save function didn't work (might do now though).

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

                                  DalartD 1 Reply Last reply Reply Quote 0
                                  • DalartD
                                    Dalart @d.healey
                                    last edited by

                                    @d-healey Thanks for responding :)

                                    Im probably stuck with this until more customization options are added, I cant code at all, Im usually trying to edit snippets I find on the forum, but I truly dont understand the code.

                                    1 Reply Last reply Reply Quote 0
                                    • DalartD
                                      Dalart @Dalart
                                      last edited by

                                      @dalart said in Help With SampleMap Selector:

                                      @staiff Thanks, I managed to get it working !

                                      I have a question about customizing the the default PresetBrowser that's in the floating tile properties:

                                      I would like to customize it to look like this:
                                      0_1541016215776_display.jpg

                                      If none of this can be achieved using the default PresetBrowser, is there a way to build one to fit these needs ?

                                      @christoph-hart is there any way to hide/change these elements ?

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

                                      23

                                      Online

                                      1.7k

                                      Users

                                      11.8k

                                      Topics

                                      102.8k

                                      Posts