Running LV2 plugins in Carla on Windows11?

All your LV2 and LADSPA goodness and more.

Moderators: MattKingUSA, khz

tramp
Established Member
Posts: 2348
Joined: Mon Jul 01, 2013 8:13 am
Has thanked: 9 times
Been thanked: 468 times

Re: Running LV2 plugins in Carla on Windows11?

Post by tramp »

Yep, 2 midi keyboards. I could reproduce that.
I need to implement a protection against that. . . .

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: Running LV2 plugins in Carla on Windows11?

Post by LinMusGuy »

Another thing: I'm using this knob: knob_66_black4[10frames] for Polyphony while there are only 8 possible choices, could that be a problem.

tramp
Established Member
Posts: 2348
Joined: Mon Jul 01, 2013 8:13 am
Has thanked: 9 times
Been thanked: 468 times

Re: Running LV2 plugins in Carla on Windows11?

Post by tramp »

LinMusGuy wrote: Sat Jan 06, 2024 11:44 am

Another thing: I'm using this knob: knob_66_black4[10frames] for Polyphony while there are only 8 possible choices, could that be a problem.

No, that should work fine.

So I've implemented a protection against 2 MIDI keyboards now. When you try to add a second one a message will pop up to inform you that this is not allowed.

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: Running LV2 plugins in Carla on Windows11?

Post by LinMusGuy »

The problem with hanging notes in Reaper on my Windows laptop is still there. Maybe the problem is with my laptop...? Do you know some test to rule out the latter possibility? Or maybe some other members here with a Windows computer could try if the same thing with the hanging notes happens in Reaper on their Windows computer also?

tramp
Established Member
Posts: 2348
Joined: Mon Jul 01, 2013 8:13 am
Has thanked: 9 times
Been thanked: 468 times

Re: Running LV2 plugins in Carla on Windows11?

Post by tramp »

You could try with reduced latency, means setting the asio frame rate to 128.
You could also try the internal midi keyboard from reaper to check if the same happen with that one.

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: Running LV2 plugins in Carla on Windows11?

Post by LinMusGuy »

tramp wrote: Sat Jan 06, 2024 1:09 pm

You could try with reduced latency, means setting the asio frame rate to 128.

With that setting the problem of the hanging notes is almost (but not completely) gone.

tramp
Established Member
Posts: 2348
Joined: Mon Jul 01, 2013 8:13 am
Has thanked: 9 times
Been thanked: 468 times

Re: Running LV2 plugins in Carla on Windows11?

Post by tramp »

LinMusGuy wrote: Sat Jan 06, 2024 1:54 pm

With that setting the problem of the hanging notes is almost (but not completely) gone.

The issue may then be related to the implementation of the gate parameter in faust. In faust it is frame based, but it should be sample based to be accurate.
I've a look at the implementation and found one thing which may cause a issue like this. It's in

Code: Select all

int dealloc_voice(uint8_t ch, int8_t note, int8_t vel)

look for it in the plugname.cpp file.
There is a special case handling for zero-length note, they get queued.
In special, when the gate parameter is frame based this seems wrong to me. As, exactly when you play very fast, and the note on/offset is in the same frame, you got a zero length note. The onset is handling as usual but the offset is queued.
I would comment out the block doing that so that note off get handled even for zero length notes.
It's this block (line 1792)

Code: Select all

       if (vd->lastgate[i] == 0.0f && gate >= 0) {
	// zero-length note, queued for later
	vd->queued.insert(i);
	vd->notes[ch][note] = -1;
#if DEBUG_VOICE_ALLOC
	print_voices("dealloc (queued)");
#endif
	return i;
      }

change it to become

Code: Select all

      if (vd->lastgate[i] == 0.0f && gate >= 0) {
	// zero-length note, queued for later
	//vd->queued.insert(i);
	//vd->notes[ch][note] = -1;
#if DEBUG_VOICE_ALLOC
	print_voices("dealloc (queued)");
#endif
	//return i;
      }

to switch of special zero length handling.
Still, didn't know if that is the root of the issue, I just tested that and it didn't hurts. Maybe worse a try.

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: Running LV2 plugins in Carla on Windows11?

Post by LinMusGuy »

The hanging note problem seems rather worse than before now...

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

Re: Running LV2 plugins in Carla on Windows11?

Post by LinMusGuy »

