Am 12.05.23 um 23:56 schrieb Will Godfrey:
Aaand we come screeching to a halt :( I ran the testsuite and i failed really
badly on the SVfilter tests. using git bisect, the first bad commit is:
41bcd2dd64d8f783ae2d784696bcdd5a19ab90b8

Am 13.05.23 um 14:46 schrieb ichthyo:
What I will do now is to dig out one of my patches that adds debugging
messages of actual computed numbers. In the past, running such builds and
comparing the traces turned out a good way to narrow down the point where
the actual numeric change manifests. At least I am curious now and want to
understand what is going on....


Hi Will,

the in-depth analysis shows that there is no problem in the code base.
Rather, the breakage of those test cases has to bee expected, and actually
confirms that we are now handling filter settings with increased precision.

The test-case I've investigated is "SVFilter_BandFreqDown.test"
For this test, I wanted to set the centre frequency down by 2 octaves,
and the CLI script actually passes a float value

description = Filter response Bandpass frequency down 2 octaves (250Hz ≙
46.7391504572…)
# see MiscGui.cpp line 700 and also Filter::getrealfreq()

[Test]
Script
  set part 1 ADD
  set volume 100
  set filter
  set category State Var
  set type Band
  set center 46.739151
  set gain 127
  set q 20
  /

...

The discrepancy manifests in ADnote::computeWorkingParameters()
This invokes FilterParams::getfreq(), for which...

- old version calculates: (46/64 - 1)*5.0        = -1,40625
- new version calculates: (46.739151/64 - 1)*5.0 = -1,348503828125

After going through various transformations, we end up with

- old code(char):  Pfreq = 0.011116762
- new code(float): Pfreq = 0.011570754


To cross-check, I made another test case. I started the old Yoshimi,
executed the above script and stored the state as instrument. This
implies that the frequency is rounded to the char value 46.
The actual test loads this instrument and plays the same notes

Result => both versions of Yoshimi produce exactly the same sound.


I will add those new test cases to the regular test suite next days
and then recompute the baselines for the broken test cases...

-- Hermann



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

Reply via email to