HISE Logo Forum
    • Categories
    • Register
    • Login

    Decibels --> Paint Routine 'Alpha'?

    Scheduled Pinned Locked Moved Unsolved Scripting
    2 Posts 1 Posters 67 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • ChazroxC
      Chazrox
      last edited by Chazrox

      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....
      Screenshot 2025-04-30 at 8.11.43 PM.png

      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.
      Screenshot 2025-04-30 at 8.51.16 PM.png

      ChazroxC 1 Reply Last reply Reply Quote 0
      • ChazroxC Chazrox marked this topic as a question on
      • ChazroxC
        Chazrox @Chazrox
        last edited by Chazrox

        @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);
        

        Forum - Meter Image Working.gif

        1 Reply Last reply Reply Quote 2
        • First post
          Last post

        15

        Online

        1.7k

        Users

        11.8k

        Topics

        103.2k

        Posts