I put together a little lua action-script for this. Normally it seems you'd make a regular combination action, but the problem is that to do this requires some actions from the [Main] section and also [MIDI Editor], and apparently this requires some ReaScript action.
If anyone wants to test this, it's merely doing a bunch of basic logical steps using a few actions from basic Reaper + a few SWS actions. The logic is as follows (and yes, it is a huge workaround, but it works):
0) User makes a selection of CC events in MIDI Editor, and then runs the script:
Code:
reaper.Undo_BeginBlock()
-- 1) Create and select first track
reaper.Main_OnCommand(reaper.NamedCommandLookup("_SWS_CREATETRK1"), 0)
-- 2) Track: Select pan envelope [of first track]
reaper.Main_OnCommand(41868, 0)
-- MIDI Editor:
--------------
-- 3) SWS/BR: Convert selected CC events in active item
-- to linear envelope points in selected envelope
-- (clear existing envelope points)
hwnd = reaper.MIDIEditor_GetActive()
reaper.MIDIEditor_OnCommand(hwnd, reaper.NamedCommandLookup("_BR_ME_CC_TO_ENV_LINEAR_CLEAR"))
-- MAIN:
--------
-- 4) Envelope: Select all points (of envelope)
reaper.Main_OnCommand(40332, 0)
reaper.Main_OnCommand(40332, 0)
-- had to duplicate this (hrm) to get the points selected
-- 5) Envelope: Invert selected points
reaper.Main_OnCommand(40334, 0)
-- 6) SWS/BR: Convert selected envelope's curve in time
-- selection to CC events in last clicked CC lane
-- in last active MIDI editor
reaper.Main_OnCommand(reaper.NamedCommandLookup("_BR_ENV_TO_CC_CLEAR"), 0)
-- 7) Track: Select Track 01 ONLY
reaper.Main_OnCommand( reaper.NamedCommandLookup("_SWS_SEL1"), 0)
-- 8) Track: Remove Tracks
reaper.Main_OnCommand(40005, 0)
reaper.UpdateTimeline()
reaper.Undo_EndBlock("Script: Invert CC Data (Workaround from envelopes)", -1 )
This could be done by adding an envelope to the currently selected track hosting the midi item, thereby negating the need for a temporary track here, but this envelope might already exist on the track and so creating a new, temporary track seemed like a safe bet. Again, this is a little over the top as a workaround, and if I knew how lua + Reaper's exposure worked this could be easily achieved otherwise, but in the meantime it definitely does work, yet it takes about a second to run or so (the delay is from the conversion of cc to envelope and back again). Still, better than nothing if you would find this useful. If there are any flaws or side-effects, if anyone even tries this at all and I'm not the only one, leave a comment here. And lemme know when an actual standard action does this, haha.
Peace