Yep, 2 midi keyboards. I could reproduce that.
I need to implement a protection against that. . . .
Running LV2 plugins in Carla on Windows11?
Moderators: MattKingUSA, khz
- 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?
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.
-
- 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?
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.
- 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?
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?
-
- 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?
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.
- 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?
With that setting the problem of the hanging notes is almost (but not completely) gone.
-
- 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?
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.
- 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?
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.
- 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?
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.
-
- 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?
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)
- 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?
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.
- Start with a GUI-less dsp-file synthname.dsp . No hyphen ( - ) in synthname is allowed!
- 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]"; - 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. - Save synthname with the added GUI as a Full Plugin-Bundle.
- For reworking the GUI only : Load the file synthname.json from the folder synthname_ui
into XUiDesigner. - For reworking the GUI only : Rework the GUI.
- 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 . - Navigate to the top directory synthname_ui (for example: ~/Desktop/synthname_ui) in the
Command Line and do: ./libxputty/build.sh windows - 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...
-
- 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?
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
- 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?
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.