Skip to content

Conversation

@Oele
Copy link

@Oele Oele commented Mar 1, 2025

First of all, thank you for bringing this legendary audio visualizer to the web!

I really wanted to be able to use it for live radio streams (icecast / shoutcast), so I made some adjustments here:

  • From testing with audio tracks with lots of difference between the left & right channels, I didn't get the impression that the stereo image of the audio is very relevant for the generated visualizations. Therefore it seemed to make more sense to me to merge the two channels into one, and let the visualizer work with the resulting mono stream. This way we don't have to worry about the amount of channels anymore. In case of a mono source, you're merging the single audio channel with silence, which works just fine. (Note: the merged/mono stream goes tot the visualizer, but the original stereo stream is sent to your speakers)

[If I misinterpreted the situation / made the wrong assumption about stereo not being relevant for visualization, please do let me know. Would be great if you could show me an example of a song where the difference is noticeable! ]

  • Because we now no longer have to detect the amount of channels of the source, we don't need custom decode audio logic anymore, and we can just rely on the functionality of an <audio> element instead.

  • <audio> elements are perfectly able to play live streams from icecast/shoutcast sources! 🎉 - so let's add a field to input a stream URL on the demo index page.

Please let me know what you think - I'm happy to modify / further improve if necessary.

Live demo: https://oele.net/goom-online/

@Oele Oele changed the title use HTML audio element + a channel merger so that we can also play li… merge channels, use <html> tag and support live streams Mar 1, 2025
@Oele Oele changed the title merge channels, use <html> tag and support live streams merge channels, use <audio> tag and support live streams Mar 1, 2025
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