Filter Choices and ComboBox (getFilterModeList)...



  • Trying to use the example given at:
    https://docs.hise.audio/scripting/scripting-api/engine/index.html#getfiltermodelist

    But the example isn't returning the correct filter when used in the mode selector ComboBox, did I miss something ?



  • @Dalart you could do it a more hard coded way.. I just use a combobox for the selection and this in the onCallBack:

     switch (value) 
                {
                  case 1:
                    TheSGroupFilters[i].setAttribute(TheSGroupFilters[i].Mode, 6);
                    break;
                  case 2:
                    TheSGroupFilters[i].setAttribute(TheSGroupFilters[i].Mode, 7);
                    break;
                  case 3:
                    TheSGroupFilters[i].setAttribute(TheSGroupFilters[i].Mode, 12);
                    break;
                  case 4:
                    TheSGroupFilters[i].setAttribute(TheSGroupFilters[i].Mode, 13);
                    break;
                  case 5:
                    TheSGroupFilters[i].setAttribute(TheSGroupFilters[i].Mode, 9);
                    break;
                  case 6:
                    TheSGroupFilters[i].setAttribute(TheSGroupFilters[i].Mode, 10);
                    break;
                  case 7:
                    TheSGroupFilters[i].setAttribute(TheSGroupFilters[i].Mode, 0);
                    break;
                  case 8:
                    TheSGroupFilters[i].setAttribute(TheSGroupFilters[i].Mode, 5);
                    break;
                  case 9:
                    TheSGroupFilters[i].setAttribute(TheSGroupFilters[i].Mode, 1);
                    break;
                  case 10:
                    TheSGroupFilters[i].setAttribute(TheSGroupFilters[i].Mode, 8);
                    break;
                };
    

    for a combo box with these in it:

    SVF LoPass
    SVF HiPass
    SVF Notch
    SVF BandPass
    1 Pole LoPass
    1 Pole HiPass
    BiQuad LoPass
    BiQuad LP Rez
    BiQuad HiPass
    Moog LP
    
    • so clearly they are not sequential in any logical name based way.


  • Thanks for the info Lindon, I'll give this a try.



  • I ended up getting this working using the example in the docs. 😄
    I had a pre-existing ComboBox in the project that was interfering. 😛

    I swear it's the stupidest little things sometimes, but glad to be learning from my mistakes !


Log in to reply
 

5
Online

552
Users

2.1k
Topics

16.4k
Posts