HISE Logo Forum
    • Categories
    • Register
    • Login

    Sampler.getSampleMap() function

    Scheduled Pinned Locked Moved Feature Requests
    8 Posts 2 Posters 1.8k 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.

      Free HISE Bootcamp Full Course for beginners.
      YouTube Channel - Public HISE tutorials
      My Patreon - 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.

          Free HISE Bootcamp Full Course for beginners.
          YouTube Channel - Public HISE tutorials
          My Patreon - 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 :)

              Free HISE Bootcamp Full Course for beginners.
              YouTube Channel - Public HISE tutorials
              My Patreon - HISE tutorials

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

                Bump bump ;)

                Free HISE Bootcamp Full Course for beginners.
                YouTube Channel - Public HISE tutorials
                My Patreon - 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

                    Free HISE Bootcamp Full Course for beginners.
                    YouTube Channel - Public HISE tutorials
                    My Patreon - HISE tutorials

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

                    8

                    Online

                    2.0k

                    Users

                    12.7k

                    Topics

                    110.2k

                    Posts