-
Notifications
You must be signed in to change notification settings - Fork 281
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feature request: spectral waveform #528
Comments
When you say you haven't been able to get a working demo, is that because those projects don't produce the effect you want, or is something else preventing them working? Adding this would require some substantial changes to Peaks.js. Currently the waveform is just a solid filled (or gradient) colour, so the waveform rendering code would need reworking. Then we'd need a new waveform data format that can store frequency information, and a mapping from that to colours. |
Mainly because of basic implementation issues such as drawing on the canvas and computing the correct centroid values per audio segment. There will probably be a need for segments smoothing and varying the amount of segments rendered based on the zoom level. Not giving up just yet.
Does that mean Peaks.js is probably not the best place to implement this because of the major restructure? I assume if a frontend algorithm is able to draw the frequency data without a huge compute impact, it could be ported to audiowaveform with the new data structure. The frequency ranges to colour hues mapping sounds somewhat trivial in the overall context. |
I think to start with, I'd want to have audiowaveform produce the data, and Peaks.js just does rendering. If we need the computation to also be done in the web front end, waveform-data.js would be the place to implement that. Changing the rendering in Peaks.js is doable but means rewriting that part of the code, so it's not really a major restructure. |
Colouring the audio waveform by using the spectral centroid of a sequence of short-interval samples to map frequencies to colors can enhance content navigation and aid in understanding how the timbre and intensity of the sound change over time.
I've taken a look at places like:
However, I still have not been able to get a working demo.
I decided to post this feature request here as no apparent web library supports a visualisation mode like this.
I think Native Instruments Traktor provides a great example of displaying a song's waveform. The main view here shows how the timbre changes from predominantly high-frequency content (mapped to blue hues) to mid-frequencies (mapped to green hues) and eventually to bass and sub-bass frequencies (mapped to purple and red hues). I've also attached a few zoomed-in variants of the same playhead position.
The text was updated successfully, but these errors were encountered: