Polyshape FX mode. How to ?
-
try to control the polyshape mode (combobox, slider, etc....)
but seems that sometimes i have "function" instead of a mode.
how to fix it ?
Thanks.
-
for now i did that:
Linear Atan ... Sin AsinH ... ... ... TanCos Chebichev1 Chebichev2 Chebichev3
but is it possible to just have the modes without adding the "..." ?
... -
Bump. I discovered the same error. How can these items be hidden in the combobox?
-
@bendurso Perhaps it is possible to hide unused items ?
Or alternatively set the index of each item (1, 2, 4, 5, 9, 10, 11, 12)?
Anyone?
-
@bendurso Have an array with the indexes you want to use, then reference that from the combobox callback, using the combobox's value as the array index.
-
@d-healey Thanks, how do I link the index with the items in the combobox callback?
const var cmbPolyShape2 = Content.getComponent("cmbPolyShape2"); const var Polyshape2 = Synth.getEffect("Polyshape 2"); const var ComboIndex = [0, 1, 3, 4, 8, 9, 10, 11]; const var ComboItems = ["Linear", "Atan", "Sin", "AsinH", "TanCos", "Chebichev1", "Chebichev2", "Chebichev3"]; cmbPolyShape2.set("items", ComboItems.join("\n")); inline function oncmbPolyShape2Control(component, value) { Polyshape2.setAttribute("Mode", value); } }; Content.getComponent("cmbPolyShape2").setControlCallback(oncmbPolyShape2Control);
-
inline function oncmbPolyShape2Control(component, value) { if (value > 0) Polyshape2.setAttribute("Mode", ComboItems[ComboIndex[value]]); }
-
@d-healey Hmm, it didn't work. However, I just realized that I only needed to trigger the ComboIndex, and it worked (as you mentioned initially). Thank you :)
inline function oncmbPolyShape2Control(component, value) { Polyshape2.setAttribute(Polyshape2.Mode, ComboIndex[value - 1]); }