06-25-2024, 06:20 AM
|
#1 |
|
Human being with feelings
Join Date: Jun 2023
Posts: 10
|
I'm developing a plugin which modifies MIDI Note On/Off, CC, pitch wheel, and channel pressure events, but REAPER seems to behave strangely when a VST 3 plugin emits a kLegacyMIDICCOutEvent. (Source code: https://github.com/attilammagyar/mpe-emulator - work in progress, no binary releases yet.)
Reproduction 1. Set up a track that contains 2 plugins:
2. Send MIDI CC, pitch wheel, or channel pressure events to the first plugin, e.g. via a MIDI keyboard. Expected result The MIDI activity log should contain only the events that were emitted by the plugin. Actual result The MIDI activity log shows both the raw events and the ones emitted by the plugin. Notes 1. Doing the equivalent things in a VST 2.4 plugin does not result in the raw CC events passing through, it works as intended. 2. If the VST 3 plugin is set up so that it emits the CC events only when a certain condition holds (e.g. the number of received Note On events is greater than the number of received Note Off events), then the raw CC events only appear in the activity log while the plugin is generating kLegacyMIDICCOutEvents, and they don't appear while the plugin is "silent". Logs Here's an excerpt from ReaControlMIDI's activity log with my annotations: Code:
0: 91 30 45 [Note On] chan 2 note 48 vel 69 # generated by my plugin in response to a raw Note On on channel 16
1: E1 00 40 [Pitch Wheel] chan 2 LSB 0 MSB 64 # generated by my plugin for the Note On
# (in the VST 2.4 version, this comes before the Note On)
2: D1 00 00 [Channel Pressure] chan 2 val 0 # generated by my plugin for the Note On
# (in the VST 2.4 version, this comes before the Note On)
3: E1 00 40 [Pitch Wheel] chan 2 LSB 0 MSB 64 # generated by my plugin for the Note On
4: D1 00 00 [Channel Pressure] chan 2 val 0 # generated by my plugin for the Note On
5: DF 03 00 [Channel Pressure] chan 16 val 3 # raw event sent by the keyboard
6: D1 03 00 [Channel Pressure] chan 2 val 3 # generated by my plugin as a replacement for the raw event
7: DF 06 00 [Channel Pressure] chan 16 val 6 # raw event sent by the keyboard
8: DF 09 00 [Channel Pressure] chan 16 val 9 # ditto
9: DF 0C 00 [Channel Pressure] chan 16 val 12 # ditto
10: DF 0F 00 [Channel Pressure] chan 16 val 15 # ditto
11: DF 12 00 [Channel Pressure] chan 16 val 18 # ditto
12: DF 15 00 [Channel Pressure] chan 16 val 21 # ditto
13: DF 18 00 [Channel Pressure] chan 16 val 24 # ditto
14: DF 1B 00 [Channel Pressure] chan 16 val 27 # ditto
15: DF 1E 00 [Channel Pressure] chan 16 val 30 # ditto
16: DF 21 00 [Channel Pressure] chan 16 val 33 # ditto
17: DF 24 00 [Channel Pressure] chan 16 val 36 # ditto
18: DF 27 00 [Channel Pressure] chan 16 val 39 # ditto
19: DF 2A 00 [Channel Pressure] chan 16 val 42 # ditto
20: D1 0C 00 [Channel Pressure] chan 2 val 12 # generated by my plugin as a replacement for the raw event
21: D1 12 00 [Channel Pressure] chan 2 val 18 # ditto
22: D1 1B 00 [Channel Pressure] chan 2 val 27 # ditto
23: D1 21 00 [Channel Pressure] chan 2 val 33 # ditto
24: D1 2A 00 [Channel Pressure] chan 2 val 42 # ditto
25: D1 30 00 [Channel Pressure] chan 2 val 48 # ditto
Code:
reading from ProcessData::inputEvents: event.type=0 pushing to ProcessData::outputEvents: type=kLegacyMIDICCOutEvent (kPitchBend) [t=0.013 cmd=PITCH_BEND_CHANGE ch=1 d1=00 d2=64 (v=0.500) pre-NOTE_ON setup] pushing to ProcessData::outputEvents: type=kLegacyMIDICCOutEvent (kAfterTouch) [t=0.013 cmd=CHANNEL_PRESSURE ch=1 d1=00 d2=00 (v=0.000) pre-NOTE_ON setup] pushing to ProcessData::outputEvents: type=kNoteOnEvent [t=0.013 cmd=NOTE_ON ch=1 d1=48 d2=69 (v=0.543)] pushing to ProcessData::outputEvents: type=kLegacyMIDICCOutEvent (kPitchBend) [t=0.013 cmd=PITCH_BEND_CHANGE ch=1 d1=00 d2=64 (v=0.500)] pushing to ProcessData::outputEvents: type=kLegacyMIDICCOutEvent (kAfterTouch) [t=0.013 cmd=CHANNEL_PRESSURE ch=1 d1=00 d2=00 (v=0.000)] reading from ProcessData::inputParameterChanges; param_id=128, v=0.023622 (as MIDI byte: 3) pushing to ProcessData::outputEvents: type=kLegacyMIDICCOutEvent (kAfterTouch) [t=0.017 cmd=CHANNEL_PRESSURE ch=1 d1=03 d2=00 (v=0.024)] reading from ProcessData::inputParameterChanges; param_id=128, v=0.094488 (as MIDI byte: 12) reading from ProcessData::inputParameterChanges; param_id=128, v=0.141732 (as MIDI byte: 18) reading from ProcessData::inputParameterChanges; param_id=128, v=0.212598 (as MIDI byte: 27) reading from ProcessData::inputParameterChanges; param_id=128, v=0.259843 (as MIDI byte: 33) reading from ProcessData::inputParameterChanges; param_id=128, v=0.330709 (as MIDI byte: 42) reading from ProcessData::inputParameterChanges; param_id=128, v=0.377953 (as MIDI byte: 48) pushing to ProcessData::outputEvents: type=kLegacyMIDICCOutEvent (kAfterTouch) [t=0.002 cmd=CHANNEL_PRESSURE ch=1 d1=12 d2=00 (v=0.094)] pushing to ProcessData::outputEvents: type=kLegacyMIDICCOutEvent (kAfterTouch) [t=0.007 cmd=CHANNEL_PRESSURE ch=1 d1=18 d2=00 (v=0.142)] pushing to ProcessData::outputEvents: type=kLegacyMIDICCOutEvent (kAfterTouch) [t=0.012 cmd=CHANNEL_PRESSURE ch=1 d1=27 d2=00 (v=0.213)] pushing to ProcessData::outputEvents: type=kLegacyMIDICCOutEvent (kAfterTouch) [t=0.017 cmd=CHANNEL_PRESSURE ch=1 d1=33 d2=00 (v=0.260)] pushing to ProcessData::outputEvents: type=kLegacyMIDICCOutEvent (kAfterTouch) [t=0.022 cmd=CHANNEL_PRESSURE ch=1 d1=42 d2=00 (v=0.331)] pushing to ProcessData::outputEvents: type=kLegacyMIDICCOutEvent (kAfterTouch) [t=0.023 cmd=CHANNEL_PRESSURE ch=1 d1=48 d2=00 (v=0.378)] |
|
|
06-25-2024, 08:29 AM
|
#2 |
|
Administrator
Join Date: Mar 2007
Location: NY
Posts: 17,784
|
If you open the plug-in pin connector and click the I/O button, under the "MIDI Output" menu, is "Merges with MIDI bus" enabled?
|
|
|
06-25-2024, 08:49 AM
|
#3 | |
|
Human being with feelings
Join Date: Jun 2023
Posts: 10
|
Quote:
Edit: I attached the project file. Last edited by athoshun; 06-25-2024 at 09:01 AM. Reason: clarification |
|
|
|
06-25-2024, 09:12 AM
|
#4 |
|
Administrator
Join Date: Mar 2007
Location: NY
Posts: 17,784
|
OK, thanks. We have a likely fix for this but it will need to wait until after the 7.17 release.
|
|
|
06-25-2024, 09:15 AM
|
#5 |
|
Human being with feelings
Join Date: Jun 2023
Posts: 10
|
|
|
|
07-17-2024, 02:55 PM
|
#6 |
|
Human being with feelings
Join Date: Jun 2023
Posts: 10
|
Thank you again, VST 3 MIDI output (CC, Channel Pressure, and Pitch bend) in v7.19rc1 works as expected.
Last edited by athoshun; 07-17-2024 at 03:00 PM. |
|
|
![]() |
| Thread Tools | |
|
|