In Carla on Windows there are hanging notes when using the keyboard on the LV2 GUI but not when using the keyboard of Carla itself that's below the Patchbay.

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

Re: Running LV2 plugins in Carla on Windows11?

Post by LinMusGuy »

A somewhat brutal solution would be the following: let the keyboard on the GUI only accept actually clicking on a key as a way to press the key, while ignoring attempts to press a key by horizontally moving over it. With the mouse one can only click on keys one after the other, so in that way generating hanging notes by horizontally moving over the GUI keyboard would be made impossible. I found some VST plugins that actually had this limitation. In this case polyphonic and fast playing (including by moving horizontally over the keyboard) would only be allowed on an external virtual or hardware keyboard, as that seems less problematic as regards to hanging notes.

tramp
Established Member
Posts: 2348
Joined: Mon Jul 01, 2013 8:13 am
Has thanked: 9 times
Been thanked: 468 times

Re: Running LV2 plugins in Carla on Windows11?

Post by tramp »

LinMusGuy wrote: Sun Jan 07, 2024 9:08 am

A somewhat brutal solution would be the following: let the keyboard on the GUI only accept actually clicking on a key as a way to press the key, while ignoring attempts to press a key by horizontally moving over it.

That's indeed brutal.
Maybe it helps to increase the key size so that you can't move so fast any more. You could try that by adding

Code: Select all

keys->key_size = 28;

or 30, 34, . . .
below the line

Code: Select all

MidiKeyboard *keys = (MidiKeyboard*)ui->widget[0]->private_struct;

in plugname.c

the default key_size is 20 (pixel),

I forgot to mention that the space bar is the panic button (All Sounds Off)

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: Running LV2 plugins in Carla on Windows11?

Post by LinMusGuy »

I tried but it doesn't help. Anyhow it's not that important, nobody will actually play the plugin by horizontally moving the mouse over the GUI keyboard. With an external hardware keyboard it works OK because than you cannot do it that fast.

I now have the following protocol for making Windows LV2 plugins from Faust files:

Step by step description of cross compilation with the newer version of XUiDesigner when working
on a Linux computer with Faust and PawPaw installed.

  1. Start with a GUI-less dsp-file synthname.dsp . No hyphen ( - ) in synthname is allowed!
  2. To build a LV2 plug from it you must declare midi:on as option at the beginning of the file.
    declare name "synthname";
    declare options "[midi:on]";
    declare options "[nvoices:8]";
  3. Load synthname.dsp into XUiDesigner and first place a MIDI Keyboard controller (if you
    need one) on the GUI window and then create a GUI.
  4. Save synthname with the added GUI as a Full Plugin-Bundle.
  5. For reworking the GUI only : Load the file synthname.json from the folder synthname_ui
    into XUiDesigner.
  6. For reworking the GUI only : Rework the GUI.
  7. For reworking the GUI only : Save the reworked GUI as ‘UI only’. This replaces the old
    synthname.json in synthname_ui with the new synthname.json .
  8. Navigate to the top directory synthname_ui (for example: ~/Desktop/synthname_ui) in the
    Command Line and do: ./libxputty/build.sh windows
  9. Then you will find the created Windows LV2 plugin synthname.lv2 in the bin folder of
    synthname_ui.
    ---------------------------------------------------------------------------------------------------------------------------------------

What do I have to change to generate a Linux LV2 plugin? Is the only difference in typing "linux" in stead of "windows" in 8.?

PS For some unknown reason one line keeps appearing in big fat letters... :shock:

tramp
Established Member
Posts: 2348
Joined: Mon Jul 01, 2013 8:13 am
Has thanked: 9 times
Been thanked: 468 times

Re: Running LV2 plugins in Carla on Windows11?

Post by tramp »

To build a linux LV2 plug after you've build a windows one you just need to

Code: Select all

make clean && make

the

Code: Select all

./libxputty/build.sh linux

only works when you've made the bootstrap for it like written in the
https://github.com/brummer10/XUiDesigne ... veloper.md

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: Running LV2 plugins in Carla on Windows11?

Post by LinMusGuy »

Thanks for all the info, and for XUiDesigner. :)

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

Re: Running LV2 plugins in Carla on Windows11?

Post by LinMusGuy »

One more question: is it possible to upload additional Faust libraries into XUiDesiger? I tried to import realfaust.lib in my Faust program but than XUiDesigner failed to parse my program while without the line importing realfaust.lib it did parse my program.

Post Reply