Previously we got triggering errors where instead of edge triggering
scores being decided by the waveform around the trigger point, it was
influenced by distant parts of the waveform moving across the wide
sloped portion of the edge detector kernel.
This commit replaces the edge kernel with a running sum, which acts like
an infinitely wide step kernel that the input data slides *within*. As a
result, the difference between the edge scores of two trigger points is
solely determined by the data between those points. (The step kernel and
history buffer are unaffected and still slide within the data.)
This makes triggering less likely to fail. However the global scoring
system sometimes prioritizes bad edges in good regions of the document.
This will be reexamined later.
This makes triggering faster, and 60 ms is hopefully unnecessary with
deterministic triggering. You'll still need to increase trigger_ms or
the per-channel trigger width multiplier for low bass below 50 Hz.
The data read from the input _wave (length A+B+_trigger_diameter) is
longer than the correlation buffer (length A+B), to ensure that when
sliding the buffer across the wave, no edge effects are encountered.
This is inspired by overlap-save convolution, but adapted to
cross-correlation.
Fixes issue where trying to render foobar2000 WAV files fails
with message "ValueError: Incomplete wav chunk."
File taken from
ac3b21908a/scipy/io/wavfile.py.
The previously pinned NumPy 1.16.4 was very old
and didn't come with a prebuilt binary wheel for Python 3.8+.
As a result, trying to install corrscope on Python 3.8+ with the pinned
dependency versions (through `poetry install`, not through
`pip install corrscope`) tries (and fails) to build NumPy from scratch.
This updates the pinned NumPy (but not other dependencies) to 1.19.5,
which has prebuilt wheels up to Python 3.9 (the current latest release).
Poetry wouldn't upgrade to NumPy 1.20, since it requires Python 3.7
and we specify a minimum version of 3.6.
NumPy 1.19 is packaged properly by old PyInstaller.
Previously we linked to shared-dll ffmpeg builds.
When downloading the shared builds, some users fail to extract the DLLs,
causing ffmpeg to not work.
Static has a larger filesize, but is less likely to confuse users.
Previously, we linked to the latest ffmpeg dev build.
I'm unsure if ffmpeg dev builds are unstable
or may have bugs varying from version to version.
And there is no URL on zeranoe's website to get the latest release build.
So instead hard-code/pin the current latest release,
and update it from time to time.