laurence-myers / midi-to-macro

AutoHotKey (AHK) script to map MIDI inputs to keyboard shortcuts or macros
25 stars 4 forks source link

Supply old/previous value for cc changes #1

Closed slablaadje closed 1 year ago

slablaadje commented 2 years ago

Added old/previous value for cc changes so it is also possible to apply this in situations where you cannot or do not want to set an absolute value, but instead having a sliding/offset.

slablaadje commented 2 years ago

I just realised it has to either remember it per channel or maybe reset it in some way. I will think about a proper solution. Feel free to deny this PR :)

laurence-myers commented 2 years ago

Thanks for adding this functionality! It looks like a good idea. 🙂

As you pointed out, it'll need to be stored per CC. Perhaps storing it an object/associative array? It might need to be stored per combination of device, channel, and CC.

My other suggestion is that "remembering" the old value could be tracked in MidiRules.ahk, where you write your other command handling code. But since this would be a common enough scenario, I'm fine with tracking it in MidiInAndGuiMonitor.ahk - I guess this is useful for encoder knobs?

I'll leave the PR open for now.

laurence-myers commented 1 year ago

I will close this for now. Feel free to re-open it if you come up with a generic solution. 🙂