serversideup / amplitudejs

AmplitudeJS: Open Source HTML5 Web Audio Library. Design your web audio player, the way you want. No dependencies required.
https://521dimensions.com/open-source/amplitudejs
MIT License
4.14k stars 425 forks source link

Generate Waveforms Efficiently #462

Open danpastori opened 3 years ago

danpastori commented 3 years ago

Issue description

A couple issues have come up with the wave form generation and they all relate to the same problem.

Waveforms are not being generated for dynamically added songs https://community.serversideup.net/t/waveform-is-not-showing-for-dynamic-added-songs/227/3.

When adding a song to Amplitude after initial load, the wave forms do not get generated for the song. Every time a song is added, we need to generate a waveform for the new song.

Programmatically Trigger Waveform Rendering

https://community.serversideup.net/t/programmatically-trigger-waveform-rendering/247

The issue is Waveforms should be generated Before the song has been played or even without it being played. This is an issue I've been wanting to solve for awhile since loading the waveforms destroys bandwidth since we are loading every song and generating the waveform.

Solution

Step 1: Allow for Waveform SVGs to be attached to a song element. This should be a piece of meta data that can be passed on page load so it's ready to go. Step 2: Programmatically trigger waveform generation. Step 3: Simple tool to generate these waveforms in the browser.

vikingmoose commented 3 months ago

Hi @danpastori, are you still actively working on this?