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 438 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.
    • L
      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

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

        L 2 Replies Last reply Reply Quote 1
        • L
          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?

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

            @lijas90 Sorry, it does work.😌

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

              @lijas90 Thanks David!

              1 Reply Last reply Reply Quote 0
              • L
                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.

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

                  L 1 Reply Last reply Reply Quote 0
                  • L
                    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

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

                      L 1 Reply Last reply Reply Quote 1
                      • L
                        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

                        24

                        Online

                        1.9k

                        Users

                        12.5k

                        Topics

                        109.0k

                        Posts