XUiDesigner v0.5 released

Discuss anything new and newsworthy! See http://planet.linuxaudio.org and https://libreav.org/news for more Linux Audio News!

Announcements of proprietary software may fit better in the Marketplace.


Moderators: raboof, MattKingUSA, khz

User avatar
LinMusGuy
Established Member
Posts: 551
Joined: Wed Feb 27, 2019 9:33 pm
Has thanked: 22 times
Been thanked: 2 times

Re: XUiDesigner v0.5 released

Post by LinMusGuy »

This is the Faust dsp program I worked with:

Code: Select all

declare name "Funny Loop";

import("maths.lib");
import("filters.lib");

var    = 10^7*(hslider("variation", 0.20, 0.05, 0.25, 0.001))^4;
vol    = 0.1*(hslider("volume", 0.5, 0, 1, 0.0001))^2;
start  = 0.01*button("start");
pol     = 1 - ( 2 - hslider("sway", 0.25, 0.01, 0.5, 0.0001) )*button("restart");

A = _ , start :> _*-1 : _ ;
B = _ : _*var : atan : pole(pol) : _*var : atan : pole(pol) : _*var : _ ;
C = A~B ;
process = C : atan : _*vol <: _,_ ;
That program I transformed into a lv2 plugin by means of:

Code: Select all

faust2lv2 -nvoices 8 path/to/synthname.dsp
The resulting lv2 plugin I put in the .lv2 map. And when I open the lv2 plugin in XUiDesigner it looks like this:
screenshot.png
screenshot.png (69.43 KiB) Viewed 1101 times
tramp
Established Member
Posts: 2335
Joined: Mon Jul 01, 2013 8:13 am
Has thanked: 9 times
Been thanked: 454 times

Re: XUiDesigner v0.5 released

Post by tramp »

LinMusGuy wrote: Sun Sep 11, 2022 1:54 pm The resulting lv2 plugin I put in the .lv2 map. And when I open the lv2 plugin in XUiDesigner it looks like this:
Yep, bug squashed and fixed now. :)
Should work after update.
On the road again.
User avatar
LinMusGuy
Established Member
Posts: 551
Joined: Wed Feb 27, 2019 9:33 pm
Has thanked: 22 times
Been thanked: 2 times

Re: XUiDesigner v0.5 released

Post by LinMusGuy »

intermediate.png
intermediate.png (39.65 KiB) Viewed 1085 times
How do I open this intermediate GUI?
tramp
Established Member
Posts: 2335
Joined: Mon Jul 01, 2013 8:13 am
Has thanked: 9 times
Been thanked: 454 times

Re: XUiDesigner v0.5 released

Post by tramp »

Just drag 'n drop it into the XUiDesigner, like you do with faust dsp files.
On the road again.
User avatar
LinMusGuy
Established Member
Posts: 551
Joined: Wed Feb 27, 2019 9:33 pm
Has thanked: 22 times
Been thanked: 2 times

Re: XUiDesigner v0.5 released

Post by LinMusGuy »

Drag and drop of just the json-file gives:
recover.png
recover.png (146.41 KiB) Viewed 1079 times
That's almost correct, but the buttons have doubled.
tramp
Established Member
Posts: 2335
Joined: Mon Jul 01, 2013 8:13 am
Has thanked: 9 times
Been thanked: 454 times

Re: XUiDesigner v0.5 released

Post by tramp »

LinMusGuy wrote: Sun Sep 11, 2022 3:31 pm That's almost correct, but the buttons have doubled.
I've pushed a quick fix for it (issue in the json reader), should load your old saves now correctly. (I hope, let me know please if I need to investigate further)
On the road again.
User avatar
LinMusGuy
Established Member
Posts: 551
Joined: Wed Feb 27, 2019 9:33 pm
Has thanked: 22 times
Been thanked: 2 times

Re: XUiDesigner v0.5 released

Post by LinMusGuy »

The buttons are OK now, but the background image for the GUI was only partly used. The latter problem disappeared after changing the width of the GUI.
User avatar
LinMusGuy
Established Member
Posts: 551
Joined: Wed Feb 27, 2019 9:33 pm
Has thanked: 22 times
Been thanked: 2 times

Re: XUiDesigner v0.5 released

Post by LinMusGuy »

Doing "make" for FunnyLoops1_ui in the Command Line ends in errors:

Code: Select all

FunnyLoop1.c: In function ‘plugin_create_controller_widgets’:
FunnyLoop1.c:93:42: error: ‘bg_png’ undeclared (first use in this function)
   93 |     widget_get_scaled_png(ui->win, LDVAR(bg_png));
      |                                          ^~~~~~
