Skip to content

Conversation

@Gautzilla
Copy link
Contributor

@Gautzilla Gautzilla commented Dec 17, 2025

🐳What's new?

When assembling zoomed spectrograms on APLOSE, there was some error in the joint between adjacent zooms because of the padding that is made at the beginning/end of the audio (in this new OSEkit, each zoomed part is a distinct spectrogram, so the padding occurs at both end of the joint).

This PR addresses that issue.

🐳How does it work?

It seems a bit hacky, but here's how I do:

  • When I split a SpectroData in 2 spectra sd1 and sd2, I specify to sd1 that sd2 comes after and vice versa
  • When I call get_value() on a SpectroData that has a neighbour, I compute a small SpectroData that includes the overlapping sliding windows (while making sure that the windows in the FFT of this overlap are synced in time with the one of the original non-splitted data)
  • I remove these overlapping bins from sd1 and include them in sd2

This way, it more or less does as if I padded the sliding windows with the actual audio data that comes outside the SpectroData boundaries.

Not sure if this is 100% valid in signal processing theory, but that seems to do the job on the output spectrograms:

padding result
zero before
overlap after
original original

I've put the two split part spectrograms just next to each other so that the cut remains visible: By switching from the old duplicated zero-padding to the one from this PR, we can see that the joint is much clother to what happens in the original spectrogram (which is a single spectrogram plotted over the non-splitted data).

@Gautzilla Gautzilla self-assigned this Dec 17, 2025
@Gautzilla Gautzilla added the APLOSE related The changes are impacted APLOSE behavior label Dec 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

APLOSE related The changes are impacted APLOSE behavior

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants