obiwanjacobi / vst.net

Virtual Studio Technology (VST) for .NET. Plugins and Host applications.
https://obiwanjacobi.github.io/vst.net/index.html
GNU Lesser General Public License v2.1
420 stars 52 forks source link

vst.net plugin throws ArgumentException when receiving MIDI events #47

Closed moosmartin closed 3 years ago

moosmartin commented 3 years ago

Describe the bug When I compile the sample MIDI plugin and load it in a DAW, the plugin throws the following exception each time I sent MIDI note data to it:

System.ArgumentException: The specified eventType is not generic (deprecated). (Parameter 'eventType')
   at Jacobi.Vst.Core.Legacy.VstGenericEvent..ctor(VstEventTypes eventType, Int32 deltaFrames, Byte[] data) in C:\Users\[...]\vst.net\Source\Code\Jacobi.Vst.Core\Legacy\VstGenericEvent.cs:line 22
   at TypeConverter.ToManagedEventArray(Vst2Events* pEvents)
   at Jacobi.Vst.Plugin.Interop.PluginCommandProxy.Dispatch(Int32 opcode, Int32 index, Int32 value, Void* ptr, Single opt)

To Reproduce Steps to reproduce the behavior:

  1. Load sample MIDI plugin (Jacobi.Vst.Samples.MidiNoteMapper.dll) in a DAW (tested with Ableton Live and Bitwig Studio)
  2. Send MIDI data to plugin

Expected behavior The plugin processes the MIDI data

Desktop (please complete the following information):

Additional context The sample audio plugin (Jacobi.Vst.Samples.Delay.dll) works as expected. I tried debugging into the plugin with Visual Studio 2019 after compiling the library code with the Debug configuration, but cannot get any breakpoints to trigger.

obiwanjacobi commented 3 years ago

Ooops! Thanks for reporting.

To help you continue with your progress:

Will be fixed in next version. Hope this helps.