Skip to content

Onset detector#117

Open
kunitoki wants to merge 9 commits into
mainfrom
dev/spectral_processor_onset
Open

Onset detector#117
kunitoki wants to merge 9 commits into
mainfrom
dev/spectral_processor_onset

Conversation

@kunitoki

Copy link
Copy Markdown
Owner

This pull request introduces a new log-spaced triangular filter bank for spectrogram processing and integrates onset detection and visualization into the audio file demo. The changes add a FilterBank class for dimensionality reduction of spectrograms, implement a new onset detection function, and extend the demo UI to display onset markers on the waveform. These improvements enhance the onset detection pipeline and provide visual feedback for detected onsets.

DSP and Onset Detection Infrastructure:

  • Introduced a new FilterBank class for log-spaced triangular filter banks, enabling perceptually-motivated dimensionality reduction of magnitude spectrograms. (modules/yup_dsp/onsets/yup_FilterBank.h [1] modules/yup_dsp/onsets/yup_FilterBank.cpp [2]
  • Implemented a new onset detection function (ComplexFluxODF::compute) that leverages the filter bank and performs SuperFlux-style spectral differencing, including temporal and frequency masking for improved accuracy. (modules/yup_dsp/onsets/yup_OnsetDetectionFunction.cpp modules/yup_dsp/onsets/yup_OnsetDetectionFunction.cppR1-R217)

Onset Detection and Visualization Integration:

  • Added onset detection using the SuperFlux algorithm in AudioFileDemo, running in the background and updating the waveform with onset markers when complete. (examples/graphics/source/examples/AudioFileDemo.h [1] [2]
  • Extended AudioFileWaveform to support and render onset markers over the waveform, including methods to set and clear onset data and custom painting logic. (examples/graphics/source/examples/AudioFileDemo.h [1] [2] [3]

@codecov

codecov Bot commented Jun 16, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 87.77555% with 61 lines in your changes missing coverage. Please review.
✅ Project coverage is 78.69%. Comparing base (a118d14) to head (81d2356).

Files with missing lines Patch % Lines
modules/yup_dsp/onsets/yup_ComplexFluxODF.cpp 76.27% 28 Missing ⚠️
modules/yup_dsp/onsets/yup_OnsetPeakPicker.cpp 66.26% 28 Missing ⚠️
modules/yup_dsp/onsets/yup_FilterBank.cpp 97.14% 2 Missing ⚠️
modules/yup_dsp/onsets/yup_OnsetDetector.cpp 97.14% 2 Missing ⚠️
modules/yup_dsp/onsets/yup_SuperFluxODF.cpp 98.07% 1 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #117      +/-   ##
==========================================
+ Coverage   78.62%   78.69%   +0.07%     
==========================================
  Files         614      627      +13     
  Lines       60956    61455     +499     
==========================================
+ Hits        47927    48365     +438     
- Misses      13029    13090      +61     
Files with missing lines Coverage Δ
modules/yup_dsp/onsets/yup_ComplexFluxODF.h 100.00% <100.00%> (ø)
modules/yup_dsp/onsets/yup_FilterBank.h 100.00% <100.00%> (ø)
...odules/yup_dsp/onsets/yup_OnsetDetectionFunction.h 100.00% <100.00%> (ø)
modules/yup_dsp/onsets/yup_OnsetDetector.h 100.00% <100.00%> (ø)
modules/yup_dsp/onsets/yup_OnsetPeakPicker.h 100.00% <100.00%> (ø)
modules/yup_dsp/onsets/yup_Spectrogram.cpp 100.00% <100.00%> (ø)
modules/yup_dsp/onsets/yup_Spectrogram.h 100.00% <100.00%> (ø)
modules/yup_dsp/onsets/yup_SuperFluxODF.h 100.00% <100.00%> (ø)
modules/yup_dsp/onsets/yup_SuperFluxODF.cpp 98.07% <98.07%> (ø)
modules/yup_dsp/onsets/yup_FilterBank.cpp 97.14% <97.14%> (ø)
... and 3 more

... and 2 files with indirect coverage changes


Continue to review full report in Codecov by Harness.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a118d14...81d2356. Read the comment docs.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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.

1 participant