Open atsushieno opened 9 months ago
I think the problem is that the scale points in the generated .ttl should not be normalised, i.e. the default/minimum/maximum and scalepoint values for the parameter should all be in the same domain.
I agree to the idea that the scalepoints should be in the domain (no idea what is the source of those values), but since the .ttl content conforms to the LV2 specification the enum label texts should be correctly listed anyways.
Detailed steps on how to reproduce the bug
JUCE AudioPluginHost shows wrong labels for an enumeration parameter on LV2 plugins.
For example, I use my own (modified) version of ADLplug FM synth emulator JUCE plugin, and try to choose chip type. There are 6 values like "MAME YM2612", "Nuked OPN2", "GENS 2.10 OPN2", ... but after the first item, AudioPluginHost shows the label for the last enumerated item repeatedly, like:
(The choice of the plugin is not important; any enumeration parameter results in the same.)
LV2 TTL for this particular case is defined as:
Code wise, when hosting an LV2 plugin,
juce::lv2_host::LV2Parameter
is instantiated when some parameter information is needed, andgetText()
is invoked when enum label text is needed:This code seems to result in wrong
index
fordenormalised
value (which seems to correctly represent an index forscalePoints
, andscalePoints
contents seem correct as well, as long as I observed on my debugger).midPoints
are ranged between 0 <= x <= 1.0, whiledenormalised
is an integer index toscalePoints
, so there is a mismatch on the value range.What is the expected behaviour?
The enum label (
getText()
return value) should be the corresponding text to the value for each float value (scale point).Operating systems
macOS
What versions of the operating systems?
macOS Ventura 13.5.2.
Architectures
ARM, 64-bit
Stacktrace
No response
Plug-in formats (if applicable)
LV2
Plug-in host applications (DAWs) (if applicable)
JUCE AudioPluginHost
Testing on the
develop
branchThe bug is present on the
develop
branchCode of Conduct