HISE Logo Forum
    • Categories
    • Register
    • Login

    Filter Mode Dropdown Bug

    Scheduled Pinned Locked Moved Bug Reports
    6 Posts 3 Posters 986 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.
    • Tod SlaughterT
      Tod Slaughter
      last edited by Tod Slaughter

      https://i.imgur.com/8ef4J0B.gif

      d.healeyD 1 Reply Last reply Reply Quote 1
      • d.healeyD
        d.healey @Tod Slaughter
        last edited by d.healey

        @tod-slaughter The combo box returns a number starting at 1 and it seems the order of the filter names doesn't line up with the numbers so you have three options, reorder the names in your combo box, convert the numbers to the correct filter numbers via script, or wait for Christoph to offer a better solution :)

        @Christoph-Hart This doesn't seem to work

        const var modes = Engine.getFilterModeList();
        
        for (k in modes)
        {
            Console.print(k);
        }
        

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

        1 Reply Last reply Reply Quote 0
        • Tod SlaughterT
          Tod Slaughter
          last edited by Tod Slaughter

          @d-healey
          re-ordering the names causes a crash unfortunately

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

            @tod-slaughter Could you post a snippet demonstrating the crash?

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

            Tod SlaughterT 1 Reply Last reply Reply Quote 0
            • Tod SlaughterT
              Tod Slaughter @d.healey
              last edited by

              @d-healey

              I'd have to reproduce it via trial and error ☹

              1 Reply Last reply Reply Quote 0
              • Christoph HartC
                Christoph Hart
                last edited by

                The filter IDs are not subsequent because it would prevent me from adding new filters without breaking backwards compatibility. That's why the FilterModeList object is there. Basically you create a custom array containing all filters you need and add get the correct filter ID via this code:

                const var modes = Engine.getFilterModeList();
                
                const var myFunkyFilters = [modes.LowPass, 
                                            modes.StateVariableNotch];
                
                comboBox.addItem("LowPass");
                comboBox.addItem("Notch Funky Yeah");
                
                inline function onComboBoxControl(component, value)
                {
                   local filterIndex = value - 1;
                   filter.setAttribute(filter.Mode, myFunkyFilters[filterIndex]);
                }
                

                Protip: If you type modes. and press Escape you get a dropdown with all filter modes available.

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

                47

                Online

                1.7k

                Users

                11.7k

                Topics

                101.8k

                Posts