Holoview + Panel Audio Player

Hi,

I’ve been mostly successful creating an Audio player that allows you to jump between sections of a song, whilst also zooming in the waveform at a specific point. However, it is very “brittle”. After a few to a dozen clicks, it just stops playing. I don’t know if its the Panel Audio or Holoviews, or a combination of these.
I’d love to get this sorted out as its not really usable when you don’t know when it will breakdown. I’ve created a standalone colab notebook that will pip install Librosa (mostly for the ease of having an audio file that anyone can use), and then builds the player.

I have a couple of enhancements that if anyone knows how to do, I’d love to have that sorted out - mostly I don’t know how to have the Waveform “scroll” along if it’s zoomed in any significant way without any user action. I’d also like it to have the waveform viewer “Jump” to the start of the section, if you click on one of the section boxes.

Finally, a very minor bug, the Scroll Zoom Out doesn’t work in reverse all the way - it gets close, but at some point refuses to zoom back out any further, and you need to RESET to see the full waveform again.

Thanks in advance, this is such a cool set of packages.

2 Likes

That’s really really cool!

I noticed this in the Browser console, but not sure what it’s related:

panel.min.js:51 TypeError: s is not iterable
    at S.apply_json_patch (bokeh-3.2.2.min.js:165:7034)
    at d.msg_handler (panel.min.js:51:3503)
    at panel.min.js:51:749
    at processIteratorResult (eval at <anonymous> (output_binary.js:1:1), <anonymous>:33:13)
(anonymous) @ panel.min.js:51

Ooh, thanks - I didn’t know how to look at any debug messages - I hadn’t thought of checking the Browser JS status.

I can’t take any real credit for this - I merely iterated on the basic design that Scottire had made (I added the section navigation bar, and the zoom-in-out/pan functionality on the waveform, but he’d done all the basic figuring out. As you can see I can’t even figure out how to make the waveform scroll automatically to track the playback position.