Old 12-04-2019, 10:49 AM   #1
baconpaul
Human being with feelings
 
Join Date: Sep 2019
Posts: 13
Default VST3 kAux routing (FIXED)

Hi folks.

I am not sure if this is a bug report, a feature request, or neither, and over in the surge community we can't decide either, so I've decided to put it here and see what you think. It regards the Surge VST3. To test these features you would want to be running the surge nightly from https://surge-synthesizer.github.io/

Surge has a capability to process audio. In the AU in Logic this shows up as a side chain. I recently (as in last night) corrected the VST3 so the input channel was on bus kAux in the VST3 API, and now Cubase also sees it as a side chain. Great. The VST3 API is pretty clear actually that the kAux is how synth instruments get input; and a mix of kMain and kAux is how effects get input and sidechain. Since Surge is an instrument using kAux seems right.

This works all fine in Reaper also, but with a bit of a 'but'. That's the point of this post!

So first things first. If I run the VST3 validator from vst3sdk I see this

```
Class Info 0:
name = Surge
category = Audio Module Class

...

[Scan Buses]
Info: ===Scan Buses ====================================
Info: => Audio Buses: [1 In(s) => 1 Out(s)]
Info: In [0]: "Stereo In" (Aux-Default Active)
Info: Out[0]: "Stereo Out" (Main-Default Active)
Info: => Event Buses: [1 In(s) => 0 Out(s)]
Info: In [0]: "MIDI In" (Main-Default Active)
[Succeeded]
```

OK fine. Now if I add Surge to a reaper track I get get a track with 2 ins and 2 outs, both named '1/2'. The audio in bound to 1/2. But since it seems reaper routes audio 1/2 to output 1/2 by default absent an effect (and there is no effect here just an instrument) I get a mix of the surge processing and the audio processing.

The fix is to add 2 io ports, route the audio input to channel 3/4 from the side chain bus, bind inputs 3/4 to the surge input,, bind the surge output to 1/2, and then you can side chain the audio in and process it in surge without dropping it. This all makes perfect sense to me.

But the thing which I think is a feature request (but may not be) is for Reaper to automatically set up routing like this when it discovers an aux channel. The VST3 advertises channel 0 as an aux not a main, yet reaper binds it to the main by default.

So I'm imagining a world where I have a reaper channel 2in/2out and I add a surge and it sets up the surge by adding 2 new aux channels. Or put another way, "2 in/2 out" is the topology but those 2 in 2 out aren't coincident as described by the VST3 metadata. So I think the correct default setup for surge on a track is with the 4 reaper tracks as shown.

Of course we can set this up by hand and then everything works fine. But I'm not sure what the right thing is.

Some other members of the surge community think we should engineer surge differently so it is more effect like, but aside from that being not how the VST3 API works, it would also break Cubase.

And if nothing changes in Reaper we can easily document how all this works.

But I thought I would throw this item into the Reaper community since it does seem to me that automatically assuming 2in/2out are the *same* 2 when there's a clear bit of bus metadata saying they *aren't* is at least missing an opportunity to help guide a user to a more natural setup.

Maybe? Like I said, we can't decide.

Thanks for your consideration!
Attached Images
File Type: png ReaperAuxStateDesired.png (24.5 KB, 18 views)
baconpaul is offline   Reply With Quote
Old 12-05-2019, 02:23 PM   #2
EvilDragon
Human being with feelings
 
EvilDragon's Avatar
 
Join Date: Jun 2009
Location: Croatia
Posts: 23,878
Default

Justin? schwa?
EvilDragon is online now   Reply With Quote
Old 12-05-2019, 02:43 PM   #3
schwa
Administrator
 
schwa's Avatar
 
Join Date: Mar 2007
Location: NY
Posts: 10,503
Default

I understand what you're saying, but since REAPER doesn't distinguish between aux and main track channels, there's no real standard for how anything should be set up -- a track can have any number of channels, any of them can be used as primary or aux input, and any of them can be sent elsewhere.

A sidechainable instrument is a fairly unique thing. A general purpose way to make this easier might be for REAPER to give you way to block the input signal for instruments.
schwa is offline   Reply With Quote
Old 12-05-2019, 05:06 PM   #4
EvilDragon
Human being with feelings
 
EvilDragon's Avatar
 
