surge-synthesizer / surge

Synthesizer plug-in (previously released as Vember Audio Surge)
https://surge-synthesizer.github.io/
GNU General Public License v3.0
3.17k stars 400 forks source link

audio channel mixing behaves differently as CLAPi vs VST3i #7584

Closed jjYBdx4IL closed 8 months ago

jjYBdx4IL commented 8 months ago

Bug Description: I'm trying to use the CLAPi version of v1.3.1 as a vocoder under Win11/amd64 in Reaper 7.11. I noticed that the audio input gets mixed with the audio output. That does NOT happen when loading the plugin as VST3i. Is that a plugin or a Reaper issue?

Surge XT Version 1.3.1

Computer Information (please complete the following!):

baconpaul commented 8 months ago

My guess is this is reaper clap implementation passing the input through to the output. Have you looked at the pin diagram?

getting reaper working with instrument sidechains in vst3 took a fix - wonder if same happened in their clap

https://youtu.be/OKR0x_dneYI?si=DzfQ4DV00VfQpHJj

Here’s how we worked around before reaper fixed the instrument side chain in vst3 - if same works here we can follow up with reaper devs.

thanks

jjYBdx4IL commented 8 months ago

Ah yeah, that way it works. I put the CLAPi version on master and set the master track to use channels 3/4 for output. Then I set up the plugin to use channels 1/2 as inputs and 3/4 as outputs.

baconpaul commented 8 months ago

Oh that means reaper ignores the is main flag on inputs just like it used to in vst3 or surge isn’t reporting them properly. Useful!

Andreya-Autumn commented 8 months ago

This is Reaper's behavior with Instrument plugins generally! I'm not completely sure, it's been a while since I checked, but I think it happens with AUi, VST3i, VSTi and CLAPi all - if you patch audio to an instruments input the output will be the sum of the in and out. Purportedly it's intentional (so you can stack multiple instances on one track and get a sum), but I find this behavior frustrating personally.

The only solution I know is the one shown in that video, make sure the external audio isn't on the same channels as the output of the instrument.

baconpaul commented 8 months ago

No that’s not quite right @Andreya-Autumn - the vst3 and clap api can indicate that there’s no main input and then instruments can get set up properly. This is a thing we fixed with reaper 5.75 or some such when a vst3 has only non main ins. The video above isn’t how it works in reaper 6 with vst3.

my guess here is either surge clap doesnt advertise it’s input as not main or the reaper clap implementation doesn’t have the same fix as their vst3 implementation

Andreya-Autumn commented 8 months ago

Right, I stand corrected! The only other VST3i's with audio inputs that I have here are Pianoteq and VCV, and they both have this same problem, Surge XT is the only one that gets this right apparently. I've been using the CLAP lately so I didn't realize.

baconpaul commented 8 months ago

Yeah I confirmed that CLAP advertises the correct thing and so the same bug fix should make its way to reaper clap. To make it work with JUCE I had to get a change made in the JUCE VST3 API also so that may explain why PT doesn't have it right, if they don't use that extension.

@mkruselj you talk to the reaper guys recently?

mkruselj commented 8 months ago

Actually haven't talked to either of them in a while... But will post on the forums on this topic.

mkruselj commented 8 months ago

Looks like Cockos will implement this after 7.12 release. Closing this issue then!