Forum
    • Categories
    • Register
    • Login

    Typing to MIDI Keyboard with Numpad keys

    Scheduled Pinned Locked Moved General Questions
    2 Posts 2 Posters 13 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.
    • P
      pratitghosh
      last edited by

      I wanted to make a MIDI Keyboard/Drum pad of sorts with numpad 0-9 as the pads. Currently I have the layout made:
      7eb56640-f6f2-4344-9520-f6a5e35ea473-image.png
      and set so that pressing the buttons with my mouse work perfectly and send the correct MIDI data that I want.

      I want this buttons to be triggered by my numpad keys. How do I do that?

      dannytaurusD 1 Reply Last reply Reply Quote 0
      • dannytaurusD
        dannytaurus @pratitghosh
        last edited by dannytaurus

        @pratitghosh Use Content.setKeyPressCallback()

        https://docs.hise.dev/scripting/scripting-api/content/index.html#setkeypresscallback

        It accepts JUCE key descriptions. The numpad keys are named "numpad 0" to "numpad 9".

        https://docs.juce.com/master/classjuce_1_1KeyPress.html

        A few gotchas:

        • there's no keyRelease or keyUp trigger, so you can't detect held keys - for one-shot drums this is fine
        • held keys repeat at the OS repeat rate, so maybe check for that
        • the key triggers only fire when he plugin has focus, otherwise the DAW will action the keypresses instead

        HISE dev latest / herdr + Claude Code / Figma + Affinity
        Meat Beats: https://meatbeats.com
        Klippr Video: https://klippr.video

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

        8

        Online

        3.1k

        Users

        14.0k

        Topics

        122.1k

        Posts