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

Updates to superflux extractor (e.g RegTest, invalid vals, etc.) #1103

Merged
merged 2 commits into from
Feb 9, 2021

Conversation

cvf-bcn-gituser
Copy link
Contributor

Added Regression Tests based on two audio files, whose values were captured on previous runs with the same parameters.
Tested on Ubuntu and Linux Subsystem on Windows.
Superfluxextractor covers peaks and novelty tests internally.
Dummies added to maintain 1:1 correspondence between src, file and UT.

Copy link
Member

@dbogdanov dbogdanov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's a redundant call self.assertComputeFails(Onsets(), array([[]]), []), possibly left from another test.

self.assertAlmostEqual(found[i], expected[j-1], precision)
else:
self.assertAlmostEqual(found[i], expected[j], precision)

def testSilence(self):
# zeros should return no onsets (empty array)
self.assertEqualMatrix(SuperFluxExtractor()(zeros(44100)), [])
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The output is 1-D vector, so we can use assertEqualVector instead.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

self.assertEqualMatrix should use self.assertEqualVector

@@ -55,7 +103,6 @@ def testImpulse(self):
precission = (hopSize + frameSize) / sampleRate
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

MIsspel: precision

@dbogdanov dbogdanov merged commit 7a24b3e into MTG:master Feb 9, 2021
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.

None yet

2 participants