Decibels --> Paint Routine 'Alpha'?
-
Can someone help me with this paint routine? I just want to paint a panel and use 'decibelsForGainFactor' for Alpha values in my paint routine.
I just want to to work like this, when the decibels are > -10db and < -12db, the panel blinks.
Like one of these....
I dont need the peak meter, I just need this part to blink when it hits target level/threshold.
Its just a rectangle behind the meter.
-
C Chazrox marked this topic as a question
-
@Chazrox gottem.
const var Image8 = Content.getComponent("Image8"); const var t4 = Engine.createTimerObject(); const var InGain = Synth.getEffect("InGain"); t4.setTimerCallback(function() { var v4 = InGain.getCurrentLevel([0,1]); v4 = Engine.getDecibelsForGainFactor(v4); if (v4 > -12) { Image8.setAlpha(v4 * v4 / 101); } }); t4.startTimer(11);