<p dir="ltr">>>That's why I prefix UI URIs with numbers</p>
<p dir="ltr">Oh, alphabetical. So obvious in hindsight...I should read more code. Thanks for pointing that out!<br>
</p>
<div class="gmail_quote">On Jun 5, 2016 5:49 AM, "Hanspeter Portner" <<a href="mailto:ventosus@airpost.net">ventosus@airpost.net</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On 04.06.2016 04:22, Stefan Riha wrote:<br>
> I should have added that the ui:UI with the additions you suggested works well with jalv -s, but only if I remove the<br>
> kx:Window option from the *ttl, so that jalv doesn't see it at all.<br>
<br>
jalv (and many other hosts) just take the first supported UI.<br>
'jalv -s' is kind of broken by that it'll take the first UI it finds no matter whether it is a ui:showInterface or not.<br>
<br>
The first here usually means 'first in alphabetical order'.<br>
<br>
<<a href="http://example.org/yassy#kx" rel="noreferrer" target="_blank">http://example.org/yassy#kx</a>> thus comes before <<a href="http://example.org/yassy#ui" rel="noreferrer" target="_blank">http://example.org/yassy#ui</a>>.<br>
That's why I prefix UI URIs with numbers :-)<br>
<br>
><br>
><br>
> On Sat, Jun 4, 2016 at 12:16 PM, Stefan Riha <<a href="mailto:hoitaus@gmail.com">hoitaus@gmail.com</a> <mailto:<a href="mailto:hoitaus@gmail.com">hoitaus@gmail.com</a>>> wrote:<br>
><br>
>     Yes, that helped, it works much better now. I tried your "customui.lv2" and it works flawlessly.<br>
><br>
>     I structured the *ttl's of my project like yours, and using kx in Ardour works. But I still get an error with jalv<br>
>     (with -s). It always wants to use the kx:Widget, even though kx is listed as a required feature. Maybe a typo, I'll<br>
>     figure it out next week.<br>
><br>
>     The ttl's I use are:<br>
><br>
>     <a href="https://github.com/poidl/yassy/blob/master/yassy.lv2/manifest.ttl" rel="noreferrer" target="_blank">https://github.com/poidl/yassy/blob/master/yassy.lv2/manifest.ttl</a><br>
>     <a href="https://github.com/poidl/yassy/blob/master/yassy.lv2/yassy.ttl" rel="noreferrer" target="_blank">https://github.com/poidl/yassy/blob/master/yassy.lv2/yassy.ttl</a><br>
>     <a href="https://github.com/poidl/yassyui/blob/master/yassyui.lv2/yassyui.ttl" rel="noreferrer" target="_blank">https://github.com/poidl/yassyui/blob/master/yassyui.lv2/yassyui.ttl</a><br>
><br>
>     I used to have the ui in a separate bundle (that's why the projects are different), but I install the<br>
><br>
>     libyassy.so<br>
>     libyassyui.so<br>
>     manifest.ttl<br>
>     yassy.ttl<br>
>     yassyui.ttl<br>
><br>
>     files now all to the same .lv2/yassy.lv2 have the exact same *ttl structure as customui.lv2.<br>
><br>
>     On Sat, May 28, 2016 at 7:26 PM, Stefan Riha <<a href="mailto:hoitaus@gmail.com">hoitaus@gmail.com</a> <mailto:<a href="mailto:hoitaus@gmail.com">hoitaus@gmail.com</a>>> wrote:<br>
><br>
>         Thanks, that's a lot of valuable information. Much appreciated.<br>
><br>
>         Yes makes sense, the x11 quirk is not good.<br>
><br>
>         Can't wait to try it next week.<br>
><br>
>         On May 28, 2016 19:10, "Hanspeter Portner" <<a href="mailto:ventosus@airpost.net">ventosus@airpost.net</a> <mailto:<a href="mailto:ventosus@airpost.net">ventosus@airpost.net</a>>> wrote:<br>
><br>
>             On 28.05.2016 01:27, Stefan Riha wrote:<br>
>             > I had time now to try it. I'm not sure if I understood this correctly, but ui:idleInterface and<br>
>             ui:showInterface don't<br>
>             > seem to solve my problem. Jalv and Ardour don't even call extension_data(). They break before that, due to<br>
>             the invalid<br>
>             > widget pointer they get from calling instantiate().<br>
><br>
>             Ah, I forgot to tell that not all hosts support ui:showInterface, yet. e.g. Ardour does not.<br>
>             And jalv needs to be called with a special (undocumented) flag (-s), to run in the proper state.<br>
><br>
>             Although ui:showInterface is the 'official' extension to do custom UIs, some hosts only support its deprecated<br>
>             predecessor extension 'external-ui' [1].<br>
><br>
>             'external-ui' and ui:showInterface/ui:idleInterface are pretty similar and you can actually wrap one into the<br>
>             other to support both within the same code [2].<br>
><br>
>             [1] <a href="http://kxstudio.linuxaudio.org/ns/lv2ext/external-ui" rel="noreferrer" target="_blank">http://kxstudio.linuxaudio.org/ns/lv2ext/external-ui</a><br>
>             [2] <a href="https://github.com/ventosus/customui.lv2" rel="noreferrer" target="_blank">https://github.com/ventosus/customui.lv2</a><br>
><br>
>             Have a look at [2], it should get you going, it runs fine in jalv(1.4.6), Ardour(4.7), Qtractor (0.7.5)<br>
><br>
>             Run your host from the console to see whether it works for you (the UI prints some debug strings to stdout)<br>
><br>
>             e.g.<br>
>             $ jalv -s <a href="http://open-music-kontrollers.ch/lv2/customui#test" rel="noreferrer" target="_blank">http://open-music-kontrollers.ch/lv2/customui#test</a><br>
><br>
>             > However, I noticed that if I declare the widget-less UI as a ui:X11UI in the .ttl, then it works! Jalv,<br>
>             Ardour and<br>
>             > Qtractor open an empty window, call extension_data() with ui:idleInterface. I actually think that's all I<br>
>             need. Probably<br>
>             > has something to do with the pointer type for X11 windows (see <a href="http://lv2plug.in/ns/extensions/ui/#X11UI" rel="noreferrer" target="_blank">http://lv2plug.in/ns/extensions/ui/#X11UI</a> )<br>
><br>
>             No, that's not what you need. ui:idleInterface can be used apart from ui:showInterface. It's readily used with<br>
>             ui:X11UI to drive animations, screen updates, etc. as X11 has no main loop as e.g. Gtk and Qt.<br>
><br>
>             If your plugin does not create an XWindow, don't declare it as ui:X11UI, if your plugin does not create a<br>
>             GtkWidget,<br>
>             don't declare it as ui:GtkUI, ...<br>
><br>
>             You're just being lucky here. Hosts expect an ui:X11UI to return an XWindow ID. The latter is just a plain<br>
>             Integer.<br>
>             Whathever you return as a widget XWindow ID (or whathever resided in memory at that time) may just happen to<br>
>             already exist in your Xwindow environment. Some hosts may not even check the retured value for validity, either.<br>
><br>
>             > On Sat, May 21, 2016 at 5:08 PM, Hanspeter Portner <<a href="mailto:ventosus@airpost.net">ventosus@airpost.net</a> <mailto:<a href="mailto:ventosus@airpost.net">ventosus@airpost.net</a>><br>
>             <mailto:<a href="mailto:ventosus@airpost.net">ventosus@airpost.net</a> <mailto:<a href="mailto:ventosus@airpost.net">ventosus@airpost.net</a>>>> wrote:<br>
>             ><br>
>             >     On 21.05.2016 06:23, Stefan Riha wrote:<br>
>             >     > Hi, I'm a beginner and experimenting with lv2.<br>
>             ><br>
>             >     Great<br>
>             ><br>
>             >     > I wrote a simply synth and want a UI without Widget. On the lv2 page it says<br>
>             >     ><br>
>             >     >  "There is no requirement that a UI actually be a graphical widget."<br>
>             >     >  (from: <a href="http://lv2plug.in/ns/extensions/ui/" rel="noreferrer" target="_blank">http://lv2plug.in/ns/extensions/ui/</a> ).<br>
>             ><br>
>             >     True, an UI can theoretically be anything.<br>
>             ><br>
>             >     Can you give some more information on what you want to accomplish? You may well not need an UI in the<br>
>             first place (but<br>
>             >     don't know yet, as you are a beginner).<br>
>             ><br>
>             >     > Below that, there is a list of subclasses of UI, but all are for widgets. So I thought I'd try ui:UI<br>
>             directly instead of<br>
>             >     > ui:GtkUI etc. But neither jalv nor Ardour recognises that there is a UI.<br>
>             ><br>
>             >     ui:UI is the parent class which the Widget UIs (ui:GtkUI, ui:Gtk3UI, ui:QtUI, ...) derive from. It is<br>
>             en empty shell<br>
>             >     really, hosts cannot possibly know what is inside, you have to give the host some more information.<br>
>             ><br>
>             >     > So I used ui:GtkUI instead. In jalv, this yields error messages of type Gtk-CRITICAL. Obviously it's<br>
>             because there is no<br>
>             >     > actual widget. In Ardour, I can see that the UI is instantiated() and immediately cleanedup(),<br>
>             probably because the Gtk<br>
>             >     > errors are handled that way.<br>
>             ><br>
>             >     If you define the UI as an ui:GtkUI, but do not return a valid GtkWidget to the host, sure this raises<br>
>             an error.<br>
>             ><br>
>             >     > How do you do this?<br>
>             >     ><br>
>             >     > I looked for hours for some example code but couldn't find one. I stumbled across Ingen which has<br>
>             some form of<br>
>             >     > web-interface (if I understood correctly) and tried to read the .ttl files, but don't understand them.<br>
>             ><br>
>             >     You may be looking for ui:showInterface [1] and ui:idleInterface [2], with those you can build arbitrary<br>
>             >     UIs.<br>
>             ><br>
>             >     Here [3] you can find a dummy plugin I use for testing various UIs in my humble host.<br>
>             >     <test_show.c> implements an as-simple-as-it-gets no-widget UI.<br>
>             ><br>
>             >     [1] <a href="http://lv2plug.in/ns/extensions/ui/#showInterface" rel="noreferrer" target="_blank">http://lv2plug.in/ns/extensions/ui/#showInterface</a><br>
>             >     [2] <a href="http://lv2plug.in/ns/extensions/ui/#idleInterface" rel="noreferrer" target="_blank">http://lv2plug.in/ns/extensions/ui/#idleInterface</a><br>
>             >     [3] <a href="https://github.com/ventosus/alluis.lv2" rel="noreferrer" target="_blank">https://github.com/ventosus/alluis.lv2</a><br>
>             ><br>
>             >     > Thanks a lot for your help,<br>
>             >     > Stefan<br>
><br>
><br>
><br>
<br>
</blockquote></div>