Closed SirLyoshyk closed 1 year ago
Not important. I've switched to another framework.
@SirLyoshyk Out of curiosity, witch framework did you switch to ?
I still want to research this.
I have tested this by adding a 'Process Midi' button to the Host Sample and loading in an unmanaged midi monitor plugin (not the exact same as described - couldn't find a working download for that one). I send 2 batches of 10 note on/off messages and repeated that test a couple of times. I could not find any problems.
I have examined the code that is responsible for the marshaling of the managed vst events to the unmanaged plugin. I could not find any obvious problems there either. It is true that these events are stored because they (their memory) must remain valid for the entire processing cycle.
The only way that I can imagine the processEvents could go wrong is if you're "sending several events at once" by means of multi-threading: calling the same plugin at the same time from different threads. But I don't think that is what he meant.
If anyone runs into this problem, please let me know.
Describe the bug Hello. I'm trying to create a simple multichannel VST host and found an issue that doesn't allow me to use vst.net properly. When I'm sending several events at once to pluginContext.PluginCommandStub.ProcessEvents some of the events don't reach the VST plugin. These cause missing notes or notes that sound forever as noteoff event wasn't received. This issue especially hurts on pad tracks where we have a lot of simultaneous notes. It looks like ProcessEvents doesn't send events immediately to VST plugin, but sometimes keeps these events in some kind of buffer, because when we are sending next events, sometimes missing events are sent too.
To Reproduce Steps to reproduce the behavior:
VstPluginContext.Create(VSTPath, hcs)
pluginContext.PluginCommandStub.Commands.ProcessEvents(vstEvents)
Expected behavior All events must be passed to VST plugin as soon as received so notes will stop playing properly.
Additional info Visual studio communiti 2022 v.17.2.2 VST.NET2-Host 2.0.3 midiMonitor x64 1.3