Go Back   Cockos Incorporated Forums > REAPER Forums > REAPER Bug Reports

Reply
 
Thread Tools Display Modes
Old 10-18-2021, 01:36 PM   #1
mschnell
Human being with feelings
 
mschnell's Avatar
 
Join Date: Jun 2013
Location: Krefeld, Germany
Posts: 14,157
Default Midi Problem with VST3 done with official JUCE 6.1.2 (FIXED)

I already reported this error here -> https://forum.cockos.com/showthread.php?t=253540
But at that time I used a preview version of JUCE, as they did not officially support vendor extension on VST3. Hence the test results were not perfectly relevant.

Now I rechecked using the current official JUCE release 6.1.2.

I get the same results as with the prerelease.

My VST3 copies Midi messages from the input stream to the output stream while changing the channel from 1 to 2.

(In Windows 10 64 Bit, just having all setting as default), in short the problem is that if Midi CC messages are generated by the JUCE VST3 - be it as a reaction of an incoming message or by means to e.g. moving a slider in the VST3 -, the ReaControlMidi LOG directly after that VST3 shows two messages instead of one: the correct one plus the last one received from the input stream.
The guys at JUCE already checked and confirmed the test, and claim that this is a Reaper problem, and the same VST3 does not show that behavior with other DAWs.

For more detais please follow the link above.

A VST3 for testing is here : -> www.bschnell.de/TEST double Usrt Interface.zip
-Michael
mschnell is offline   Reply With Quote
Old 10-18-2021, 01:38 PM   #2
schwa
Administrator
 
schwa's Avatar
 
Join Date: Mar 2007
Location: NY
Posts: 15,395
Default

bad link for test vst?
schwa is offline   Reply With Quote
Old 10-18-2021, 02:28 PM   #3
mschnell
Human being with feelings
 
mschnell's Avatar
 
Join Date: Jun 2013
Location: Krefeld, Germany
Posts: 14,157
Default

For me it works (just clicking above).
Is it a problem that it contains blanks ?
Should I rename the file ?

I'm going to provide the JUCE project that generates the VST3 in a few minutes...

...

Here is the JUCE project and the Reaper project file. -> http://www.bschnell.de/JUCE-reaper-e...fx-gui_new.zip

It's slightly complicated to get a Juce project compiled, though.
With this one I have the JUCE library files in a folder JUCE-6.1.2 (renamed from "JUCE" in the distribution) right besides the project folder called JUCE-reaper-embedded-fx-gui_new. This set up you should be able to run CMAKE in the project folder. I use VSCode, and here I can set several project compile option such as make a VST3 (instead of a VST2), debug/release, ...

-Michael

Last edited by mschnell; 10-19-2021 at 04:14 AM.
mschnell is offline   Reply With Quote
Old 10-18-2021, 02:45 PM   #4
schwa
Administrator
 
schwa's Avatar
 
Join Date: Mar 2007
Location: NY
Posts: 15,395
Default

The link works, but the vst3 won't load ... LoadLibrary() fails. Maybe it has some other dependencies?
schwa is offline   Reply With Quote
Old 10-18-2021, 03:11 PM   #5
Justin
Administrator
 
Justin's Avatar
 
Join Date: Jan 2005
Location: NYC
Posts: 15,597
Default

Can you make a release build? Thanks
Justin is offline   Reply With Quote
Old 10-18-2021, 09:55 PM   #6
mschnell
Human being with feelings
 
mschnell's Avatar
 
Join Date: Jun 2013
Location: Krefeld, Germany
Posts: 14,157
Default

Quote:
Originally Posted by schwa View Post
The link works, but the vst3 won't load ... LoadLibrary() fails. Maybe it has some other dependencies?
For me it obviously does work with the current official Reaper release.
I have no idea what might impose this error, as I don't explicitly call any library but JUCE. Hence it seems to be introduced by JUCE. Maybe you need to ask at their forum...


BTW.: if you want to compile the project without using VSCode, this is the command VSCode issues:

"c:\Program Files\CMake\bin\cmake.EXE" --build "c:/Users/Michael Schnell/JUCE/JUCE-reaper-embedded-fx-gui_new/build" --config Debug --target AudioPluginExample_VST3 -j 10 --

-Michael

Last edited by mschnell; 10-18-2021 at 10:03 PM.
mschnell is offline   Reply With Quote
Old 10-18-2021, 10:02 PM   #7
mschnell
Human being with feelings
 
mschnell's Avatar
 
Join Date: Jun 2013
Location: Krefeld, Germany
Posts: 14,157
Default

Quote:
Originally Posted by Justin View Post
Can you make a release build? Thanks
I additionally placed it in the same Zip. -> www.bschnell.de/TEST double Usrt Interface.zip
Thanks for having a look !

-Michael

Last edited by mschnell; 10-19-2021 at 01:38 AM.
mschnell is offline   Reply With Quote
Old 10-19-2021, 04:49 AM   #8
schwa
Administrator
 
schwa's Avatar
 
Join Date: Mar 2007
Location: NY
Posts: 15,395
Default

