mrHorse
mrHorse

Reputation: 141

Soundcloud waveforms

I would like to know how soundcloud generate their waveforms.

  1. Is this done on server side? Is it done using the web audio API?
  2. How can I achieve static waveforms like soundcloud do using the web audio API?

Thanks

Upvotes: 1

Views: 2098

Answers (2)

Tobias Beuving
Tobias Beuving

Reputation: 640

Soundcloud analyzes the waveform serverside. They used to serve 1800 pix wide png bitmaps representing the waveform uptil august 2015. Since then they also serve a JSON object with the peak-data.

Take a look at this thread for use of the web audio API for this purpose: Create a waveform of the full track with Web Audio API

And this project does a serverside waveToJSON: https://github.com/cargan/wave-form-player.

Upvotes: 1

Jeremy
Jeremy

Reputation: 66

It is done through HTML5 canvas (a simple right click on the element can show you that), so it is generated on the client side.

There are some libraries handling this. One of it is WaveSurfer.

Upvotes: 5

Related Questions