-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
FIX: Prevent misalignment of [Spectrogram] at start and end of sample. #3904
base: main
Are you sure you want to change the base?
Conversation
Add 0 padding to the end of spectrogram if some data was left out due to window and file length mismatch
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
I can't seem to figure out, why the first two sample need to be added to the visualization. I'd appreciate any input on why they seem to be missing. This is all that's holding me back, since I don't want to push this and breaking the visualization. |
Tbh I don’t know either. The plugin was contributed a long time ago by someone else and I barely touched it since. |
Short description
For Short audio files the spectrogram is only aligned towards the beginning and end of a file. This becomes especially apparent when zooming into the audio/spectrogram.
Resolves #3535
Implementation details
Recommended improvements:
How to test it
Take a short audio file (<20 sec, even better <10s) with pronounced beats / cuts in the the audio, e.g. this heartbeat: heartbeat.zip
Load it into the examples/audio folder
Change the spectrogram example to this code: spectrogram.js.txt
Zoom in to the ends of the spectrogram
So far, the beats do not align, with this pull request they do.
Screenshots
Before
Spectrogram aligns in center
Spectrogram is "late" towards the end of the file.
Spectrogram is "early" towards the beginning of the file.
After
Spectrogram is aligned in the end
Spectrogram is aligned in the beginning
Checklist