[LV2] Combining MIDI + Atom Transport + Resize Port
d at drobilla.net
Thu Jul 7 15:58:52 PDT 2016
On Wed, 2016-04-27 at 23:12 +0300, Vladimir Sadovnikov wrote:
> - Is it a normal practice to separate MIDI ports into independent Atom ports?
> What's the proper solution?
No. It's generally far less of a nuisance for both developers and users
to put all "messagey things" through a single port. Since you can
inherently multiplex, the only reason to have several is where distinct
streams are inherently necessary for MIDI routers and the like.
> - How the hosts should handle MIDI ports implemented as independent Atom ports?
They just... do. Sequence ports are sequence ports, there's nothing
logistically special about MIDI at all.
> - Is it a normal practice to combine MIDI event transport and Atom transport
> into one Atom port? What's the proper solution, again?
> - How the hosts should handle combined MIDI and Atom transport with enabled
> Resize Port extension?
Orthogonal, but note that most hosts don't support resize-port, and if
you have a static upper limit it's better to just list that in the ttl
as you have done anyway.
> - How the hosts should handle multiple Atom ports with the same direction
This is a hard question with no universal answer, the answers range from
"it depends" to "by being a pain for the user" to "they don't", which is
why I suggest just not doing this.
> - Why official LV2 Specs do not say anything about how to use multiple Atom
> ports by the plugin and how to handle multiple Atom ports by the host?
Say what, exactly?
I think you've been bitten by Ardour's implementation of buffers, which
are shared along the route and still carry some "this is just for MIDI"
legacy more so than LV2 (though I'm open for suggestions for
improvements). The basic pattern demonstrated by eg-sampler is, IMO,
The One Correct Way to do plugin/UI/MIDI/Atom/etc comm.
Shrinking your message size further would probably help quite a bit, but
if that's impossible (or even if it is possible) fixing the issues that
are causing hosts to choke when transferring these messages should
More information about the Devel