-
Notifications
You must be signed in to change notification settings - Fork 6
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
massive refactoring for v0.2.0 #18
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The focus is now on working on the waveform (after applying a low-pass filter). I created multiple simple basic building blocks that I thoroughly test on real world audio samples. This commit is the first one where the code reliably detects the two envelopes (beats) in the "sample1_lowpassed--double-beat.wav" file. The next step is to ensure that the following samples work: - holiday_lowpassed--single-beat.wav - sample1_lowpassed--long.wav - holiday_lowpassed--long.wav
Unnecessary, over-engineered.
The relatively complex AudioInput type (complex because large base of the code need adoptions) is very nice as this way, users do not necessarily need to create intermediate arrays with their data. Thus, the copying into the internal buffer (after applying the low pass filter), is the only copying needed. Performance, yay!
Ran `cargo +nightly clippy`.
This is useful of you want to check if a previously detected beat is still inside the audio window.
This is useful of you want to check if a previously detected beat is still inside the audio window.
Yes, the Greenday Holiday example misses a few beats. But hell, this took so long, I'm finally getting good-enough results! The hard work and countless refactorings finally paid out!
phip1611
force-pushed
the
dev-2.0
branch
2 times, most recently
from
April 28, 2024 19:43
6b41cb0
to
fdaf360
Compare
Required because of the "dep:" syntax in Cargo.toml file
no-std by default, but has optional std feature
The .abs() method is in libstd but not libcore. So I have to use libm functionality to be nostd compatible.
This saves possibly hundreds or thousands of instructions as the same operation doesn't have to be done again and again.
phip1611
changed the title
XXX WIP massive refactoring for v0.2.0
massive refactoring for v0.2.0
Apr 28, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Closes #17
Closes #15
Closes #13
Closes #12
Closes #11
Closes #6
Missing (so far)