Technical CLAP question about out of order event...

Official support for: u-he.com
Post Reply New Topic
RELATED
PRODUCTS

Post

So I have CLAP working quite well in my host. When running MFM 2.5 under windows, I get a lot of messages like:
AM_CLAP_Plugin::AM_CLAP_EventQueue: out of order event 1 - 71
Now I know what causes this. I push my MIDI events and they are all in order. Then I push my automation events. This may cause, and apparently does, cause events to be out of order. Is this a problem? Does MFM still handle the events? I know this is the wrong forum but it would be nice if the push method kept events in order as that would alleviate the need for a sort.

Any help appreciated.

Post

The plug-in expects the events to be in order.

The beauty of CLAP is that it gives us a unified queue of events, which eliminates an ambiguity present in other formats. It also eliminates the problem that each plug-in needs to zip and sort events anyway.

We have refactored our process loop so that it directly uses the CLAP event queue. If events are out of order, they will still be processed, but the timing will be off.

All example code for CLAP that we're creating or contributing to will use the event queue this way.

Thing is, if we wish to move past the restrictions of VST2, someone has to do a stable_sort on the event queue. If it's not the host, it's the plug-in. It only makes sense to place the burden on the host, and that is what CLAP does.

Post

Ok thanks for the info.

Post

Hope it helps!

I'd like to add that if the events are sorted in the plug-in, there can always be timing ambiguity. For instance, if a note on and a parameter change happen at the same timestamp, the plug-in can not know the order - unless the queue is sorted by the host. These kinds of issues have cost us valuable time over the years... things that appeared to be bugs, when in reality they were a common flaw of plug-in API design.

Post

This is true.

Post Reply

Return to “u-he”