Join Date: Jun 2009
Location: Croatia
Posts: 23,878
Default

Quote:
Originally Posted by schwa View Post
A sidechainable instrument is a fairly unique thing.
It's the only way to do it in Cubase or Logic... Some instruments may have built-in vocoder effects, hence the sidechain. But in our case with Reaper, as you say we can have that "sidechain" in main 1/2 inputs, and that should work fine. Right? (And from my experience with other VST insturments that have audio inputs, they all work fine in Reaper through 1/2 inputs, AND they listen to MIDI properly. In Surge if we rename the DLL by suffixing "_fx" to the name, so that it is recognized by the host as instrument - it works with inputs 1/2 as expected, BUT it doesn't receive MIDI! I have a number of VST FX that receive MIDI just fine...)

In Surge VST2 plugin, if I put some audio through it (through ins 1/2), it IS processed by the synth, but raw signal is also passed through the plugin as well (this seems to be a Reaper default thing to do?), so we get this weird overlap... Maybe if there was an option NOT to do this in Reaper, would be good?


It's a free plugin (and open source), so if you can please check it out to see what's wrong with it (by Reaper's expectations of VST2/VST3)?

https://github.com/surge-synthesizer...aster/src/vst2
https://github.com/surge-synthesizer...aster/src/vst3
EvilDragon is online now   Reply With Quote
Old 12-05-2019, 05:49 PM   #5
schwa
Administrator
 
schwa's Avatar
 
Join Date: Mar 2007
Location: NY
Posts: 10,503
Default

There's nothing wrong with the plugin. REAPER passes through the dry audio if a plugin announces itself as an instrument. The way to make this work in REAPER is to put it on a 4-channel track with pin routing as the OP describes. The question is whether there is something automatic REAPER could to do make this easier for the user. Probably the simplest thing is just a switch in the pin routing dropdown to disable the dry input passthrough -- functionally, this would override the plugin's self-description as an instrument for processing purposes.
schwa is offline   Reply With Quote
Old 12-06-2019, 01:34 AM   #6
EvilDragon
Human being with feelings
 
EvilDragon's Avatar
 
Join Date: Jun 2009
Location: Croatia
Posts: 23,878
Default

I do agree with the dry passthrough option, that would be nice!

Any idea why the FX version of the plugin wouldn't receive MIDI (because it doesn't right now - you rename the DLL to Surge_fx so that it announces itself as FX instead of instrument, and then it does receive audio over 1/2 but no MIDI input... and I have a number of FX plugins that do receive MIDI just fine)?


Thanks, schwa!
EvilDragon is online now   Reply With Quote
Old 12-06-2019, 11:39 AM   #7
baconpaul
Human being with feelings
 
Join Date: Sep 2019
Posts: 13
Default

Quote:
Originally Posted by schwa View Post
There's nothing wrong with the plugin. REAPER passes through the dry audio if a plugin announces itself as an instrument. The way to make this work in REAPER is to put it on a 4-channel track with pin routing as the OP describes. The question is whether there is something automatic REAPER could to do make this easier for the user. Probably the simplest thing is just a switch in the pin routing dropdown to disable the dry input passthrough -- functionally, this would override the plugin's self-description as an instrument for processing purposes.
Yeah so this is exactly my point and thank you

Reaper passes in 1/2 to out 1/2 automatically
But with a sidechain instrument reaper also adds in 1/2 to the aux channel
So I think the right behavior is when you add an instrument with a sidechain bus exactly as you said you create a new aux in your track and pin to that

So if you add surge to a track right now 1/2 -> aux and out and main -> out is the routing
I think it should setup 1/2 > out, main > out and 3/4 > aux

The other choice is if reaper sees a synth with an aux it does 1/2> aux, main> out and doesnít attach 1/2>out automatically

The third choice is it does what it does now and we make a small YouTube video on how to set up surge routing in reaper. Thatís what we already did

Now you canít do this with vst2 but vst3 lets you since it advertises bus flavor

Thoughts?
baconpaul is offline   Reply With Quote
Old 12-06-2019, 11:43 AM   #8
EvilDragon
Human being with feelings
 
EvilDragon's Avatar
 
Join Date: Jun 2009
Location: Croatia
Posts: 23,878
Default

