Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unittests fixes #885

Merged
merged 31 commits into from
Aug 3, 2019
Merged

Unittests fixes #885

merged 31 commits into from
Aug 3, 2019

Conversation

palonso
Copy link
Contributor

@palonso palonso commented Jul 24, 2019

Repairs most of the tests failing or with errors, some of them already reported in #316

palonso added 19 commits July 25, 2019 16:08
Tests were designed for a digital dynamic of [-1 + 1 / 32767, 1]
They  were modified to pass for a dynamic range of  [-1,  1 - 1 / 32767]

Add a comment to explain the current status of the Vorbis test
This also modifies  DynamicComplexity to use the global SilenceThreshold
instead of having a hardcoded value
This way it gets removed even if the test fails
testSpectrumSizeSmallerThanNumberOfBands was failing because of an
incorrect implementation.
The new way of computing the bands correctly assignates the central
frequencies: 57.26, 163.98, 469.57, 1344.60, 3850.23 and 11024.99 Hz
in that particular case.
This means that only the last band contains one spectral bin.
However, this was making the test fail, as it was designed to pass
only if no spectral bins were contained inside any band.
The test was modified to pass on the current implementation.
In this case the correct method is assertEqualMatrix
testRegression is renamed to testValidResults
The new testRegression checks different parameter configurations.
The audio source was changed to a shorter monophonic signal.
The expected values are now stored in a .npy so they are lighter and
faster to load.
Although the output was compared to the vamp implementation and seen to
be very close the expected values were obtained from the algorithm
itself. This way the allowed error could be reduced so the assertion
will be triggered with any small variation from the current values.
This test compares our pitch estimation with the Yin implementation of
the Vamp pYin plugging
https://code.soundsoftware.ac.uk/projects/pyin
palonso added 9 commits July 29, 2019 17:18
This test compares our YinFFT pitch estimation with the Aubio
implementation
Given that every time the algorithm is reset it clears its buffers,
Compute/Reset/Compute tests do not make sense for this algorithm
As now we perform normalization inside IFFT by default, it does not have
to be added as an extra parameter in the OverlapAdd algorithm
for synthesis.
Also the IFFTC does not have to be reversed now thanks to the changes
in 449d9b0
Also includes some error fixes in the parameters
@palonso palonso mentioned this pull request Jul 30, 2019
@palonso palonso mentioned this pull request Aug 1, 2019
@dbogdanov dbogdanov merged commit d564478 into MTG:master Aug 3, 2019
@palonso palonso deleted the unittests_fixes branch January 24, 2020 14:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants