Re: SF2: bsefextract produces -inf



   Hi!

On Thu, Mar 09, 2017 at 04:01:00PM +0100, Tim Janik wrote:
with current wip/soundfont, I'm getting -inf on some audio tests.

Here's a test case for -inf results from bsefextract:

  http://testbit.eu/~timj/.tmp/sum-diff-test.wav

(temporary URL, will be removed at some point in the future)

tools/bsefextract sum-diff-test.wav --cut-zeros --channel 0 --avg-spectrum \
  --spectrum --avg-energy

gives:

avg_energy = -inf;

Not here (with your file):

$ ../tools/bsefextract --cut-zeros --channel 0 --avg-spectrum --spectrum --avg-energy sum-diff-test.wav
# this output was generated by bsefextract 0.10.1~wip from channel 0 in file sum-diff-test.wav
#
# --spectrum: generate 30ms sliced frequency spectrums
spectrum[0,0] = {
};
# --avg-spectrum: average frequency spectrum
avg_spectrum[0] = { };
# --avg-energy: average signal energy in dB
avg_energy = -5.61784072;

Note that it will return -inf if the input sample is completely silent,
basically because average energy is measured in dB, and db(0) -> -inf.

Since 'master' works fine here, I suspect that the SF2 branch change *some*
timing aspects of the engine or engine initialization, which probably affects
the number of zeros initially generated by bsetool render2wav. E.g. fluidsynth
bootup, or the introduction of a master lock which I'm still not quite fond of...

After looking at a couple runs, I can say that the amount of non-zero samples in
the sum-diff-test.wav file varies a *lot* between runs. I've picked an example
from 'make check' for you that has astonishingly *few* samples.

Anyway, if things are as extreme as in your file (18ms data)

$ ../tools/bsefextract --end-time --start-time sum-diff-test.wav --cut-zeros
# this output was generated by bsefextract 0.10.1~wip from channel 0 in file sum-diff-test.wav
#
# --start-time: signal start time in ms (first non-zero sample)
start_time = 0;
# --end-time: signal end time in ms (last non-zero sample)
end_time = 18.6458333;

and 25 seconds total, one could expect that feature tests fail completely.

This may even be related to the fluid warnings, maybe these are blocking due to
fflush(). But thats speculation. In any case I'd recommend finding a strategy
that reliably reduces the number of zeros produced before the actual output to
a minimum.

   Cu... Stefan
-- 
Stefan Westerfeld, http://space.twc.de/~stefan


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]