Re: [LAD] Should LV2 Activate() clear MIDI CC parameters?

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Fons Adriaensen <fons@...>
Cc: <linux-audio-dev@...>, Albert Graef <Dr.Graef@...>
Date: Wednesday, May 30, 2012 - 1:01 am

On Tue, 2012-05-29 at 21:51 +0000, Fons Adriaensen wrote:

LV2 takes the simple non-choice strategy that Jack *really* should have
also went with: you can have inputs and outputs that are a buffer of
time-stamped events with *whatever* in them.

In practice, this has been only really been used for MIDI until
recently. Now more 'high level' things (like loading samples) are
starting to be done using non-MIDI events (e.g. LV2 'atoms' which is
sort of a binary JSON-like thing). Firing around POD-blobs of whatever
is fantastic.

While I would like to see something better than MIDI get established for
notes and such, no interest there so far. Unsurprisingly I don't think
the core API should be burdened with all that.

> Some initial comments:

I doubt any strong conclusion could be reached either way. The thing
is, there are all kinds of good reasons for plugins to want to process
streams of MIDI (or OSC, or...) events. Even if there was an
alternative somewhat equivalent system for it, this would be true.

Something better than MIDI would be great, but not supporting MIDI would
surely doom any plugin API. Better to support and let
somebody pioneer a better alternative when they're actually going to get
around to doing something with it (we can't really afford to be idealist
on this one anyway, the lack of LAD synth plugins is bad enough without
adding that gigantic barrier to porting on top of it)

For example, a great Ardour project would be to support explicit note
control (e.g. the ability to draw a single note and pitch bend it as an
arbitrary vector, and apply controls to *that note alone*) and actually
send all that data to a synth plugin (which MIDI can not do, OSC could,
other options as well) would be a great project. A chicken & egg
situation, though, that could only be resolved by someone actually
setting out to make that happen. Hopefully some day they do.

> * I'd expect (1,2) for e.g. individual modular synth modules,

Modulars can conveniently get around it by having separate plugins to do
whatever filtering the user wants. Probably the only "truly modular"
way to do it, really.

Stuff like LinuxSampler and Yoshimi are good examples of large fully
featured things that exist, and though existing code is
troublesome/irritating in an endless number of ways, I think practically
speaking it's clear this stuff has to work.

> * My tentative conclusion would be that a plugin standard

Thus far, 'the market' agrees, so that's probably the right conclusion.

> [*] Some tricky questions to disturb your sleep:

Ingen is actually just that: an LV2 plugin that can load LV2 plugins.
It actually saves to valid LV2 plugins, always (i.e. a saved ingen
bundle *is* an LV2 plugin, if always with the same binary). It is
theoretically possible for it to load itself, but this would be insane
for probably obvious reasons. I havn't really done the UI polish here
yet, but what it does is simply detect that an LV2 plugin is actually an
Ingen patch, and loads it as Ingen patches are normally loaded, and not
as a separate LV2 plugin via the generic interface.

I basically consider Ingen largely as a "plugin development without
writing code" project, these days (ideally I'd like there to be no user
visible distinction between Ingen patch and hand written LV2 plugin at
all). The biggest hole right now is that LV2 lacks dynamic
ports/parameters. This means if you drop a patch in an Ardour strip,
you're stuck with the inputs/outputs of the template you loaded -
including controls, which is quite limiting.

Coincidentally, this is one hidden motivation behind 'events for
parameters' I havn't yet mentioned: if you multiplex all the controls to
a single event buffer[1], you get dynamic parameters for free, in what
seems to be a dramatically simpler way than trying to erect a bunch of
API specifically for it.

It's probably worth mentioning that Ingen-as-an-LV2 can be *entirely*
controlled via the plugin's event input port using the above mentioned
atom messages. The patcher UI works through this mechanism, i.e. there
is no sneaky business happening outside the plugin API to make that
work. Precisely the same protocol, but in a text serialisation instead
of binary (as in the LV2 port) is used when you run Ingen and its UI as
separate processes over the network (it looks suspiciously like
fragments of the save files...)

Generic POD events are an extremely good thing, because it lets crazy
people like me do things like this :)

-dr

[1] e.g. struct ControlChange {
int param_num; /* Allows MUX */
int time;
float value;
int next_time;
float next_value;
}; /* or whatever... */

_______________________________________________
Linux-audio-dev mailing list
Linux-audio-dev@lists.linuxaudio.org
http://lists.linuxaudio.org/listinfo/linux-audio-dev

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[LAD] Should LV2 Activate() clear MIDI CC parameters?, Jeremy Salwen, (Fri May 25, 7:22 am)
Re: [LAD] Should LV2 Activate() clear MIDI CC parameters?, Stefano D'Angelo, (Mon May 28, 3:42 pm)
Re: [LAD] Should LV2 Activate() clear MIDI CC parameters?, David Robillard, (Mon May 28, 5:27 pm)
Re: [LAD] Should LV2 Activate() clear MIDI CC parameters?, Albert Graef, (Mon May 28, 11:43 pm)
Re: [LAD] Should LV2 Activate() clear MIDI CC parameters?, David Robillard, (Tue May 29, 2:49 am)
Re: [LAD] Should LV2 Activate() clear MIDI CC parameters?, Fons Adriaensen, (Tue May 29, 9:51 pm)
Re: [LAD] Should LV2 Activate() clear MIDI CC parameters?, David Robillard, (Wed May 30, 1:01 am)
Re: [LAD] , rncbc, (Tue May 29, 2:41 pm)
Re: [LAD] Should LV2 Activate() clear MIDI CC parameters?, David Robillard, (Tue May 29, 10:16 pm)
Re: [LAD] Should LV2 Activate() clear MIDI CC parameters?, Fons Adriaensen, (Tue May 29, 4:18 pm)
Re: [LAD] Should LV2 Activate() clear MIDI CC parameters?, David Robillard, (Tue May 29, 11:25 pm)
Re: [LAD] Should LV2 Activate() clear MIDI CC parameters?, David Robillard, (Wed May 30, 5:24 pm)