Forum
    • Categories
    • Register
    • Login

    Wavetable Synthesiser Preset Link to Combo Box

    Scheduled Pinned Locked Moved General Questions
    5 Posts 4 Posters 63 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.
    • C
      capygeneral
      last edited by

      I was able to save multiple wavetables and would like to link the dropdown from the wavetable synthesiser to a combo box so that I can select which wavetable is being used from the user interface. I see that I cannot just link it from the combo box properties. Is there a way for me to do this?

      9c40655c-a9dc-47d6-b010-92c0e10fb2e6-image.png

      dannytaurusD Oli UllmannO 2 Replies Last reply Reply Quote 0
      • dannytaurusD
        dannytaurus @capygeneral
        last edited by

        @capygeneral Did you try hooking up the combo box to LoadedBankIndex?

        From the docs:

        LoadedBankIndex - This will store the index of the wavetable in the current list.

        CleanShot 2025-12-18 at 11.09.08@2x.png

        Meat Beats: https://meatbeats.com
        Klippr Video: https://klippr.video

        1 Reply Last reply Reply Quote 0
        • Oli UllmannO
          Oli Ullmann @capygeneral
          last edited by

          @capygeneral
          Here you go. :-) Please note that the WaveTable files must be located in your "AudioFiles" folder for the snippet to work.

          All the best
          Oli

          HiseSnippet 1187.3oc0W0saaaCElxNrXVqEnsnCnWJDrKbFBBrarSZQw5bsiypQiSMhyR2cAzRTVDQhTUhNIFC8YXuZ6QYuAaGR4enRbSc8Zx17EF37GOe7Pd93Q8RDtzzTQBxx93wwTj08w8GykAsBHLNpydHqR3PAw68GmhZNNljlR8PVVE+YkYqRqgz+9yepIIjvcoyUgPmHXtzCXQL4bs8Z7VVX39DO5wrHCuq0niqf2RDJFAPoHtBJl3dFYH8PhxsBXzaHoAHqe.WolK44Oyu91a+hWracuATW+pzA65RpTm3Wm.ZqQpUuZMj08Z6wjhj9RhjlhrVqovab+.wE7rDbBKkMHjpDph5CYNS89hPO0VToE0JfE50aZMJEgrv8lWwJlUwdBtKyiMS+7J2C0FblGgYAzpPd3ULG7pZBuJFvaAPxx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sHTD7pyott4WpqE3yV0.2dUCr1pFX8UMvcV0.2cUC74e9.UCE75QRQTFkHB0sWa82gXY0lqZjzsLn+FzLt2OH
          
          C 1 Reply Last reply Reply Quote 1
          • OrvillainO
            Orvillain
            last edited by

            Use this as a control callback on the menu:

                inline function populateSynthSoundMenu(component, value)
                {
                    local wavetables = Engine.getWavetableList();
            
                    if (!isDefined(wavetables) || wavetables.length == 0)
                        return;
            
                    component.set("items", JoinItems(wavetables));
                }
            

            You'll also need this helper:

                inline function JoinItems(sa)
                {
                    local s = "";
            
                    for (i = 0; i < sa.length; i++)
                    {
                        s += sa[i];
            
                        if (i < sa.length - 1)
                            s += "\n";
                    }
            
                    return s;
                }
            

            It means that each time you click the menu, it will update itself with the latest wavetable list.

            Now each one of these can be resolved from the menu in one of two ways.

            1. Use the menu 'value' to get the index of it in the list - indexes starting from 1.
            2. Use the '.getItemText()' function on the menu component, to get the actual text.

            Option 1 can be used directly with the LoadedBankIndex parameter. I don't know how that would slot into your project, but in principle this is how you'd do it.

            Musician - Instrument Designer - Sonic Architect - Creative Product Owner
            Crafting sound at every level. From strings to signal paths, samples to systems.

            1 Reply Last reply Reply Quote 1
            • C
              capygeneral @Oli Ullmann
              last edited by

              @Oli-Ullmann Snippet worked flawlessly thank you

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

              26

              Online

              2.1k

              Users

              13.1k

              Topics

              113.3k

              Posts