Combo box menus showing the wrong filter mode?
-
Hi guys,
I have a combo box to pick my filter modes but they when I change the mode on my interface, they don't match up with the modes in the back end of HISE on the filter module.
Am I missing a setting somewhere? I've written out the list of filter modes and put them into the properties so they should match up like the usually do?
I'll put some screen shots to show you what I mean while selecting a few filters on my interface's drop down...
-
The indexes are not in order. https://forum.hise.audio/topic/1293/changing-the-filter-mode-from-a-combobox/4
-
@d-healey Ahhh that'll be why then. I'll try this now. Thanks mate
-
I had this same problem a few days ago and I was able to resolve it. Here are some links to the info:
https://forum.hise.audio/topic/1805/filter-choices-and-combobox-getfiltermodelist
https://docs.hise.audio/scripting/scripting-api/engine/index.html#getfiltermodelistHope this helps !
-
@d-healey @Dalart Thanks mate. I'll try these in a second then
I just tried this but it doesn't seem to be working. I'm not sure what I'm supposed to put next to the <
const var FilerEnvMod= Synth.getEffect("FilerEnvMod"); inline function onComboBox1Control(component, value) { //Add your custom logic here... FilerEnvMod.setAttribute(FilerEnvMod.Mode, <0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 13, 14, 15, 17>); }; Content.getComponent("ComboBox1").setControlCallback(onComboBox1Control);
-
Ok so this one almost works, but they are out of sequence just by 1 now. Any idea what I've missed this time?
(I just worked out the < and > didn't need to be there)
const var FilerEnvMod= Synth.getEffect("FilerEnvMod"); inline function onComboBox1Control(component, value) { //Add your custom logic here... FilerEnvMod.setAttribute(FilerEnvMod.Mode, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 17); }; Content.getComponent("ComboBox1").setControlCallback(onComboBox1Control);
-
@SteveRiggs said in Combo box menus showing the wrong filter mode?:
FilerEnvMod.setAttribute(FilerEnvMod.Mode, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 17);
That looks crazy.
Christoph gave the answer
-
@d-healey
I know. Something is slightly wrong but it's close. Everything is just out of sequence by 1 now.
I've tried adding 16 in, and taking the un assigned 11 out... still no joy. 3 hours going round in circles now.
-
I have no idea what your crazy code is doing, the
setAttribute()
function only takes 2 parameters and you've given it 18!Is this a typo FilerEnvMod?
Anyway here is a working example - there appears to be a bug with the function Christoph recommended (I've reported the bug) so I did it a different way. But once the bug is fixed you should do it the way Christoph suggests.
HiseSnippet 1192.3oc0W0saaTDEd1jrU3ARUKBgD2MxWsQxjZmljV.gHwNwTKRRcpCQHAnpI6NNdjGOi6tyVhIJbMOA7.vqDuH7F.mYmw6tN0MMXIPj8p8767Mm4Lemc6FqBYIIpXjWkSlLlg79.+dSj5AsFP4RTm8Pd22+PZhlESrpZNYLMIgEg77V9qMJ7prBJ64O+plTAUFxJTgPmp3grC3i35Bsc24a3BQaZD6D9nRdu4NcBUxVJgJEvyx90QiogComyNhZbaIej281OhqUw8zTMKA7ooJZRuApeRZ8+TdB+LAyHz.0CRjUMp0.tHp6z8ZBB4sR2hc9x1c9G4eHOhmqunB7fLCjhHJWC7VZVHsxLPpwaCRsUhHSBdKvyqD7VwBuG52KLlOVWXwfs22uiDNb5SgxdYXY8EszusreKE3gTu9H5PV6XPHOhfsqWuFYq50W6KVEuJFJ9IZxqowj1bA3RCxWRxZFV+bld+98Yg5fpNSUudHiTQrDHfKq1j+pTZD4ftU+bBj9oxOyH2.jOPQ5MfI5S1+XPyFflmwKq4wfltL5PqzlEY3ftjWv9YP2V0p16z11UXa66YY+I0pdnRct0vSqUsAoqRvrheVtnEHFjIUZBTw3mKYQFcFzYR1QJc3.ihMbJZlEhAX6JDlhrQzfrCnQQvUiMyxrQ4VWcs5RK0nyTMUWXJlSOIfxIndrRBBAUy8vUSykWOgAl4Z1njpvZAlIO5QsDLHqBdh13aeULIXHgKs0+0VEe4pXB7TjD.gcfTDLLK7cihxbkHg6TDsJKS3qL4hKEbIizOUFp4JIwbUzkDCviUhfvontFr2Dorh0y0VXf7tZcL+rTMKXpxCgErlEgeedJLUACvNgcgNXsezr2uxs+eGUIyh3PTKpPbFPRD7lf0jvR6E3Lk8bYvZ3KwUvWgIW2T+9y0lKYBV7bMaHvhuo.CjoiNiEOsdM0Q3V8rzF261QaDZqMkbTI6H45mOl4jKHVZLGhEjq3ZnXbHDbUmQv7.GAyzBIhGY3WxqqnrsPY9dz21YOplNMYPdg0ZLKVyMaIu8XuFH+srWU72ikLTqFm4q6TE112xk9Bjmu2.XQmXd4GfWxtVf79cebN6.NmoAWhiAWhcA63UvyvnfsjIXKOB1QgfyYOv4DG3xLF3bpBrki.6HGvyvJfFQyP+CxF88Fz5vvEUTpfpmchiYzpy.zOMC0tg9Vlv0SJeT7OXLT84NFZtcK2R39P+tbnLLe7tzbvKzw7uMdcC0W02N3p.rq32969OdBt6Sq9PeneXx3AJIOzRMlAnJ9Ndxa3aqPn1wrWkxjgEUwe8O143xs.FV1xQbbJUTtpuyurSS9XkfFeqNQV91UFdGea0M017w94aJxcndcyIycG79I9tCchoXe2A222+3+G.1WnR0b44GRgOowvheT5ndvemDx.fJkLQhgYeIybUqbcirAP8XxnLg+BdbFaXj8bFaL0HLeHLV8xP6zXy8m2KSCfIY1+8TA9ALPljO.12u950Qif+I4kggFBsOEv97iYiEHlGu.wr4BDyVKPLau.w7jEHlmdiwX9cvcS0pQ1dSPQ28y9PHOu8kTnKKqME82z4pK5C
-
@d-healey Damn lol. I did think it looked a little excessive!
Yeah I just noticed the typo aswell. Nice one. Its a typo in the actual module name so it ended up throughout the code when I copied and pasted from there. Doh.
Just checking the example now. Makes much more sense, thanks man... and it's loads tider than what ever the hell I just did
Much appreciated mate. I'll get this added in