Forum
    • Categories
    • Register
    • Login

    Adding presets to a combobox

    Scheduled Pinned Locked Moved Scripting
    14 Posts 2 Posters 852 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.
    • David HealeyD
      David Healey @Sampletekk
      last edited by

      @Sampletekk Loop over the list of presets and add them with that command.

      Or you could use .setItems and the join command, that will only take one line and doesn't require a loop.

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

      S 1 Reply Last reply Reply Quote 0
      • S
        Sampletekk @David Healey
        last edited by

        @d-healey How would I get the list over presets?

        S 1 Reply Last reply Reply Quote 0
        • S
          Sampletekk @Sampletekk
          last edited by

          @Sampletekk said in Adding presets to a combobox:

          @d-healey How would I get the list over presets?

          Found it!

          const var x = Engine.getUserPresetList(); 
          for (i in x)
              Console.print(i);
          

          That prints the full path, that is "bank/Category/Preset", What should I do if I only want the preset name?

          David HealeyD 1 Reply Last reply Reply Quote 0
          • David HealeyD
            David Healey @Sampletekk
            last edited by

            @Sampletekk Look up the string functions.

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

            S 1 Reply Last reply Reply Quote 0
            • S
              Sampletekk @David Healey
              last edited by

              @d-healey You mean this: https://docs.hise.dev/scripting/scripting-api/string/index.html

              David HealeyD 1 Reply Last reply Reply Quote 0
              • David HealeyD
                David Healey @Sampletekk
                last edited by

                @Sampletekk Yes, in there is everything you need - and all you actually need are substring, lastIndexOf and possibly replace

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

                S 1 Reply Last reply Reply Quote 0
                • S
                  Sampletekk @David Healey
                  last edited by

                  @d-healey 👍

                  1 Reply Last reply Reply Quote 0
                  • S
                    Sampletekk
                    last edited by

                    And if you want to make it so you actually load a preset when choosing something in the combobox?

                    David HealeyD 1 Reply Last reply Reply Quote 0
                    • David HealeyD
                      David Healey @Sampletekk
                      last edited by

                      @Sampletekk Engine.loadUserPreset()

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

                      S 1 Reply Last reply Reply Quote 0
                      • S
                        Sampletekk @David Healey
                        last edited by

                        @d-healey said in Adding presets to a combobox:

                        Engine.loadUserPreset()

                        Ok, I'm getting this:

                        Skärmavbild 2025-03-06 kl. 13.56.31.png

                        It says that it doesn't exists, but as I see it, it does....

                        David HealeyD 1 Reply Last reply Reply Quote 0
                        • David HealeyD
                          David Healey @Sampletekk
                          last edited by

                          @Sampletekk FIle extension is missing

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

                          S 1 Reply Last reply Reply Quote 0
                          • S
                            Sampletekk @David Healey
                            last edited by

                            @d-healey said in Adding presets to a combobox:

                            @Sampletekk FIle extension is missing

                            Yep, noticed that. Would you add that by concatenating a text-string?

                            David HealeyD 1 Reply Last reply Reply Quote 0
                            • David HealeyD
                              David Healey @Sampletekk
                              last edited by

                              @Sampletekk Yes

                              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

                              44

                              Online

                              2.1k

                              Users

                              13.0k

                              Topics

                              113.0k

                              Posts