Frequency Items in combobox like Filter



  • Hello Everyone. As shown in the image , I have this combobox and I want that it shows all the list of filter styles on the display just like the Filer fx module. How can I call the into the combobox? Thanks a lot.

    Screenshot 2021-09-03 at 12.19.28 (2).png



  • @nesta99 Try to:

    • Create an array that contains the style names.
    • Populate the combobox with this array
    • Then in the combobox CB, update the filter style

    Hint: if you don't want an array, you can just put the names in the data items in the property editor of the combobox

    Try this and give us a small snippet if you're stuck



  • @nesta99
    here it is

    • as a combobox
    • as combo box with knob
    • as Knob with Panel

    Bildschirmfoto 2021-09-03 um 14.07.11.png

    HiseSnippet 1368.3oc0X0saaaCElJIbqVao+LTrgcGgwtvAvI0VMos.ECS0NwMAM+3T2FTfhhNZI5XtPS5JQ0E2hd+d.1CvvdJ1kauA6IXXOB6MXijRxR101wMnsXQA1QjG9c3GOmiNmiby.gGILTD.rJ7nA8I.qOG1Z.W1sdWLkC1YSf0WA259GrZCJSRB1S3SPgDFwSBpMnONLj3CrrV795EaUXIf45e9tZXFl6QxlB.NRP8H6R6QkYy1z8ATFqA1m7HZubqdc2c7D75BlHRQrEgU.8wdmfOlrOVurEf.qOYKepTDzRhkjPf0R0D9CZ0U7i730eDMj1lQzCpBZoTT7zMDLeMi0yBp2kx7alZ.BAJszLybrXr435v8n9zgymYVtpQ.JCQd6g0ByhdUySuJyO8rxQukho20fs7Bn8kYRzb6yf6vUdqNXkKHOshWKXg8gv5B0J3x05gOgzHPMXHhR2pRkxnMpTYk6trc5eJ2QnD8Rb.JNPnJ5aQl3j0NlH2pSGU.QohIhJlB7F2XuAwys56oq7DotnWaQMwoNJpjdZTjQMceAWMnTwgqvvnLjOfKZWcpnLRGCwt31D1zgDKN4bS4LJmf5Dw8jTAGI3FMpQFHXk7RgUVoYVDYkkse8x1ExNNqERjGokTJV9cGUpWWL+XhuY1DCtFw8jx.Z6HIoT5j5mUKi5o9N7oYvUDeGIo2iHmJKsxyhUdL80ZoTQoRPwxno.Pu92n9LSKmVQIm15XFqs5Q2RiZDxGYkE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nesta99 Solved! Thanks so much!



  • @MikeB @ustk I think I have an index issue. When i Select the filter style in the combobox, the filter comes with the next one, so there's an offset +1 between my combobox and the filter's combobox. How can i solve this? Thanks



  • @nesta99 Exact, comboboxes aren't starting at 0 but 1, so you need a -1 somewhere 😉
    0 means "nothing selected"



  • @ustk @MikeB is this right? Still not working?

    const var ComboboxFxStyles = Content.getComponent("FxStyles"); //CMB
    
    inline function onFxStylesControl(component, value)
    {
     FxStyles.setValue(value - 1);
     FxStyles.changed;
    	Filter1.setAttribute(Filter1.Mode,  modes[FxStyles.getItemText()]);
    
    
    };
    
    Content.getComponent("FxStyles").setControlCallback(onFxStylesControl);
    


  • @nesta99 You set the value of the combobox in the combobox callback (bad),
    you call "changed()" in the callback as well (bad),
    and you are trying to set a parameter value with a text string... (this is where you need value-1)

    You need to go back to some basics, watch Dave's videos and take all examples from the doc 😉



  • @ustk ok Thanks.



  • @nesta99 I realise I should give at least some info on why it's bad...

    changed() is what you need to actually call a callback from elsewhere in the code, so the value of the corresponding parameter (as well as all that is inside the CB) is updated.

    It is the same thing for setValue. You set the value of a component somewhere in the code, then you call changed() so the CB of that component is called and runs with the new value.

    So you understand setting something inside its own CB is more than ambiguous, since the CallBack is called BECAUSE it has changed...

    As for the line of code you need, it is just

    Filter1.setAttribute(Filter1.Mode,  value - 1); // 0 to the max of the combobox
    


  • @ustk Ok, so I had the right Idea but the execution was wrong.


Log in to reply
 

12
Online

1.6k
Users

4.6k
Topics

42.5k
Posts