Open swesterfeld opened 6 months ago
I cannot reproduce this with e.g. Surge via the CLAP interface. Are all the properties changing all the time, or why would they be re-rendered?
I cannot reproduce this with e.g. Surge via the CLAP interface.
I cannot reproduce with CLAP Surge XT either. I now think this is related to the length of the property labels I use. For LV2 I am currently using the full label provided by LV2, which could be something like "LFO1 Wave Width" in case of padthv1. It seems that layout for these is more complicated? If I replace the label with just the property number (like "42") the issue goes away. So maybe I need to shorten the labels like clap does.
Are all the properties changing all the time, or why would they be re-rendered?
No just the song time is changing (play needs to be on to see the effect). For some reason a changed song time retriggers a relayout that also seems to relayout the properties, even though they remain constant.
If I replace the label with just the property number (like "42") the issue goes away. So maybe I need to shorten the labels like clap does.
For this purpose, we have parameter_guess_nick(), if you just register the properties with nick="", parameter_guess_nick() will be used automatically.
I can reproduce the slowish layout with CLAP and Surge XT if I make the following change:
diff --git a/ase/clapdevice.cc b/ase/clapdevice.cc
index 73eff31..faf0f41 100644
--- a/ase/clapdevice.cc
+++ b/ase/clapdevice.cc
@@ -29,7 +29,7 @@ struct ClapPropertyImpl : public Property, public virtual EmittableImpl {
public:
String ident () override { return ident_; }
String label () override { return label_; }
- String nick () override { return parameter_guess_nick (label_); }
+ String nick () override { return label_; }
String unit () override { return ""; }
String hints () override { return ClapParamInfo::hints_from_param_info_flags (flags); }
String group () override { return module_; }
I tested (on Ubuntu 22.04)
For some reason Firefox (121.0.1 (64-Bit) - Ubuntu snap) refused to display the Anklang UI completely, just displaying "ANKLANG: Importing Modules..." and nothing more.
While working on LV2 support, I've observed that playing a song with devices that have lots of properties (like 100 or more) make the UI unresponsive during playback if the knobs are visible during playpack. I've used the Chrome profiler to find out why. It seems that Chrome has to update its layout all the time, so the large number of properties slow down the layout process. It can be avoided by disabling telemetry on the position view like this:
so it seems that we need something better than we have now for implementing the mapping from telemetry to position view without triggering a relayout.