Midi Trigger With velocity Range?

Is there a way to specify a trigger with midi velocity?

I can specify note, channel, device, but not velocity.

If not, @peternlewis can we have this filter?

Something like trigger this macro if a note between 30-40 is pressed with velocity between 70-127.

Thanks!

Well I'm stumped! The note range part is easy and the velocity range part is easy, but not both together.


MIDI Note Range Trigger.kmmacros (42 KB)

Macro screenshot


MIDI Velocity Range Trigger.kmmacros (43 KB)

Macro screenshot

(You obviously don't need the is <= 127 condition, but I included it in case you want to adjust the upper limit.)


@peternlewis, is this possible in any way other than setting ten note triggers for the second macro?

With the raw MIDI packet trigger trigger you can detect anything you want, but you'll need to create an appropriate regex.

Ok, I figured out that the macro was being triggered only by note-off messages. To switch this to note-on messages only, I adjusted the first byte range to:

129 <= byte 1 <= 255

I then isolated the velocity hex and converted it to an integer, which I was able to use in an If/Else condition.

MIDI Note-Velocity Range Trigger.kmmacros (45 KB)

Macro screenshot

Define the note range here:
CleanShot 2023-02-23 at 11.52.46@2x
Define the velocity range here:
CleanShot 2023-02-23 at 11.56.14@2x

1 Like