Thanks that's helpful.
I realised that I reduced the SR by half but forgot to reduce the hop count since doing that it seems to be more reliable for steady tracks with the custom onset phase detection. Even with tracks that have a steady BPM the beat_track either locks on to transients or starts drifting through a breakdown and never recovers. I'll have another go with the varying tempo though I need to find a way to determine when that should be used over the default...
This is interesting though because I've also been trying to integrate your example of Laplacian clustering, when I try to pass the custom beats which do actually align musically I get much less clusters but aligned than what I do using the best tracker, there's a deficit of between 20-60 beats depending on the track. With the default beat tracking I get better quality clusters and sections though they need some refinements to get them to snap to aligned beats and bars etc which is probably expected.
There is another challenge I've been looking at if I can share that here, the pipeline in running currently uses N-1 worker processes, a rough breakdown
Load audio
Extract metadata
Librosa.feature.Tempo - pass into beat_track (used for anchor function and curiosity)
Find optimal interval phase from onset rounding initial tempo
Extract RMSe frames (search for track peaks and manual backtrack with N% look back for anchors)
Validate anchor spacing based on interval
Extract 13 features including 12 chorma bins, 13mfcc, basse, Spec flux, spec roll-off,tonnetz etc etc
Beat sync features
Dispose of frames
Compute novelty from feats
Laplacian clustering (passing file path to almost exact copy of your example rather than y from main script )
Various other data ops to prepare to save to file.
The issue I'm having is that each process is consuming up to 4-5 GB at worst but usually around 1-1.5gb.
Im monitoring usage in python but it only ever appears that it's using 500mb or so and clearing down between functions yet task manager reports 3-4+ times more, I clear the librosa cache between tracks too is there anything else I should consider?
Thanks
Lewis