Damned Dirty Ape
Not really handled very well right now, no. There's an open issue here and this post on the Reaper forum explains a bit of context.Hey tack. Is it possible to assign keys for articulation switching? I always got my C-1 for my longs, C#-1 for Legato etc. But these should trigger CC32 for Spitfire Products for example without having the actual notes printed in the sequence.
Reaper does not make this easy for us at all. Apart from creating the 128 separate actions (or, worse, 2176 if you want to target specific channels rather than the default channel) and have you bind your notes individually to those actions as shortcuts, the only other idea I have is this:
When you play a note, if that note is assigned to an articulation on the actively armed track, then the JSFX on the track reports back to the main script "hey, I just intercepted a note that's mapped to articulation 42." Then the main script checks to see if we're either recording or step-recording in the MIDI editor, and edits the MIDI item in-place to replace the note with the program change message. (There may be unintended side effects there: it's not a stretch to imagine Reaper could complain about MIDI events getting dynamically modified in an item being actively recorded to. And even if it works, there will be an unavoidable flicker as the note vanishes and the program change event is added.)
That idea has the benefit that if the note being played happens to be mapped to an articulation on the armed track then it gets replaced for a program event, and if not, then it's passed through as a standard note as part of the performance (i.e. Reaticulate can ignore it). That behaviour isn't very cleanly accomplished the other idea of having 128+ separate actions.
So basically it's just a series of trade-offs here. Suffice it to say, some sort of solution is on the roadmap. In the meantime, you'd have to use something like Bome MIDI Translator to translate notes to a CC that you can assign to one of the "Activate articulation by CC" actions.