On 10.08.24 22:05, Will Godfrey wrote:
The GUI control position is always correctly in sync with the CLI values,
and when the graph has moved the wrong way, reading the CLI control shows
it has set the right value, and this is also reflected in the GUI.

Also when first creating the EQ effect the frequency value is interpreted
wrongly. Setting the control to exactly the same value (from the CLI)
corrects this.

On 11.08.24 17:28, Will Godfrey wrote:
The bit below is a far back as I can go. 'i' is just a straight counter,...
'resp' is returning the wrong value.

Effects::EQ/calcResponse(float freq) const
Line 365
resp *= filter[i].l->H(freq);


To narrow down this problem...
First, the setup can be simplified

(1) setup
    - use "simple sound"
    - add a single part-effect with EQ
    - just set the EQ to low-shelf (everything else on default)
    - store as TestEQ-instrument

(2) load TestEQ-instrument: Graph shows up flat (↯ wrong)
(3) nudge the frequency parameter: Graph follows with an *Hysteresis*
    - one step up to 738Hz: graph shows the correct value
    - one step back down 600Hz: graph shows the increased value
    - one further step down to 460Hz: graph shows the correct value
    - one step back up to 600Hz: graph shows the lowered value


Looking further into the calculation in AnalogFilter::H(freq)

==> the *Filter coefficients themselves* all exhibit this lagging state.

Note: the calculations used for the EQ display can all be made *const* functions

This implies that in between, another calculation took place and tampered with
the filter coefficients.



For diagnostics: We can select a single "slot" and trace
numeric values only for that single data point. I use:

 if (util::isLimited(360, freq, 370))

which singles out a slot at the knee of the response curve



|SYN| publish -> Part-0 (currPart=0) effNr=0 type=7
▣AF▣···|       c[0]=1
▣AF▣···|       c[1]=-1.86141    d[1]=1.86141
▣AF▣···|       c[2]=0.87747     d[2]=-0.87747
▣AF▣···|     f=367.489  h=1
▣EQ▣···|freq=367.489    fak=1
|SYN| publish -> EQ-Graph
Main Part 1 loaded 0032-EQTest

EffUI::send_data value=69 act=32 type=192 ctrl=11 npart=0 grp=23 neff=0
|SYN| publish -> Part-0 (currPart=0) effNr=0 type=7
▣AF▣···|       c[0]=1.03956
▣AF▣···|       c[1]=-1.94282    d[1]=1.94916
▣AF▣···|       c[2]=0.918332    d[2]=-0.951563
▣AF▣···|     f=367.489  h=36.3485
▣EQ▣···|freq=367.489    fak=6.02898
|SYN| publish -> EQ-Graph
Part 1 Effect 1 EQ (Band 1) Frequency Value 69

EffUI::send_data value=64 act=32 type=192 ctrl=11 npart=0 grp=23 neff=0
|SYN| publish -> Part-0 (currPart=0) effNr=0 type=7
▣AF▣···|       c[0]=1.05247
▣AF▣···|       c[1]=-1.92252    d[1]=1.93322
▣AF▣···|       c[2]=0.895511    d[2]=-0.937287
▣AF▣···|     f=367.489  h=47.956
▣EQ▣···|freq=367.489    fak=6.92503
|SYN| publish -> EQ-Graph
Part 1 Effect 1 EQ (Band 1) Frequency Value 64

EffUI::send_data value=59 act=32 type=192 ctrl=11 npart=0 grp=23 neff=0
|SYN| publish -> Part-0 (currPart=0) effNr=0 type=7
▣AF▣···|       c[0]=1.03956
▣AF▣···|       c[1]=-1.94282    d[1]=1.94916
▣AF▣···|       c[2]=0.918332    d[2]=-0.951563
▣AF▣···|     f=367.489  h=36.3485
▣EQ▣···|freq=367.489    fak=6.02898
|SYN| publish -> EQ-Graph
Part 1 Effect 1 EQ (Band 1) Frequency Value 59

EffUI::send_data value=64 act=32 type=192 ctrl=11 npart=0 grp=23 neff=0
|SYN| publish -> Part-0 (currPart=0) effNr=0 type=7
▣AF▣···|       c[0]=1.02994
▣AF▣···|       c[1]=-1.95749    d[1]=1.96123
▣AF▣···|       c[2]=0.93646     d[2]=-0.962653
▣AF▣···|     f=367.489  h=16.2724
▣EQ▣···|freq=367.489    fak=4.03391
|SYN| publish -> EQ-Graph
Part 1 Effect 1 EQ (Band 1) Frequency Value 64



Just looking at c[0] alone clearly shows the dragging state, when
(as in this example) we dial through <init> - val=64, 69, 59, 64 ...


_______________________________________________
Yoshimi-devel mailing list
Yoshimi-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/yoshimi-devel

Reply via email to