../libxputty/libxputty/include/xpngloader.h:85:28: note: in definition of macro ‘LDVAR’
   85 |     (const unsigned char*)&NAME
      |                            ^~~~
FunnyLoop1.c:93:42: note: each undeclared identifier is reported only once for each function it appears in
   93 |     widget_get_scaled_png(ui->win, LDVAR(bg_png));
      |                                          ^~~~~~
../libxputty/libxputty/include/xpngloader.h:85:28: note: in definition of macro ‘LDVAR’
   85 |     (const unsigned char*)&NAME
      |                            ^~~~
FunnyLoop1.c:95:46: error: ‘big_button_c__png’ undeclared (first use in this function)
   95 |     widget_get_scaled_png(ui->elem[0], LDVAR(big_button_c__png));
      |                                              ^~~~~~~~~~~~~~~~~
../libxputty/libxputty/include/xpngloader.h:85:28: note: in definition of macro ‘LDVAR’
   85 |     (const unsigned char*)&NAME
      |                            ^~~~
FunnyLoop1.c:97:46: error: ‘knb_donc_l_png’ undeclared (first use in this function)
   97 |     widget_get_scaled_png(ui->elem[1], LDVAR(knb_donc_l_png));
      |                                              ^~~~~~~~~~~~~~
../libxputty/libxputty/include/xpngloader.h:85:28: note: in definition of macro ‘LDVAR’
   85 |     (const unsigned char*)&NAME
      |                            ^~~~
FunnyLoop1.c:105:41: error: ‘color_knob_png’ undeclared (first use in this function); did you mean ‘colors_png’?
  105 |     widget_get_png(ui->widget[2], LDVAR(color_knob_png));
      |                                         ^~~~~~~~~~~~~~
../libxputty/libxputty/include/xpngloader.h:85:28: note: in definition of macro ‘LDVAR’
   85 |     (const unsigned char*)&NAME
      |                            ^~~~
make[1]: *** [makefile:103: FunnyLoop1] Error 1
make[1]: Leaving directory '/home/nameless/Desktop/FunnyLoop1_ui/FunnyLoop1'
make: *** [makefile:13: FunnyLoop1] Error 2
tramp
Established Member
Posts: 2335
Joined: Mon Jul 01, 2013 8:13 am
Has thanked: 9 times
Been thanked: 454 times

Re: XUiDesigner v0.5 released

Post by tramp »

LinMusGuy wrote: Sun Sep 11, 2022 6:12 pm Doing "make" for FunnyLoops1_ui in the Command Line ends in errors:
Yep, there was multiple bugs in the json reader regarding image handling. I've fixed all I found now.
It should work now after a update, just your FunnyLoops1_ui is now completely broken, you must regenerate it first before loading the json file from it.
On the road again.
User avatar
LinMusGuy
Established Member
Posts: 551
Joined: Wed Feb 27, 2019 9:33 pm
Has thanked: 22 times
Been thanked: 2 times

Re: XUiDesigner v0.5 released

Post by LinMusGuy »

What I do:

- Put the lv2 plugin in the .lv2 map.
- Open the plugin in XUiDesigner.
- Make a UI for the plugin in XUiDesigner.
- Save the UI as "UI only" on the Desktop.
- Close XUiDesigner.
- Open XUiDesigner.
- Drag and drop the json-file from the UI only map in XUiDesigner.
- Make some last changes to the UI.
- Remove "UI only" from the Desktop.
- Save UI as UI-Bundle to the Desktop.
- Do "make" from the top directory of the saved UI-Bundle.

And this last step ends in errors:

Code: Select all

FunnyLoop1.c: In function ‘plugin_create_controller_widgets’:
FunnyLoop1.c:93:42: error: ‘bg_png’ undeclared (first use in this function)
   93 |     widget_get_scaled_png(ui->win, LDVAR(bg_png));
      |                                          ^~~~~~
../libxputty/libxputty/include/xpngloader.h:85:28: note: in definition of macro ‘LDVAR’
   85 |     (const unsigned char*)&NAME
      |                            ^~~~
FunnyLoop1.c:93:42: note: each undeclared identifier is reported only once for each function it appears in
   93 |     widget_get_scaled_png(ui->win, LDVAR(bg_png));
      |                                          ^~~~~~
../libxputty/libxputty/include/xpngloader.h:85:28: note: in definition of macro ‘LDVAR’
   85 |     (const unsigned char*)&NAME
      |                            ^~~~
