This project has moved and is read-only. For the latest updates, please go here.

Ableton event repetition

Topics: Host Processing
Nov 1, 2011 at 4:55 PM

I'm looking at an issue that seems to be Ableton specific;

I've created a new Midi plugin (using Marc's newest templates) and I can throw Midi events to the GUI with Cantabile as a host.

When the plugin runs in Ableton (8) the events are continually repeated once started - press a midi key and note events are repeated forever as per the DebugView output below - 

[680] VST.NET: Receiving Midi Event :128,52,64
[680] VST.NET: Receiving Midi Event :128,52,64
[680] VST.NET: Receiving Midi Event :128,52,64
[680] VST.NET: Receiving Midi Event :128,52,64
[680] VST.NET: Receiving Midi Event :128,52,64
[680] VST.NET: Receiving Midi Event :128,52,64
[680] VST.NET: Receiving Midi Event :128,52,64 

I've noticed that if I remove the 'if (!SyncWithAudioProcessor)' check from MidiProcessor.Process and the call to _plugin.MidiProcessor.ProcessCurrentEvents(); in DummyAudioProcessor.Process then it works 'correctly'. 

This doesn't affect my current project as it's Midi only, I'm just wondering whether it's an initialisation issue that I'm messing up on.

Does anyone have a pointer on this one ?


Nov 2, 2011 at 10:28 AM

Basically you can get that same behavior by initializing SyncWithAudioProcessor to false - and not remove any of the code. Whatever works for you is fine of course.

But that doesn't make it less dubiuos ;-). So if you output the midi to the host in the same call the host is calling your MidiProcessor.Process (called processEvents in the VST SDK) then it works. When you wait with outputting midi until the AudioProcessor.Process is called (processReplacing) then it doesn't. That almost suggests that plugins that interpret audio to generate midi will not work in Ableton...

You could decide to make the SyncWithAudioProcessor an advanced setting in your plugin the user can tweak when things aren't working...?

I'm sorry I don't have a better answer for you.

Nov 2, 2011 at 6:19 PM

No, thanks Marc.

I was stumped for a while because changing SyncWithAudioProcessor to false actually results in MidiProcessor.ProcessCurrentEvents only being called once (on init) and never again, so for the moment I'll go with keeping it at true.

As it turned out Cantabile crashes more than I can cope with so I re-checked with HS's VSTHost with the same outcome - it's nice to have a app to double check operation.

Anyway, I'm sure the resolution will reveal itself in time but it's not a biggie.

Thanks again.