ardour icon indicating copy to clipboard operation
ardour copied to clipboard

Audio track: show spectrogram in regions

Open liuanlin-mx opened this issue 4 years ago • 4 comments

liuanlin-mx avatar Sep 19 '20 17:09 liuanlin-mx

Wow. That's a nice surprise. Well done!

It might benefit from keeping keeping the fftw buffers as class members instead of re-allocating them for every drawing request. -- Compare to the outline for this feature: https://github.com/Ardour/ardour/tree/spectrowave

Have you tried if it scales to a few hundred tracks?

PS. It'd also be great to split this into two (or more) commits. The libwaveform and lib API changes first and then the GUI. but we could also do that when re-basing.

x42 avatar Sep 19 '20 17:09 x42

I only tried a few audio tracks draw_spectrum is not efficient (region->read() takes a long time. Maybe the cache is invalid?)

liuanlin-mx avatar Sep 20 '20 09:09 liuanlin-mx

I did test this with a hundred tracks where only ten had spectrum mode enabled. On average, 3 times as slow playback, and uneven at that (goes faster, slower, then faster again). Sometimes, the playhead would reverse its direction, then frantically skip forward. Overall, good fun, but not exactly usable in large sessions :)

prokoudine avatar Nov 13 '20 18:11 prokoudine

This is nice work, but I strongly believe that FFT data should be cached on disk for sources similar to what we do for peakfiles and transient analysis. I think it is inappropriate to regenerate anything on a per-draw basis.

pauldavisthefirst avatar Aug 18 '22 16:08 pauldavisthefirst