Waveform Visualization in Ruby

你。 提交于 2019-12-07 08:12:37

问题


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?


回答1:


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.




回答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.




回答3:


i wrote one:

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

,nick




回答4:


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




回答5:


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

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



来源:https://stackoverflow.com/questions/41188/waveform-visualization-in-ruby

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!