Old 07-31-2016, 03:23 PM   #1
jmorel33
Human being with feelings
 
Join Date: Jun 2015
Posts: 217
Default Building custom SYSEX controls

In the MIDI editor, while on Piano Roll, we can add controls for Velocity, Pitch and so on. I need to make my own and I want to know how you program new controls so you can set your own mod curves like you'd do on pitch, pan, velocity and so on.
jmorel33 is offline   Reply With Quote
Old 09-15-2016, 04:43 PM   #2
juliansader
Human being with feelings
 
Join Date: Jul 2009
Posts: 3,714
Default

Unfortunately, I don't think that there are currently any other options than those discussed in Programming SYSEX curves like if they were CC .

The most promising solutions appear to be:

1) Use a JSFX to convert an envelope into a sysex curve, as described by ELP in the other thread, or

2) Use a ReaScript to convert a 7-bit CC curve to a sysex curve. The following quick Lua script should do the trick:

Code:
-- Convert a 7-bit CC curve into sysex

indexOfByteToDraw = 2
sysexBytes = {[1] = 0x1F,
              [2] = nil, -- or anything
              [3] = 0x11,
              [4] = 0x1F
             }

take = reaper.MIDIEditor_GetTake(reaper.MIDIEditor_GetActive())

i = reaper.MIDI_EnumSelCC(take, -1)
while i > -1 do
    ccOK, _, muted, ppqpos, _, _, _, value = reaper.MIDI_GetCC(take, i)
    reaper.MIDI_DeleteCC(take, i)
    if ccOK == true then
        sysexBytes[indexOfByteToDraw] = value
        sysexString = ""
        for m = 1, #sysexBytes do
            sysexString = sysexString .. string.char(sysexBytes[m])
        end
        reaper.MIDI_InsertTextSysexEvt(take, true, muted, ppqpos, -1, sysexString)
    end
    i = reaper.MIDI_EnumSelCC(take, -1)
end
Replace the table at the beginning of the script with your own sysex values (excluding the bounding F0..F7), draw the curve in the CC lane, select the CCs, and run the script.

Last edited by juliansader; 09-16-2016 at 01:05 AM.
juliansader is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 02:55 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.