Has anyone asked about how to apply post filter effects for a 50ies Scifi vibe?
Content.makeFrontInterface(150, 150);
const var Panel1 = Content.getComponent("Panel1");
Panel1.setValue(1);
const var circlePath = Content.createPath();
circlePath.addArc([0.0, 0.0, 1.0, 1.0], 0.0, Math.PI * 2);
Panel1.setPaintRoutine(function(g)
{
g.beginLayer(true);
g.setColour(Colours.white);
var area = [1, 1, this.getWidth() - 2, this.getHeight() - 2];
g.drawEllipse(area, 2);
var radius = this.getWidth() / 2 * this.getValue();
var diameter;
var pos;
for (i = 1; i < 4; i++)
{
diameter = (radius * 2 / 4 * i);
pos = this.getWidth() / 2 - diameter / 2;
if (pos > 0)
g.drawEllipse([pos + 1, pos + 1, diameter - 2, diameter - 2], 2);
}
g.gaussianBlur(1.0 / this.getValue() * 12.0);
g.addNoise(0.2);
g.applyMask(circlePath, area, false);
g.endLayer();
});
inline function onKnob1Control(component, value)
{
Panel1.setValue(component.get("max") + 1 - value);
Panel1.repaint();
};
Content.getComponent("Knob1").setControlCallback(onKnob1Control);