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.
This fixes triggering errors where the edge of the allowed range has
higher correlation than edges in-bounds, but isn't a rising edge itself
(a local maximum of alignment).
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.
corrscope uses poetry, while pip expects a setuptools project and will
create package name UNKNOWN if run without setup.py or pyproject.toml
[build-system]. This adds an up-to-date pyproject.toml [build-system]
tag.
"setuptools" is required to make `pip install .` work, due to
https://github.com/python-poetry/poetry/issues/3153#issuecomment-727196619
Right now, `pip install [--editable] .` and `pipx install .` work, but
`pipx install --editable .` fails with message "No apps associated with
package UNKNOWN or its dependencies."
I'm not aware of how to fix this.