By default the plugin seems to generate no MIDI.

If I move the slider it generates mod wheel messages on channel 2.

If MIDI is sent to the plugin, it eats the MIDI.

If MIDI is sent to the plugin while the slider is moved, it generates mod wheel messages on channel 2 and also echoes the input MIDI. The plugin will continue to echo the last input MIDI, even if no MIDI is sent to the plugin in that processing call. It may be a bug in the plugin that it only echoes the input MIDI if it's also generating MIDI, and that it continues to echo the input MIDI when generating MIDI after that, even though no more MIDI is sent to the plugin.

Note that by default REAPER will reset active MIDI CC on playback start, which may be confusing. For example if the last CC7 sent to the plugin was anything other than 127, by default CC7 127 will be sent on playback start. You can disable this in prefs > audio > playback by disabling reset MIDI CC/pitch on playback start.
schwa is offline   Reply With Quote
Old 10-19-2021, 07:59 AM   #9
Justin
Administrator
 
Justin's Avatar
 
Join Date: Jan 2005
Location: NYC
Posts: 15,597
Default

That compile_commands.json has -DJucePlugin_ProducesMidiOutput=0 and -DJucePlugin_WantsMidiInput=0, maybe that's part of the issue?
Justin is offline   Reply With Quote
Old 10-19-2021, 10:16 AM   #10
schwa
Administrator
 
schwa's Avatar
 
Join Date: Mar 2007
Location: NY
Posts: 15,395
Default

Ah, hang on, there might be an issue on our side too... looking into it.
schwa is offline   Reply With Quote
Old 10-19-2021, 11:04 AM   #11
mschnell
Human being with feelings
 
mschnell's Avatar
 
Join Date: Jun 2013
Location: Krefeld, Germany
Posts: 14,157
Default

Quote:
Originally Posted by schwa View Post
If MIDI is sent to the plugin while the slider is moved, it generates mod wheel messages on channel 2 and also echoes the input MIDI.
That exactly is the problem.

I just send Mod Wheel messages on channel 1 to the VST from the previous plugin slot,
The VST code is supposed to eat the Midi and send a message on Channel 2 for each incoming.
This is what I programmed, and what the JUCE guys say really happens with other DAWs.

The additional echo is erroneous.

Moreover the VST sends those Midi messages with appropriate values when a slider is moved (Main GUI, embedded GUI or plugin Parameter via automation). Erroneously additionally the next plugin slot sees a new copy of the last midi message received by the VST ('s slot) with any Midi message sent by the VST.

I did not do any tests at play/start. just looked at the ReaContrlMidi log, with Monitor enable in stop mode ("live performance style" is what I am most familiar with. )

-Michael

Last edited by mschnell; 10-19-2021 at 11:18 AM.
mschnell is offline   Reply With Quote
Old 10-19-2021, 11:05 AM   #12
mschnell
Human being with feelings
 
mschnell's Avatar
 
Join Date: Jun 2013
Location: Krefeld, Germany
Posts: 14,157
Default

Quote:
Originally Posted by Justin View Post
That compile_commands.json has -DJucePlugin_ProducesMidiOutput=0 and -DJucePlugin_WantsMidiInput=0, maybe that's part of the issue?
This in fact looks wrong. I'll take a look...

In the project configuration file CMakeLists.txt I have:
# NEEDS_MIDI_INPUT TRUE/FALSE # Does the plugin need midi input?
NEEDS_MIDI_INPUT TRUE
# NEEDS_MIDI_OUTPUT TRUE/FALSE # Does the plugin need midi output?
NEEDS_MIDI_OUTPUT TRUE
# IS_MIDI_EFFECT TRUE/FALSE # Is this plugin a MIDI effect?
IS_MIDI_EFFECT TRUE

This seems to disagree with the compile_commands.json line you quoted, I in fact have no idea about the implications.

But I don't see more midi configuration options.

-Michael

Last edited by mschnell; 10-19-2021 at 11:12 AM.
mschnell is offline   Reply With Quote
Old 10-19-2021, 11:10 AM   #13
schwa
Administrator
 
schwa's Avatar
 
Join Date: Mar 2007
Location: NY
Posts: 15,395
Default

This does look like a (quite old) bug in VST3 MIDI handling on our side. We should have a fix in today's +dev build for you to try out.
schwa is offline   Reply With Quote
Old 10-19-2021, 11:20 AM   #14
mschnell
Human being with feelings
 
mschnell's Avatar
 
Join Date: Jun 2013
Location: Krefeld, Germany
Posts: 14,157
Default

Quote:
Originally Posted by schwa View Post
This does look like a (quite old) bug in VST3 MIDI handling on our side. We should have a fix in today's +dev build for you to try out.
That is GREAT !
-Michael
mschnell is offline   Reply With Quote
Old 10-19-2021, 01:15 PM   #15
mschnell
Human being with feelings
 
mschnell's Avatar
 
Join Date: Jun 2013
Location: Krefeld, Germany
Posts: 14,157
Default

WORKS OK !
Thanks,
-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 07:32 AM.


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