[LV2] LV2 vs. Ardour: unexpected time.Position events and time.frames values

Hanspeter Portner dev at open-music-kontrollers.ch
Sat Oct 26 13:21:58 PDT 2019

On 26.10.19 21:34, Sven Jaehnichen wrote:
> Hi Robin,
> Am 26.10.19 um 19:52 schrieb Robin Gareus:
>> On 10/26/19 6:40 PM, Sven Jaehnichen wrote:
>>> I used two separate atom input ports.
>> Why two? A single atom port can handle all data.
>> And yes it's a known issue. Ardour5 does not support multiple atom ports.
> The weird thing, it (now) works with 2 atom ports in Ardour5 after I filtered
> out all events with ev->time.frames > n_samples. At least on my systems.
> Although I read and experienced before that it should not work. Still wonder why.

This is very unlikely, e.g. that Ardour5 would send falsely timestamped events.
I've never seen that happen.

Are you sure you're not reading over the end of the atom sequence buffer, or
reading it somehow wrongly ?

This [1] little event analyzer plugin may be of help to you. Just drop it into
the same MIDI track as your plugin in Ardour and compare the *real* Time/MIDI
event stream with what you think you're receiving.

[1] https://open-music-kontrollers.ch/lv2/sherlock/#atom_inspector

>>> #2 Putting both "atom:supports time:Position" and "atom:supports
>>> midi:MidiEvent" into a single atom input port seemed to work fine.
>>> But I accidentally found out that no time.Position events were
>>> received by the plugin from Ardour in this case
>> This is odd. It works just fine here. Maybe compare to [1], [2].
>> Keep in mind that Ardour only notifies the plugin about changes. There
>> is no constant stream of messages.
>> [1] https://x42-plugins.com/x42/x42-stepseq-8x8
>> [2] https://github.com/x42/stepseq.lv2/blob/master/src/stepseq.c#L147
> The source code of you stepseq helped me a lot to learn about LV2 MIDI for the
> development of B.SEQuencer. Thank you.
> But there is a major difference between x42-stepseq and B.SEQuencer. B.SEQuencer
> uses a MIDI input signal to start / stop the step sequencer and to pitch the
> MIDI signal.
> If I use a single atom input port without midi, it works like yours and it
> receives time_position events (speed, bpm, ...) from any host I tested. Fine.
> If I add "atom:supports midi:MidiEvent" to the same port, it receives midi
> events and time_positon events using jalv (fine too) but it only receives midi
> events using Ardour. Therefore I came back to the idea with two atom input ports.

This should just work, I've multiple event-based plugins that read all kinds of
events on the same input port.

More information about the Devel mailing list