Go Back   Cockos Incorporated Forums > REAPER Forums > REAPER General Discussion Forum

Reply
 
Thread Tools Display Modes
Old 08-14-2022, 01:26 PM   #1
thank you yep
Human being with feelings
 
Join Date: Apr 2018
Posts: 18
Default Combine multiple SysEx messages into one REAPER event?

Hello!

I have a handful of SysEx commands I'd like to have REAPER send to an external synth.

I know I can place multiple SysEx events in the piano roll, but this gets a little bit tedious when dealing with five or six SysEx commands in a row.

I tried dumping the whole handful of commands into a single REAPER SysEx Event, but that doesn't work - MIDI-OX shows me the SysEx truncates after the second F7 (i.e., two commands).

Is there any way to optimize this process, or do I really have to right click > paste first F0 . . . F7 chunk, click okay, right click again > paste second F0 . . . F7 chunk, click okay again, right click yet again > paste third F0 . . . F7 chunk, etc etc etc?
thank you yep is offline   Reply With Quote
Old 08-14-2022, 02:51 PM   #2
ErBird
Human being with feelings
 
Join Date: Jan 2017
Location: Los Angeles
Posts: 1,161
Default

I have no comment on doing it in the piano roll, but if you want an alternative approach you could make a JSFX that's triggered in some way, maybe by MIDI notes, then in response you can have it transmit anything you want, including SysEx chains.

Or if it's something you want to be sent on-command and not a synced way to music, you could use a script and StuffMIDIMessage.
ErBird is offline   Reply With Quote
Old 08-14-2022, 03:48 PM   #3
thank you yep
Human being with feelings
 
Join Date: Apr 2018
Posts: 18
Default

JSFX seems promising (StufFMIDIMessage even moreso, but I can't wrap my head around the documentation).

Reading the JSFX documentation, it looks like I'd have to reformat each individual byte of SysEx?

Quote:
midisend_str(10,"\x90\x11\x7f"); // send at sample offset 10, note-on, note 17, velocity 127
Sends a variable length MIDI message from a string. Can be used to send normal MIDI messages, or SysEx messages. When sending SysEx, logic is used to automatically add leading 0xf0 and trailing 0xf7 bytes, if necessary, but if you are sending sysEx and in doubt you should include those bytes (particularly if sending very short SysEx messages). Returns the length sent, or 0 on error.

So for SysEx "F0 41 10 16 12 . . . F7", that'd end up looking like:

midisend_str(0,"\xF0\x41\x10\x16\x12 . . . \x7F")

Not undoable with proper find-replace skills, but just want to make sure I'm not inventing even more work for myself.
thank you yep is offline   Reply With Quote
Old 08-14-2022, 05:27 PM   #4
ErBird
Human being with feelings
 
Join Date: Jan 2017
Location: Los Angeles
Posts: 1,161
Default

StuffMIDIMessage is out, I didn't realize it only handles 3-byte messages.

Quote:
Originally Posted by thank you yep View Post

So for SysEx "F0 41 10 16 12 . . . F7", that'd end up looking like:

midisend_str(0,"\xF0\x41\x10\x16\x12 . . . \x7F")

Not undoable with proper find-replace skills, but just want to make sure I'm not inventing even more work for myself.

You don't have to do anything but add \x in front of each byte. Give each SysEx message its own midisend_str.

Example, if you want to trigger with MIDI notes:

Code:
desc:SysEx Converter

@block

while (midirecv(offset,msg1,msg2,msg3))
(
  msg1 == $x90 && msg2 == 36 && msg3 > 0 ?
  (
    midisend_str(offset,"\xF0...\xF7");
    midisend_str(offset,"\xF0...\xF7");
    midisend_str(offset,"\xF0...\xF7");
    midisend_str(offset,"\xF0...\xF7");
  )
  : msg1 == $x90 && msg2 == 38 && msg3 > 0 ?
  (
    midisend_str(offset,"\xF0...\xF7");
  )
  : msg1 == $x90 && msg2 == 40 && msg3 > 0 ?
  (
    midisend_str(offset,"\xF0...\xF7");
  );
);

Last edited by ErBird; 08-14-2022 at 05:35 PM.
ErBird is offline   Reply With Quote
Old 08-15-2022, 05:06 AM   #5
thank you yep
Human being with feelings
 
Join Date: Apr 2018
Posts: 18
Default

Quote:
Originally Posted by ErBird View Post
StuffMIDIMessage is out, I didn't realize it only handles 3-byte messages.
Yeah, that's the part my head wasn't going around, haha. Thanks for confirming I'm not missing something. Seems pretty useless (or at least incredibly unwieldy) for anything other than notes and program/bank changes, but what do I know.

And even bigger thanks for the example, that really helps a ton. Guess I'll be going that route.

Biggest thanks of all for your time!
thank you yep is offline   Reply With Quote
Old 08-15-2022, 10:19 AM   #6
mschnell
Human being with feelings
 
mschnell's Avatar
 
Join Date: Jun 2013
Location: Krefeld, Germany
Posts: 14,776
Default

Maybe this might help:
ReaPack -> Midi CC to SysEx
-Michael
mschnell 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 01:07 PM.


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