VST2 fx responding to MIDI input
- KVRAF
- Topic Starter
- 23102 posts since 7 Jan, 2009 from Croatia
Hello everyone!
I'm not much of a plugin developer, so I hope you don't mind me posting this question here. It is basically on the behalf of the Surge dev team.
To simply cut to the chase, the issue Surge has is that Windows VST2 plugin version, when set up as an effect (which is done by simply renaming the plugin to surge_fx.dll) doesn't respond at all to MIDI input, like some other VSTi with audio inputs do successfully - i.e. u-he Zebrify, NI FM8, to name a couple. I would personally very much love for it to be able to do that, but adding isSynth() doesn't fix things, because then (at least in Reaper), the audio coming through the main inputs (1/2) is always passed through to the output directly, along with being processed by the synth engine - which is obviously undesirable. I haven't noticed this sort of behavior with Zebrify or FM8...
The VST2 instance stuff is found here:
https://github.com/surge-synthesizer/su ... f/src/vst2
Does anyone have any idea what to do here to make MIDI input work as if it were a VSTi, but still be able to process audio inputs? (And not pass through audio input in Reaper... just like Zebrify doesn't.)
Thanks!
I'm not much of a plugin developer, so I hope you don't mind me posting this question here. It is basically on the behalf of the Surge dev team.
To simply cut to the chase, the issue Surge has is that Windows VST2 plugin version, when set up as an effect (which is done by simply renaming the plugin to surge_fx.dll) doesn't respond at all to MIDI input, like some other VSTi with audio inputs do successfully - i.e. u-he Zebrify, NI FM8, to name a couple. I would personally very much love for it to be able to do that, but adding isSynth() doesn't fix things, because then (at least in Reaper), the audio coming through the main inputs (1/2) is always passed through to the output directly, along with being processed by the synth engine - which is obviously undesirable. I haven't noticed this sort of behavior with Zebrify or FM8...
The VST2 instance stuff is found here:
https://github.com/surge-synthesizer/su ... f/src/vst2
Does anyone have any idea what to do here to make MIDI input work as if it were a VSTi, but still be able to process audio inputs? (And not pass through audio input in Reaper... just like Zebrify doesn't.)
Thanks!
-
Davidson A & M Davidson A & M https://www.kvraudio.com/forum/memberlist.php?mode=viewprofile&u=409245
- KVRist
- 76 posts since 3 Dec, 2017 from Niwot, CO
When testing reaper with my VSTi3 plugin it does not allow audio input on the instrument for some reason I thought it can't be then I tested other software I think this is a reaper issue. I tried every which way to route audio in and no go. Also the FX version of the plug does not seem to pick up midi in at all? I would also like to know what's up. I can easily do this in other hosts?
Tested in other hosts FL studio, pedalboard2, Kushview Element heck even Tracktion7 lol!! it's working fine.
Tested in other hosts FL studio, pedalboard2, Kushview Element heck even Tracktion7 lol!! it's working fine.
-Committed to provide innovative technologies for multimedia.-
https://www.davidsonaudioandmultimedia.com
https://www.davidsonaudioandmultimedia.com
- KVRAF
- Topic Starter
- 23102 posts since 7 Jan, 2009 from Croatia
This particular issue is just about VST2, not VST3, tho.
- KVRian
- 1253 posts since 31 Dec, 2008
Try un-commenting that wantEvents() call in resume()
i.e. remove the "//"
i.e. remove the "//"
www.solostuff.net
Advice is heavy. So don’t send it like a mountain.
Advice is heavy. So don’t send it like a mountain.
- KVRAF
- Topic Starter
- 23102 posts since 7 Jan, 2009 from Croatia
Paul from Surge team says that's commented out because it's not a part of VST2 API (deprecated in favor of canDo()) and it doesn't compile for him
-
- KVRian
- 845 posts since 25 Dec, 2018
Yeah wantEvents is deprecated and doesn't build for me when I use VST 2.4. Did you see a different result? Also the canDos are called I think.
@Davidson A&M: I made a short video showing how to route to Surge 1.6.4.1 VST in Reaper.
https://www.youtube.com/watch?v=OKR0x_dneYI
Hope that helps!
@Davidson A&M: I made a short video showing how to route to Surge 1.6.4.1 VST in Reaper.
https://www.youtube.com/watch?v=OKR0x_dneYI
Hope that helps!
- KVRian
- 1253 posts since 31 Dec, 2008
Yeah, cando() seams to return true on receiveVstMidiEvent. I guess you'll have to debug and see if processEvents() actually gets called or not. If it doesn't then the problem is probably on the SDK or DAW side. If it does, then the problem is probably in surge it self. Debug both the synth and effect and see where it goes different. processEvents() is where the MIDI message will first land (as far as I can recall).
www.solostuff.net
Advice is heavy. So don’t send it like a mountain.
Advice is heavy. So don’t send it like a mountain.
-
- KVRian
- 845 posts since 25 Dec, 2018
Right so in synth mode process events gets calledS0lo wrote: ↑Thu Dec 05, 2019 8:47 pm Yeah, cando() seams to return true on receiveVstMidiEvent. I guess you'll have to debug and see if processEvents() actually gets called or not. If it doesn't then the problem is probably on the SDK or DAW side. If it does, then the problem is probably in surge it self. Debug both the synth and effect and see where it goes different. processEvents() is where the MIDI message will first land (as far as I can recall).
In fx mode it does not
And that’s what is supposed to happen because vst2 doesn’t really in the spec support midi with fx or audio with synths (vst3 and au are fine)
But other vst2 have a different hack that means it does. So evil knows it can work.
Anyone know what that hack is and want to implement that in surge? That’s really the question here
- KVRian
- 1253 posts since 31 Dec, 2008
hmm, I don't recall doing such a hack in my own vst plug. it just works with both synth and effect!!
www.solostuff.net
Advice is heavy. So don’t send it like a mountain.
Advice is heavy. So don’t send it like a mountain.
- KVRAF
- Topic Starter
- 23102 posts since 7 Jan, 2009 from Croatia
Yeah so for example if you open FM8 FX, it will both receive MIDI and also process incoming audio over inputs 1/2. It won't require sidechain inputs 3/4 for that.
- KVRian
- 1253 posts since 31 Dec, 2008
Actually, the DAW first calls dispatchEffectClass() which calls ae->dispatcher() which inturn calls processEvents().
www.solostuff.net
Advice is heavy. So don’t send it like a mountain.
Advice is heavy. So don’t send it like a mountain.
-
- KVRian
- 845 posts since 25 Dec, 2018
-
- KVRian
- 845 posts since 25 Dec, 2018
Is your synth open source? What effect type is it? Do you call isSynth()? And how do you make it so it load as either an effect or a synth in VST2 hosts? That’s the reason the _fx hack is in the surge codebase at all as far as I can tell.
But really I don’t know. I have literally never made a bit of music with a VST2! So this is well outside my realm of expertise. The VST2 layer plumbs through to the core synth in a way i understand but things like setting up the shape and routing nature of the busses and stuff is code I don’t know at all. If you’ve made it work and would like to hop on board, we can always use more developers over in surge land!
- KVRian
- 1253 posts since 31 Dec, 2008
It's closed source. Sorry. But yes I do call isSynth() for the synth version and don't call it for the FX version. Specifically to alleviate for these routing issues that happens in reaper and the like just as you described. But in both versions, MIDI input works!! And I really can't remember doing any thing special to make that happen.
I did download the source like an hour ago just to poke and see. May be I'll manage compiling it in my free time.baconpaul wrote: ↑Thu Dec 05, 2019 9:23 pmBut really I don’t know. I have literally never made a bit of music with a VST2! So this is well outside my realm of expertise. The VST2 layer plumbs through to the core synth in a way i understand but things like setting up the shape and routing nature of the busses and stuff is code I don’t know at all. If you’ve made it work and would like to hop on board, we can always use more developers over in surge land!
Another thing worth checking is if CanDo() actually gets called with receiveVstMidiEvent or not by the host.
www.solostuff.net
Advice is heavy. So don’t send it like a mountain.
Advice is heavy. So don’t send it like a mountain.
- KVRAF
- Topic Starter
- 23102 posts since 7 Jan, 2009 from Croatia
Thanks for checking it out, S0lo! It would be amazing if you get interested by the source and maybe if willing lend a hand. But of course, no pressure!