Midi controller to keystroke using Midipipe
The pipe's function is to activate Live, and to keystroke either command-d (duplicate) or command-z (undo) via button presses on my Nanokontol.
The main pipe setup is a "midi in" (with the controller I'm using chosen) and an applescript trigger:
tell application "System Events"
tell application "Live" to activate
if (item 2 of message = 69) and (item 3 of message > 0) then tell application "System Events" to keystroke "d" using command down
if (item 2 of message = 72) and (item 3 of message > 0) then tell application "System Events" to keystroke "z" using command down
It would be nice if there was more instruction available on how to script this type of action.
Hope this helps anyone else trying to do this type of thing.