Question

I'm about to start a project that will record and edit audio files, and I'm looking for a good library (preferably Ruby, but will consider anything other than Java or .NET) for on-the-fly visualization of waveforms.

Does anybody know where I should start my search?

Was it helpful?

Solution

That's a lot of data to be streaming into a browser. Flash or Flex charts is probably the only solution that will be memory efficient. Javascript charting tends to break-down for large data sets.

OTHER TIPS

When displaying an audio waveform, you will want to do some sort of data reduction on the original data, because there is usually more data available in an audio file than pixels on the screen. Most audio editors build a separate file (called a peak file or overview file) which stores a subset of the audio data (usually the peaks and valleys of a waveform) for use at different zoom levels. Then as you zoom in past a certain point you start referencing the raw audio data itself.

Here are some good articles on this:

Waveform Display

Build an Audio Waveform Display

As far as source code goes, I would recommend looking through the Audacity source code. Audacity's waveform display is pretty good and mostly likely does a similar sort of data reduction when rendering the waveforms.

The other option is generating the waveforms on the server-side with GD or RMagick. But good luck getting RubyGD to compile.

Processing is often used for visualization, and it has a Ruby port:

http://wiki.github.com/jashkenas/ruby-processing

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top