My question above does not make much sense, as the midi input library accepts anyway midi events just from one single midi port. So this part is solved.if (no midi events on a given midi port for longer than 1s) { press some hotkey }
Finally I could try out this midi input library, it works so far fine, too bad that we have no examples for how to use getCC and getWheel.
Right now I am using somethink like this:
;-------------------- Midi "hotkey" mappings ----------------------- ... listenCC(1, "do_something", 0) listenWheel("do_something", 0) ... ;-------------------------Midi "hotkey" functions--------------------- do_something(note, vel) { if (vel) { ;getCC(ccNumber, channel) ;getCC(1, 0) ; here I would like to add CC-speed dependent actions MsgBox, I received pitch %note% with velocity %vel% Sleep, 150 MsgBox, I do something here! } }
What I would like to do is differentiating between two different cc-change speeds:
- for slow cc-changes process_slow should run,
- for fast cc-changes process_fast should run.
To accomplish this I should get two CC values from two different time points and calculate the speed of change, define a decision criteria for slow/fast and it should work. Any ideas how I can do this? Some examples how to use getCC would be fine. Then I would like to do the same also with getWheel.