HISE Logo Forum
    • Categories
    • Register
    • Login

    Adding presets to a combobox

    Scheduled Pinned Locked Moved Scripting
    14 Posts 2 Posters 255 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.
    • S
      Sampletekk @d.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?

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

          @Sampletekk Look up the string functions.

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

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

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

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

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

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

              S 1 Reply Last reply Reply Quote 0
              • S
                Sampletekk @d.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?

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

                    @Sampletekk Engine.loadUserPreset()

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

                    S 1 Reply Last reply Reply Quote 0
                    • S
                      Sampletekk @d.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....

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

                        @Sampletekk FIle extension is missing

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

                        S 1 Reply Last reply Reply Quote 0
                        • S
                          Sampletekk @d.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?

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

                            @Sampletekk Yes

                            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

                            7

                            Online

                            1.8k

                            Users

                            12.1k

                            Topics

                            104.9k

                            Posts