[LAD] LV2-C++-Tools

Aurélien Leblond blablack at gmail.com
Sat Mar 24 20:58:13 UTC 2012


>> Although it involves the mouse, what I'm trying to achieve is not
>> exactly UI related.
>> The plugin I have has two output called X and Y.
>>
>> When the mouse is at the bottom left corner of the screen, X and Y are
>> equal to 0.
>> When it's at the top right corner, X and Y are equal to 1.
>>
>> The design I had in mind was to have a thread on the side that would
>> query the mouse position every 25ms, especially to avoid having it in
>> the method processing the sound itself (this create a lot of XRuns
>> when I do that).
>
> You seem to have some ideas about UIs and plugins that are severely
> divorced from reality, at least for LV2 (but any working audio program,
> really).  I will not mince words here because I think the point isn't
> getting across very well:
>
> The UI and plugin are COMPLETELY separate and communicate via ports.
> They shouldn't be in the same library, and they might not be in the same
> process, or even on the same machine.  If anything you do in your UI
> could possibly cause XRuns something is VERY DEEPLY WRONG.  I hope it is
> obvious that the UI and the DSP do not run in the same thread.  Saying
> things like you want a thread to poll X cursor position to avoid doing
> it in the sound processing function is a five-alarm siren and red
> flashing WARNING sign that something is WAY off here.  Of course you
> can't do X things in the audio thread!!! Holy crap!

Ha! How can I be so stupid!
Ok, I get it now (well I hope anyway).

Create a fairly simply GUI that queries the mouse position, and get
the GUI to feed that into two control inputs of the plugin itself.
The plugin would simply take the value of those 2 control input, and
feed that into two audio outputs (or VC outputs, for that matter)...
And obviously, the two would be conpletely separated, the way it
already is for other plugin: audio processing on one side, GUI on the
other....

If I'm not wrong, that should dissociate GUI/plugin. In fact it
wouldn't be that different than how a usual plugin works now, but
instead of being let say a combo box changing the controls value of
the plugin, it's simply the position of the mouse cursor.

(by the way you are completely right, I'm learning audio dev as I go
in this project! that does explain my confusions sometimes...)

Aurélien



More information about the Linux-audio-dev mailing list