HISE Logo Forum
    • Categories
    • Register
    • Login

    Sampler.getSampleMap() function

    Scheduled Pinned Locked Moved Feature Requests
    8 Posts 2 Posters 1.4k 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.
    • d.healeyD
      d.healey
      last edited by

      Could we have a function to get the name of the currently loaded sample map for a particular sampler, that way I can save it with my preset data and load it automatically when changing presets.

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

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

        What I am doing in this case is to just store the control value of the widget that loads different sample maps:

        const var sampleList = Sampler.getSampleMapList();
        
        for(sampleMap in sampleList)
        {
            comboBox.addItem(sampleMap);
        }
        
        function onControl()
        {
            Sampler.loadSampleMap(sampleList[comboBox.getValue()]);
        }
        

        A combobox would be the easiest component, but you can also use a custom panel for this.

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

          The problem I have is this requires a combo box for each sampler. What I'd like to do is loop through all the samplers and store all of the current sample map names in an array which is then stored in a hidden storage panel.

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

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

            Ah, I see. That should be no problem, I'll add this method (I'll call it Sampler.getCurrentSampleMap() though).

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

              Thanks again :)

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

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

                Bump bump ;)

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

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

                  I've just added this.

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

                    I see you've been busy with commits today :) thanks

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

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

                    48

                    Online

                    1.7k

                    Users

                    11.7k

                    Topics

                    101.8k

                    Posts