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

Reply
 
Thread Tools Display Modes
Old 02-01-2017, 12:20 PM   #1
schwa
Administrator
 
schwa's Avatar
 
Join Date: Mar 2007
Location: NY
Posts: 15,747
Default technical note on MIDI to VST3 message translation

REAPER 5.33 includes this new feature:


+ MIDI: support translating special MIDI messages to VST3 expression or named keyswitches


There's no direct access yet to VST3-specific messages in REAPER, but this is some groundwork that we thought we would add to the general release to enable VST3 messaging via script, extension, or manually created MIDI messages.

Specifically, REAPER will convert certain sysex messages to VST3 messages as follows:


Code:
F0 72 65 61 65 78 70 72 00 XX YY VH VL [ PP PP PP ... ] F7
    r  e  a  e  x  p  r
Will be converted to a VST3 expression message that will be attached to a note that occurs at the exact same MIDI tick position (order of messages doesn't matter), with channel XX and pitch YY. The [ PP PP PP ... ] part of the message represents the VST3 expression name in ascii, and VH VL represents the value as a 14-bit integer, where VH is the high 7 bits and VL is the low 7 bits.


Code:
F0 72 65 61 6B 79 73 77 00 XX YY VH VL [ PP PP PP ... ] F7
    r  e  a  k  y  s  w
Will be converted to a VST3 named keyswitch message on channel XX. The [ PP PP PP ... ] part of the message represents the keyswitch name in ascii. YY and VH are ignored, and VL is the keyswitch velocity.


In both messages the 00 is a message version number. If we extend or change this format in the future, we will change the version number, while continuing to support the old version.


Here is a specific example of sending an expression message. If a VST3 plugin in the signal chain publishes an expression called "legato", the following sysex message will be translated to legato expression with value 0.5 (0x40<<7=8192, 8192/16384=0.5) for a note on channel 0 with pitch 0xC3 (60) occurring at the same MIDI tick position as the sysex message. Note that the expression name is not null-terminated.

Code:
F0 72 65 61 65 78 70 72 00 C3 40 00 6C 65 67 61 74 6F F7
    r  e  a  e  x  p  r              l  e  g  a  t  o

Last edited by schwa; 01-18-2020 at 06:59 AM.
schwa is offline   Reply With Quote
Old 02-01-2017, 01:10 PM   #2
mschnell
Human being with feelings
 
mschnell's Avatar
 
Join Date: Jun 2013
Location: Krefeld, Germany
Posts: 14,686
Default

Awesome !

Hopefully I don't tell nonsense, but reading the example I seem to remember that there is a midi specification for defining velocity with more than 7 bits (similar to high resolution CC).

Would it not generally make sense to reserve at least 14 Bits for any value that is to hold a midi value, so that enhanced midi specs can be adhered to ?

-Michael
mschnell is offline   Reply With Quote
Old 02-01-2017, 01:29 PM   #3
schwa
Administrator
 
schwa's Avatar
 
Join Date: Mar 2007
Location: NY
Posts: 15,747
Default

There are 14 bits reserved for the value field in both message types.
schwa is offline   Reply With Quote
Old 02-02-2017, 03:48 AM   #4
mschnell
Human being with feelings
 
mschnell's Avatar
 
Join Date: Jun 2013
Location: Krefeld, Germany
Posts: 14,686
Default

Great !

-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 04:33 AM.


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