HISE Logo Forum
    • Categories
    • Register
    • Login

    Making an activity LED

    Scheduled Pinned Locked Moved Scripting
    7 Posts 2 Posters 288 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.
    • T
      ThomAce
      last edited by

      Hi!

      I'm quiet new to this HISE development and wondering if there is an efficient way to make an "activity led" (For example two image layered on eachother where true and false could control visibility of one layer.) on user interface that would light up in case of - for example - a limiter is starting to act. Making threshold of this activity is not a big deal I know, but I believe my approach is more than suboptimal in this case. (Added a limiter, controlling a switcher and logic operator to precisely tuning it to the required level.) But, this is a point where I got stuck. I don't know how efficiently make an event data or utilize any network device that can send event to the interface. Unfortunately, I get lost in the documentation at this point. Does anybody has any technique to this?

      Many thanks in advance!

      d.healeyD 1 Reply Last reply Reply Quote 0
      • d.healeyD
        d.healey
        last edited by d.healey

        Use a panel with a paint routine or a button with two frames rather than hiding showing images. As to how you trigger the activity I don't know but possibly a global cable.

        Libre Wave - Freedom respecting instruments and effects
        My Patreon - HISE tutorials
        YouTube Channel - Public HISE tutorials

        T 1 Reply Last reply Reply Quote 1
        • T
          ThomAce @d.healey
          last edited by

          @d-healey Yeah, the hiding is just an example. I could even use paint events or change panel background color, whetever. The thing is that I don't know (yet) how to route out any events in a practical way to the gui.

          1 Reply Last reply Reply Quote 0
          • d.healeyD
            d.healey @ThomAce
            last edited by

            @ThomAce said in Making an activity LED:

            I don't know how efficiently make an event data or utilize any network device that can send event to the interface

            I'm not sure what you mean by event data or network device, could you elaborate?

            Libre Wave - Freedom respecting instruments and effects
            My Patreon - HISE tutorials
            YouTube Channel - Public HISE tutorials

            T 1 Reply Last reply Reply Quote 0
            • T
              ThomAce @d.healey
              last edited by

              @d-healey I figured it out...

              Just quickly made this together. Works as expected. Thanks for the direction.

              const var GRM = Engine.getGlobalRoutingManager();
              const var Cable = GRM.getCable("LimiterActive");
              const var LimiterActiveLED = Content.getComponent("LimiterActiveButton");
              
              Cable.registerCallback(function(value){
              	if (value == 1){
              		LimiterActiveLED.setValue(1);
              		Console.print("high"); //for debugging
              	}		
              	else{	
              		Console.print("low"); //for debugging
              		LimiterActiveLED.setValue(0);
              	}
              		
              }, AsyncNotification);
              
              
              d.healeyD 1 Reply Last reply Reply Quote 0
              • d.healeyD
                d.healey @ThomAce
                last edited by d.healey

                @ThomAce Nice! You can shorten your function to a single line.

                Cable.registerCallback(function(value) {
                    LimiterActiveLED.setValue(value);
                }, AsyncNotification);
                

                Libre Wave - Freedom respecting instruments and effects
                My Patreon - HISE tutorials
                YouTube Channel - Public HISE tutorials

                T 1 Reply Last reply Reply Quote 1
                • T
                  ThomAce @d.healey
                  last edited by

                  @d-healey Thanks! Yeah, you are right. Just for debugging purposes I kept it simple as this to see what is going on, but you are absolutely right! I still need some "housekeeping" in code as I quickly dropped everything together and I'll do some optimizations. But, finally, everything works as I wanted.

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

                  52

                  Online

                  1.7k

                  Users

                  11.7k

                  Topics

                  101.8k

                  Posts