View Single Post
Old 01-01-2017, 09:57 PM   #243
Lokasenna
Human being with feelings
 
Lokasenna's Avatar
 
Join Date: Sep 2008
Location: Calgary, AB, Canada
Posts: 6,551
Default

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:
Code:
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:

Code:
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)

Cheers.
__________________
I'm no longer using Reaper or working on scripts for it. Sorry. :(
Default 5.0 Nitpicky Edition / GUI library for Lua scripts / Theory Helper / Radial Menu / Donate
Lokasenna is offline   Reply With Quote