Waveform Visualization in Ruby
Asked Answered
J

5

5

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?

Jetton answered 3/9, 2008 at 4:54 Comment(0)
N
3

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.

Noenoel answered 3/9, 2008 at 5:29 Comment(0)
A
2

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.

Arequipa answered 26/9, 2008 at 14:38 Comment(1)
The first site is offline, and the second site is parked.Euphemism
B
2

i wrote one:

http://github.com/pangdudu/rude/tree/master/lib/waveform_narray_testing.rb

,nick

Besot answered 20/4, 2009 at 8:25 Comment(1)
This link returns a 404Euphemism
N
1

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

Noenoel answered 3/9, 2008 at 5:33 Comment(0)
R
1

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

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

Roadstead answered 17/7, 2009 at 23:39 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.