HISE Logo Forum
    • Categories
    • Register
    • Login

    Custom custom keyboard :)

    Scheduled Pinned Locked Moved Scripting
    8 Posts 3 Posters 381 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
      Lumi283
      last edited by

      Hi, I haven't found any solution with:

      Highlighting the keys of the custom keyboard when the MIDI keyboard is played.
      Coloring keys when the note is mapped (it works with the basic keyboard, but I haven't found anything with the custom keyboard).
      Are there any solutions to resolve it? Thanks.

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

        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
          Lumi283 @d.healey
          last edited by

          @d-healey I have the tutorial memorized, and I don't think these points are mentioned :)

          1 Reply Last reply Reply Quote 0
          • A
            aaronventure
            last edited by

            Your on note callback should call repaint for your custom keyboard panel, and the keyboard panel paint routine should, as it draws keys, look for Synth.isKeyDown().

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

              @aaronventure How you know the id of the key item in custom keyboard ?
              I tried g.id or obj.id, it didn't work.
              This can be useful for modifying each key individually.

              	keyboardLaf.registerFunction("drawWhiteNote", function(g, obj)
              	{
              	  var a = obj.area;
                        g.setColour(obj.hover ? grey1 : white1);
              	  g.fillRect([a[0], a[3] - a[3], a[2] , a[3] ]);
              	  g.setColour(grey1);
              	  g.drawRect([a[0], a[3] - a[3] , 1, a[3] ], 1);
              	});;
              	
              	keyboardLaf.registerFunction("drawBlackNote", function(g, obj)
              	{
              	  var a = obj.area;
                	  var colour = blue3;
              	  g.setColour(obj.hover ? blue2 : blue3);	
                	  g.fillRoundedRectangle([a[0], a[1]-10*zoom, a[2], a[3] / 1.1], 7*zoom);
              	});
              	
              
              d.healeyD A 2 Replies Last reply Reply Quote 0
              • d.healeyD
                d.healey @Lumi283
                last edited by

                @Lumi283 said in Custom custom keyboard :):

                How you know the id of the key item in custom keyboard ?

                By ID do you mean note number?

                Put this in your laf function to see all the properties you have available:

                Console.print(trace(obj));

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

                1 Reply Last reply Reply Quote 1
                • A
                  aaronventure @Lumi283
                  last edited by aaronventure

                  @Lumi283 You can call Console.print(trace(obj)); in your LAF function to see all the properties of the obj object. One of these should be note number.

                  EDIT: @d-healey

                  eaaf27fb-1951-4af7-a78f-f1f4a82d0098-image.png

                  L 1 Reply Last reply Reply Quote 1
                  • L
                    Lumi283 @aaronventure
                    last edited by

                    @aaronventure @d-healey thank you!

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

                    41

                    Online

                    1.7k

                    Users

                    11.7k

                    Topics

                    101.8k

                    Posts