HISE Logo Forum
    • Categories
    • Register
    • Login

    Expansions / Combo Box + SampleMaps

    Scheduled Pinned Locked Moved General Questions
    109 Posts 4 Posters 5.7k 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.
    • DanHD
      DanH @Lindon
      last edited by

      @Lindon the combo box callback searches available expansions and makes a list

      DHPlugins / DC Breaks | Artist / Producer / DJ / Developer
      https://dhplugins.com/ | https://dcbreaks.com/
      London, UK

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

        @DanH That sounds like a weird way to do it. Why not juse use expHandler.getExpansionList()?

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

        DanHD 1 Reply Last reply Reply Quote 0
        • DanHD
          DanH @d.healey
          last edited by DanH

          @d-healey that is how I'm doing it actually 😆

          const var expansionNames = [];
          
          expansionNames.push("FACTORY");
          
          for(e in expHandler.getExpansionList())
              expansionNames.push(e.getProperties().Name);
              
          const var ExpansionSelector = Content.getComponent("ExpansionSelector");
          ExpansionSelector.set("items", expansionNames.join("\n"));
          
          inline function onExpansionSelectorControl(component, value)
          {
          	expHandler.setCurrentExpansion(component.getItemText());
          };
          
          Content.getComponent("ExpansionSelector").setControlCallback(onExpansionSelectorControl);
          

          ExpansionSelector is the combo box

          DHPlugins / DC Breaks | Artist / Producer / DJ / Developer
          https://dhplugins.com/ | https://dcbreaks.com/
          London, UK

          d.healeyD LindonL 2 Replies Last reply Reply Quote 1
          • d.healeyD
            d.healey @DanH
            last edited by

            @DanH said in Expansions / Combo Box + SampleMaps:

            that is how I'm doing it actually

            Aha, that isn't what you said :p Now it makes sense.

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

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

              @DanH so your combo box always has a valid list of expansions in it, so whats the problem?

              HISE Development for hire.
              www.channelrobot.com

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

                @Lindon If expansions are added or remove the list will need to be updated, this means the indexes will change in the combobox, so restoring from saveInPreset based on those saved indexes will cause a different expansion to be loaded.

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

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

                  @d-healey said in Expansions / Combo Box + SampleMaps:

                  @Lindon If expansions are added or remove the list will need to be updated, this means the indexes will change in the combobox, so restoring from saveInPreset based on those saved indexes will cause a different expansion to be loaded.

                  Correct - but as the "original" preset is no longer there its either load another or load nothing right?

                  HISE Development for hire.
                  www.channelrobot.com

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

                    @Lindon Well he's got it kind of working backwards I think because usually the last used preset should load and this will automatically load the correct expansion, but since he's using saveInPreset to load expansions it will go preset >> expansion >> combobox >> expansion >> ? or some other weirdness.

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

                    DanHD 1 Reply Last reply Reply Quote 0
                    • DanHD
                      DanH @d.healey
                      last edited by

                      @d-healey @Lindon actually I think I made a bollox of another part of the script and in fact not having the combo box as Save in Preset will actually work!

                      DHPlugins / DC Breaks | Artist / Producer / DJ / Developer
                      https://dhplugins.com/ | https://dcbreaks.com/
                      London, UK

                      DanHD 1 Reply Last reply Reply Quote 1
                      • DanHD
                        DanH @DanH
                        last edited by

                        @d-healey I still think the preset browser is messed up though, i.e the Factory folders still appear when they should be the expansions'... if anyone else is able to test....

                        DHPlugins / DC Breaks | Artist / Producer / DJ / Developer
                        https://dhplugins.com/ | https://dcbreaks.com/
                        London, UK

                        DanHD 1 Reply Last reply Reply Quote 0
                        • DanHD
                          DanH @DanH
                          last edited by DanH

                          Is there a way to get an active expansion's name? Can't figure it out from the docs

                          DHPlugins / DC Breaks | Artist / Producer / DJ / Developer
                          https://dhplugins.com/ | https://dcbreaks.com/
                          London, UK

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

                            @DanH There is a getCurrentExpansion() function and you can get the properties of the expansion with getProperties() and the properties includes the name.

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

                            DanHD 1 Reply Last reply Reply Quote 0
                            • DanHD
                              DanH @d.healey
                              last edited by

                              @d-healey Thanks, useful bit of script here for anyone interested:

                              Link Preview Image
                              getting info(String) from file.

                              File.loadAsString()

                              favicon

                              Forum (forum.hise.audio)

                              DHPlugins / DC Breaks | Artist / Producer / DJ / Developer
                              https://dhplugins.com/ | https://dcbreaks.com/
                              London, UK

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

                              27

                              Online

                              1.8k

                              Users

                              12.0k

                              Topics

                              104.2k

                              Posts