Closed Zayon closed 1 year ago
I am doing some tests but so far I could not reproduce this warning. Kill EasyEffects and restart it in debug mode G_MESSAGES_DEBUG=easyeffects easyeffects
so we can see more messages. Also save your settings to a preset file and attach it here on github so I can load your settings on my computer to see what happens.
You preset file caused the warning here. It seems that setting the reduction
parameter to zero
is what causes the warning. Other values are fine. Interesting...
I think that warning message is actually coming from the Linux Studio Plugin and not from EasyEffects. I disabled our gtk control for the reduction parameter and used the plugin native window to set the value. The warning is shown immediately when I set the reduction to zero. Is this a known bug @sadko4u ?
@wwmm Please tell me how GTK warnings are related to the DSP part of LSP Plugins?
Also, it is not correct to set the reduction
parameter to value 0
since it is restricted with the following values:
[
a lv2:InputPort, lv2:ControlPort ;
lv2:index 23 ;
lv2:symbol "gr" ;
lv2:name "Reduction" ;
units:unit [
a units:Unit ;
rdfs:label "gain" ;
units:symbol "G" ;
units:render "%.8f G" ;
] ;
lv2:portProperty pp:logarithmic, pp:hasStrictBounds ;
lv2:minimum 0.000251 ;
lv2:maximum 3981.072998 ;
lv2:default 0.063100 ;
]
Moreover, LSP plugins handle invalid values and limit them to match the predefined range even if they are incorrect.
I got rid of GTK since the 1.1.0 release and never got back since it is not compatible with many hosts the UI is trying to embed to.
I think it is a bug in the GTK control since value '0' means '-inf dB'. The log
function probably will give the -Inf
value when trying to convert gain into decibels since the log(0)
is not defined:
RETURN VALUE
On success, these functions return the natural logarithm of x.
If x is a NaN, a NaN is returned.
If x is 1, the result is +0.
If x is positive infinity, positive infinity is returned.
If x is zero, then a pole error occurs, and the functions return -HUGE_VAL, -HUGE_VALF, or -HUGE_VALL, respectively.
If x is negative (including negative infinity), then a domain error occurs, and a NaN (not a number) is returned.
I think the main problem is that the GTK control can not handle -Inf
value properly.
Please tell me how GTK warnings are related to the DSP part of LSP Plugins? I think it is a bug in the GTK control since value '0' means '-inf dB'.
When I did the tests I disabled the GTK widget and set the values through the LSP native window. So it definitely isn't GTK the one printing the warning. Maybe when the native window set its control another part of our code was called by the LV2 callback. I will investigate if that is the case.
Also, it is not correct to set the reduction parameter to value 0 since it is restricted with the following values:
Well... The plugin native window accepted zero as input without any complaints. So without looking at the ttl file it is hard to notice this is not allowed.
When I did the tests I disabled the GTK widget and set the values through the LSP native window. So it definitely isn't GTK the one printing the warning. Maybe when the native window set its control another part of our code was called by the LV2 callback. I will investigate if that is the case.
And as the warning only happens when the plugin starts to process buffers it felt like the plugin code could be involved.
Well... The plugin native window accepted zero as input without any complaints. So without looking at the ttl file it is hard to notice this is not allowed.
Never mind. You were talking about the linear values and not decibel.
I did some tests and for some reason when the linear value 1.0
is written to the reduction port, the one with LV2 symbol gr
, the warnings start. I looked at the values returned by the native window through the LV2 callback we pass when calling ui_descriptor->instantiate
and as expected the native window returns the linear value 1.0
when 0 dB
is given as input. For some reason writing this value to the plugin float port is causing warnings.Humm... I will try to investigate more later.
I did some tests and for some reason when the linear value 1.0 is written to the reduction port, the one with LV2 symbol gr, the warnings start.
And as I saw in the past only if the plugin is processing buffers.
And what's the "valuenow"? I think you can write some code around this variable to catch the reason.
And what's the "valuenow"?
That is one of the things confusing me. As far as I am aware no gtk widget has a property with this name. The closest property named like this is value
. Like in the gtk spinbuttons.
I wonder if the problem is in a totally different place. Besides the plugin's control ports we also read its level meter ports. Maybe writing the value 1 to the reduction port is triggering a non expected value in a location that has nothing to do with the reduction control..
I wonder if the problem is in a totally different place.
That is it. The warning comes when we process and pass the reduction level meter
to the GtkScale
. Why the hell gtk talks about a property valuenow
I have no idea. The value is set through gtk_level_bar_set_value
. So it is probably some internal gtk variable.
Now I will investigate why the processing we are doing to the reduction level meter value is causing troubles.
As the gtkscale does not allow us to do the same that LSP does to the "gain" level meter in its native window we tried some preprocessing of the value to try to scale things in a way that could be shown by gtkscale. But that is not playing nice when the reduction control is set to 0 dB
. Honestly I think I will just remove the gtkscale. Now that we are able to show the native plugin window I do not think it is worth the effort of making it work in this case.
Thanks for your time @sadko4u. It helped.
EasyEffects Version
7.0.6
What package are you using?
Arch (easyeffects)
Distribution
Archlinux
Describe the bug
When I use my microphone easyeffects starts to spam logs (journalctl) with
easyeffects[1724]: Unable to collect the value for property “valuenow”: Invalid numeric value
After playing around plugins I found that the issue comes from the "Gate" plugin. As soon as I enable it the spam starts and it stops when I disable it.
Expected Behavior
No logs spam
Debug Log
Debug Log
``` easyeffects[1724]: Unable to collect the value for property “valuenow”: Invalid numeric value ```
Additional Information
I found this issue : https://github.com/wwmm/easyeffects/issues/1870 that looked similar (same log spam) but my mic is stereo.
I tried with both "Analog Stereo Input" and "Digital Stereo (IEC958) Input" audio profiles for my microphone.