@David-Healey said in JUCE error while exporting VST:
@Jeetender How big is it?
Content.makeFrontInterface(700, 400);
const var scriptFx = Synth.getEffect("Script FX1");
const var buttons = [];
const var panels = [];
for (i = 0; i < 5; i++)
{
buttons[i] = Content.getComponent("Button" + (i));
panels[i] = Content.getComponent("Panel" + (i));
buttons[i].setControlCallback(onButtonControl);
}
inline function onButtonControl(component, value)
{
if (!value) return;
local idx = buttons.indexOf(component);
local compSwitchValue = idx * 0.25;
// Show corresponding panel
for (i = 0; i < 5; i++)
{
panels[i].showControl(i == idx);
buttons[i].setValue(i == idx);
}
scriptFx.setAttribute(0, compSwitchValue);
}
//const var scriptFx = Synth.getEffect("Script FX1");
const var mtbuttons = [];
const var mtpanels = [];
for (j = 0; j < 3; j++)
{
mtbuttons[j] = Content.getComponent("MtrBut" + (j));
mtpanels[j] = Content.getComponent("MtrPnl" + (j));
mtbuttons[j].setControlCallback(onMtrButControl);
}
inline function onMtrButControl(component, value)
{
if (!value) return;
local ide = mtbuttons.indexOf(component);
local compSwitchValue = ide * 0.25;
for (j = 0; j < 3; j++)
{
mtpanels[j].showControl(j == ide);
mtbuttons[j].setValue(j == ide);
}
}
const var rm = Engine.getGlobalRoutingManager();
const var cable = rm.getCable("global_cable");
const var Knob1 = Content.getComponent("Knob1");
cable.registerCallback(function(value)
{
var dB = Engine.getDecibelsForGainFactor(value);
dB = Math.max(-60, dB); // Clamp to -60dB
Knob1.setValue(dB);
Knob1.changed(); // Update UI
}, AsyncNotification);


