HISE Logo Forum
    • Categories
    • Register
    • Login

    Activating/Deactivating a GUI Button via MIDI Keys in HISE?

    Scheduled Pinned Locked Moved General Questions
    12 Posts 2 Posters 715 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.
    • lijas90L
      lijas90 @d.healey
      last edited by

      @d-healey Ok, now it works. Thanks. However, it only works when I press the physical key on the controller. Is there a way to make the button activate when a MIDI player is playing those notes? To simulate an instrument animation that triggers when the MIDI is played? Thanks.

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

        @lijas90 Have you tested it in a daw? It should work

        Free HISE Bootcamp Full Course for beginners.
        YouTube Channel - Public HISE tutorials
        My Patreon - HISE tutorials

        lijas90L 2 Replies Last reply Reply Quote 1
        • lijas90L
          lijas90 @d.healey
          last edited by lijas90

          @d-healey

          I’ve tried it and it doesn’t work. Do I need to do it in a Script Processor inside the MIDI Processor in some specific way?

          lijas90L 1 Reply Last reply Reply Quote 0
          • lijas90L
            lijas90 @lijas90
            last edited by

            @lijas90 Sorry, it does work.😌

            lijas90L 1 Reply Last reply Reply Quote 0
            • lijas90L
              lijas90 @lijas90
              last edited by

              @lijas90 Thanks David!

              1 Reply Last reply Reply Quote 0
              • lijas90L
                lijas90 @d.healey
                last edited by

                @d-healey How can I make the button activate only while the key is being pressed, and deactivate when the key is released? Thanks.

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

                  @lijas90 In onNoteOn turn the button on, in onNoteOff turn the button off.

                  Free HISE Bootcamp Full Course for beginners.
                  YouTube Channel - Public HISE tutorials
                  My Patreon - HISE tutorials

                  lijas90L 1 Reply Last reply Reply Quote 0
                  • lijas90L
                    lijas90 @d.healey
                    last edited by

                    @d-healey I’ve tried it like this but it doesn’t work; the button only deactivates when pressing it again, not when releasing the key. Thanks, my friend.

                    function onNoteOff()
                    {
                    local n = Message.getNoteNumber();
                       
                       if (ks.contains(n))
                           btn1.setValue(0);
                           
                           
                    
                    }
                    
                    d.healeyD 1 Reply Last reply Reply Quote 0
                    • d.healeyD
                      d.healey @lijas90
                      last edited by

                      @lijas90 Post a snippet so I can see the full code

                      Free HISE Bootcamp Full Course for beginners.
                      YouTube Channel - Public HISE tutorials
                      My Patreon - HISE tutorials

                      lijas90L 1 Reply Last reply Reply Quote 1
                      • lijas90L
                        lijas90 @d.healey
                        last edited by

                        @d-healey Sorry, it works now. Thanks again, David

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

                        21

                        Online

                        2.0k

                        Users

                        12.7k

                        Topics

                        110.1k

                        Posts