Happychords on Github

Programming applications for making music on Linux.

Moderators: MattKingUSA, khz

Post Reply
f00bar
Established Member
Posts: 83
Joined: Sun May 12, 2013 7:40 pm

Happychords on Github

Post by f00bar »

I have uploaded Happychords here: https://github.com/milasudril/happychords. Now, I need to design a UI that is more user friendly, and allows for pattern creation. I plan to run the UI in a separate process, which should be possible in LV2. Since the documentation is sparse need to ask some API related questions.
  1. Howto make the ui visible to the host. I only get errors when trying to modify my manifest (complains about UI file not found, though it has been compiled).
  2. What is the LV2UI_Widget when it is passed to the UI? In VST on Windows, it is a handle to a Window (that is, it can be a child window to some top-level window but that is unsupported by GTK and many other toolkits).
  3. Since I want to use a remote process for the UI, it is neither a Gtk, Qt, or X UI. What kind of UI is an external UI?
f00bar
Established Member
Posts: 83
Joined: Sun May 12, 2013 7:40 pm

Re: Happychords on Github

Post by f00bar »

Ok some progress:

Will use LV2 External UI
Hello Happychords (GUI)
Trying to get window...
Trying to get window...
Trying to get window...
Trying to get window...
Trying to get window...
Trying to get window...
Trying to get window...
Trying to get window...
Trying to get window...
Trying to get window...
Trying to get window...
Trying to get window...
Trying to get window...
Trying to get window...
Trying to get window...
Trying to get window...
Trying to get window...
Trying to get window...
Trying to get window...
ScopedPluginAction(0) - blocking START
ScopedPluginAction(0) - blocking DONE
*** Error in `/usr/bin/python3': free(): invalid pointer: 0x0000000003658ed8 ***
Avbruten (SIGABRT) (minnesutskrift skapad)

Ardour crash when closing to... So how to notify that there is a "Window"?

Client class: https://github.com/milasudril/happychor ... i_client.h
The function returning descriptor: https://github.com/milasudril/happychor ... t_main.cpp
Wrapper class: https://github.com/milasudril/lv2plug/blob/master/ui.h
https://github.com/milasudril/lv2plug/b ... /ui_main.h (including this file will add the exported function)

Is external ui officially deprecated or why is it not on the official lv2 site?
f00bar
Established Member
Posts: 83
Joined: Sun May 12, 2013 7:40 pm

Re: Happychords on Github

Post by f00bar »

falkTX wrote:your "LV2UI_Handle doCreate" function seems wrong.
The widget type should be "LV2UI_Widget** widget", notice the pointer of a pointer.
Right now you're changing a local variable, which does nothing globally.

Try changing "LV2UI_Widget* widget" to "LV2UI_Widget** widget" in that function.
No, the function prototype is what it is but I did return the local variable widget, instead of the value that it points to.
falkTX wrote: This external-ui extension has a very very long story, but it was never accepted because David Robillard (main dev of LV2) did not agree with it.
I think it should follow the same form as the plug-in interface: Instead of letting LV2_External_UI_Widget own the vtable, let the vtable be stored separately. Compare
The former needs subclassing while the latter do not need it. Also, I think the host should not care about what toolkit the UI uses since Linux has no native toolkit (the most native would be plain X, which will be replaced by Wayland or Mir) or what happens if I right away call a GTK function from a Qt application or vice versa? I guess this is not trivial. Fork+exec and IPC on the other hand is robust and the host can survive even if the UI crashes.
Post Reply