在Javascript中绘制可缩放的音频波形时间线 [英] Drawing zoomable audio waveform timeline in Javascript

查看:585
本文介绍了在Javascript中绘制可缩放的音频波形时间线的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一首来自歌曲的原始44,1 kHz音频数据作为Javascript数组,并且我想创建一个可缩放的时间线。



示例时间线Audacity:





由于有数百万个时间点,所以普通的Javascript图形库可能不会削减它:我认为,不确定的是,正常的图形库会在很多时间点死掉。但是,是否存在用于JS的这种可视化的库?画布,webGL,SVG都是可以接受的解决方案。



解决方案最好带有缩放和平移功能。



请注意,这种情况严格发生在客户端和服务器端解决方案是不可接受的。

解决方案

我已经相当广泛地研究了这个相同的问题。据我所知,唯一现有的项目接近你想要的是 wavesurur.js 。我没有使用它,但屏幕截图和描述听起来很有希望。

另见这个问题



祝您好运。


I have raw 44,1 kHz audio data from a song as Javascript array and I'd like to create a zoomable timeline out of it.

Example timeline from Audacity:

Since there are millions of timepoints normal Javascript graphics libraries probably don't cut it: I think, not sure, that normal graph libraries will die on this many timepoints. But does there exist already libraries for this sort of visualization for JS? Canvas, webGL, SVG all are acceptable solutions.

A solution preferably with zoom and pan.

Note that this happens strictly on client side and server-side solutions are not accetable.

解决方案

I've looked into this same problem pretty extensively. To the best of my knowledge, the only existing project that does close to what you want is wavesurfer.js. I haven't used it, but the screenshots and the description sound promising.

See also this question.

Best of luck.

这篇关于在Javascript中绘制可缩放的音频波形时间线的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