View Single Post
Old 01-01-2017, 09:57 PM   #243
Human being with feelings
Lokasenna's Avatar
Join Date: Sep 2008
Location: The vast, frozen wasteland of western Canadia.
Posts: 5,576

I forgot this thread was here. Whoops. Pasting from my FR thread:

I've got a Lua script going that provides a list of chords and lets you preview them. However, the only way to do that currently is pretty messy:

1. The track has to be armed, monitoring, and set to use the VMK as input, so too bad if the user has their own routing set up.

2. You have to screw around with MIDI messages:
reaper.StuffMIDIMessage(0, 0x90+note_tbl[i].chan-1, note_tbl[i].pitch, note_tbl[i].vel)
3. You have to keep track of times and note releases manually as part of your reaper.defer loop.

So, dear Cockosgobblers (I promise that's a term of endearment. It's also an Office Space reference within an Office Space reference.), it would be awfully swell if you could add a couple of functions to let us simulate mouse-clicks on the keys in the MIDI editor directly:

reaper.MIDIEditor_NoteDown( hwnd midieditor , int note , int velocity [, int length ])
reaper.MIDIEditor_NoteUp( hwnd midieditor , int note , int velocity )
(The optional Length parameter would automatically release the note after a specified time, just to make it easy on anyone who doesn't need control of it themselves; PPQ, QN, whatever works)

Lokasenna is online now   Reply With Quote