Quote:
Originally Posted by baconpaul View Post
The other choice is if reaper sees a synth with an aux it does 1/2> aux, main> out and doesnít attach 1/2>out automatically
This sounds perfect to me. Can we have that, schwa?
EvilDragon is online now   Reply With Quote
Old 12-06-2019, 11:48 AM   #9
schwa
Administrator
 
schwa's Avatar
 
Join Date: Mar 2007
Location: NY
Posts: 10,503
Default

What do I need to do in Surge to make it do stuff in response to the sidechain input?
schwa is offline   Reply With Quote
Old 12-06-2019, 11:50 AM   #10
EvilDragon
Human being with feelings
 
EvilDragon's Avatar
 
Join Date: Jun 2009
Location: Croatia
Posts: 23,878
Default

Set oscillator to Audio In (click the CLASSIC label), then set Playmode to Latch to open the amp gate to get the sound out

OR you can leave the osc to default saw, turn Latch on, and load Vocoder effect on the far right side.
EvilDragon is online now   Reply With Quote
Old 12-06-2019, 11:53 AM   #11
baconpaul
Human being with feelings
 
Join Date: Sep 2019
Posts: 13
Default

Quote:
Originally Posted by schwa View Post
What do I need to do in Surge to make it do stuff in response to the sidechain input?
https://youtu.be/OKR0x_dneYI

And grab the nightly to get the aux bus advertised
baconpaul is offline   Reply With Quote
Old 12-06-2019, 11:55 AM   #12
EvilDragon
Human being with feelings
 
EvilDragon's Avatar
 
Join Date: Jun 2009
Location: Croatia
Posts: 23,878
Default

Latest nightly here: https://github.com/surge-synthesizer...es/tag/NIGHTLY
EvilDragon is online now   Reply With Quote
Old 12-06-2019, 12:28 PM   #13
schwa
Administrator
 
schwa's Avatar
 
Join Date: Mar 2007
Location: NY
Posts: 10,503
Default

Code:
~/cockos-git (pre_vst3_auxinst)
$ git logline -n 1
9f70d0e915 + VST3: replace input audio rather than summing for instruments that have sidechain input but no main input [t=227974]
BTW for user friendliness, Surge should probably label the input bus "Sidechain in" or similar.

Last edited by schwa; 12-06-2019 at 12:33 PM.
schwa is offline   Reply With Quote
Old 12-06-2019, 12:34 PM   #14
baconpaul
Human being with feelings
 
Join Date: Sep 2019
Posts: 13
Default

Quote:
Originally Posted by schwa View Post
Code:
~/cockos-git (pre_vst3_auxinst)
$ git logline -n 1
9f70d0e915 + VST3: replace input audio rather than summing for instruments that have sidechain input but no main input [t=227974]
BTW for user friendliness, Surge should probably label the input bus "Sidechain in" or similar.
Yeah thatís a good suggestion. Iíll do thst
baconpaul is offline   Reply With Quote
Old 12-06-2019, 12:41 PM   #15
EvilDragon
Human being with feelings
 
EvilDragon's Avatar
 
Join Date: Jun 2009
Location: Croatia
Posts: 23,878
Default

Thank you for this, schwa!
EvilDragon is online now   Reply With Quote
Old 12-06-2019, 02:06 PM   #16
baconpaul
Human being with feelings
 
Join Date: Sep 2019
Posts: 13
Default

Quote:
Originally Posted by schwa View Post
Code:
~/cockos-git (pre_vst3_auxinst)
$ git logline -n 1
9f70d0e915 + VST3: replace input audio rather than summing for instruments that have sidechain input but no main input [t=227974]
BTW for user friendliness, Surge should probably label the input bus "Sidechain in" or similar.
Holy cow I didn't notice this also included a change to reaper to work around this. Thanks. That's great! Appreciated.
baconpaul is offline   Reply With Quote
Old 12-06-2019, 02:28 PM   #17
baconpaul
Human being with feelings
 
Join Date: Sep 2019
Posts: 13
Default And just to wrap this one up

paul:~/dev/music/surge$ git log --pretty=oneline
c5bd13be3617a6ae577c189993d12fec58f15fc3 (HEAD -> master, upstream/master, origin/master, origin/HEAD) More Accurately name VST3 SideChain Bus (#1405)
baconpaul 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:48 PM.


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