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 @d.healey
      last edited by

      @d-healey Thanks David, the parallel combo box is working for now. If I'm feeling brave later on I'll try this!

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

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

        @d-healey Ran into a slight glitch wit my combobox method. Just to refresh:

        I'm using a combo box to switch between Expansions on my UI. Everything working nicely except:

        I've got the combo box set to 'Save in Preset'. This means that everything gets loaded as I want it in a DAW project. Great.

        However, the combo box saves a value, not an expansion. Therefore if a user changes the list of expansions (either by adding or removing expansions) then this system breaks, and potentially loads the wrong expansion etc.

        Removing Save in Preset creates a kind of hybrid when reopening the DAW project (saved in exp mode) where the samples maps are factory (as per my script) but the UI is in Expansion mode (extra images etc). Even the Preset Browser is combined, displaying the Factory folders on the left but the expansion presets on the right 😆

        And if the value is higher than the amount of Expansions installed it reverts to Factory

        Am I screwed?

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

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

          @DanH said in Expansions / Combo Box + SampleMaps:

          Am I screwed?

          Maybe, but I think I will be too because I'm planning something similar in my project. Once I get there I'll find a solution :)

          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 said in Expansions / Combo Box + SampleMaps:

            Therefore if a user changes the list of expansions

            .. how are they doing this?

            Can yo use it to write/re-write a list of valid expansions to disk - and then use that to load up your combo box.?

            HISE Development for hire.
            www.channelrobot.com

            DanHD 1 Reply Last reply Reply Quote 0
            • 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

                                      41

                                      Online

                                      1.8k

                                      Users

                                      12.0k

                                      Topics

                                      104.2k

                                      Posts