FunnyLoop1.c:95:41: error: ‘big_button_c__png’ undeclared (first use in this function)
   95 |     widget_get_png(ui->widget[0], LDVAR(big_button_c__png));
      |                                         ^~~~~~~~~~~~~~~~~
../libxputty/libxputty/include/xpngloader.h:85:28: note: in definition of macro ‘LDVAR’
   85 |     (const unsigned char*)&NAME
      |                            ^~~~
FunnyLoop1.c:101:41: error: ‘color_knob_png’ undeclared (first use in this function); did you mean ‘colors_png’?
  101 |     widget_get_png(ui->widget[2], LDVAR(color_knob_png));
      |                                         ^~~~~~~~~~~~~~
../libxputty/libxputty/include/xpngloader.h:85:28: note: in definition of macro ‘LDVAR’
   85 |     (const unsigned char*)&NAME
      |                            ^~~~
FunnyLoop1.c:109:41: error: ‘knb_donc_l_png’ undeclared (first use in this function)
  109 |     widget_get_png(ui->widget[4], LDVAR(knb_donc_l_png));
      |                                         ^~~~~~~~~~~~~~
../libxputty/libxputty/include/xpngloader.h:85:28: note: in definition of macro ‘LDVAR’
   85 |     (const unsigned char*)&NAME
      |                            ^~~~
make[1]: *** [makefile:103: FunnyLoop1] Error 1
make[1]: Leaving directory '/home/nameless/Desktop/FunnyLoop1_ui/FunnyLoop1'
make: *** [makefile:13: FunnyLoop1] Error 2
tramp
Established Member
Posts: 2335
Joined: Mon Jul 01, 2013 8:13 am
Has thanked: 9 times
Been thanked: 454 times

Re: XUiDesigner v0.5 released

Post by tramp »

The steps should be:
- Put the lv2 plugin in the .lv2 map.
- Open the plugin in XUiDesigner.
- Make a UI for the plugin in XUiDesigner.
- Save the UI as "UI only" on the Desktop. --> Save as "UI-Bunlde" (should be the preselected choice)
- Close XUiDesigner.
- Open XUiDesigner.
- Drag and drop the json-file from the UI only map in XUiDesigner.
- Make some last changes to the UI.
- Save UI as UI-Bundle to the Desktop. --> Save as "UI only" here (should be the preselected choice)
- Do "make" from the top directory of the saved UI-Bundle.

But first you must update to the latest version, as there was a bug in the json reader which remove all images from the generated bundle when save changes after loading the json file.
And that is what the error massages been about. I guess when you look into the /resource directory of your ui-map, it is empty, but there must be the images the UI use.
On the road again.
User avatar
LinMusGuy
Established Member
Posts: 551
Joined: Wed Feb 27, 2019 9:33 pm
Has thanked: 22 times
Been thanked: 2 times

Re: XUiDesigner v0.5 released

Post by LinMusGuy »

Yes it's working now!! :D

Only one minor bug remains: the background image for the GUI is only partly used. However after (minimally) changing the width of the GUI the complete background image jumps in place.
User avatar
LinMusGuy
Established Member
Posts: 551
Joined: Wed Feb 27, 2019 9:33 pm
Has thanked: 22 times
Been thanked: 2 times

Re: XUiDesigner v0.5 released

Post by LinMusGuy »

fl1.png
fl1.png (89.7 KiB) Viewed 995 times
A nice working GUI for a LV2 plugin! Made with XUiDesigner. :D
tramp
Established Member
Posts: 2335
Joined: Mon Jul 01, 2013 8:13 am
Has thanked: 9 times
Been thanked: 454 times

Re: XUiDesigner v0.5 released

Post by tramp »

LinMusGuy wrote: Mon Sep 12, 2022 7:20 am Only one minor bug remains: the background image for the GUI is only partly used. However after (minimally) changing the width of the GUI the complete background image jumps in place.
Thanks for reporting. Fixed now. :)
LinMusGuy wrote: Mon Sep 12, 2022 7:55 am
fl1.png
A nice working GUI for a LV2 plugin! Made with XUiDesigner. :D
Nice. So I guess we reach feature completeness. Let's the fun begin. :D
On the road again.
User avatar
LinMusGuy
Established Member
Posts: 551
Joined: Wed Feb 27, 2019 9:33 pm
Has thanked: 22 times
Been thanked: 2 times

Re: XUiDesigner v0.5 released

Post by LinMusGuy »

Do you happen to know whether there exists a free online LV2-host (maybe as part of another online program) that also works for Windows users?
Post Reply