在音频和音高上播放 [英] playbackRate on AUDIO and pitch

查看:146
本文介绍了在音频和音高上播放的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

一点点背景:

人们喜欢游戏。

人们使用互联网。

互联网需要游戏。

游戏使用声音。

HTML5有< audio>

好的,一切都很好到目前为止。

Okay, all good so far.

最近我发现 - 令我惊讶的是 - IE9实际上支持playbackRate。我急切地尝试了一下。更令人惊讶的是,它确实奏效了。我在Chrome中尝试过相同的功能,当它设置为 0.5 时,它的工作非常糟糕。我已经放弃了Firefox,因为它不支持MP3。

Recently I discovered - to my surprise - that IE9 actually supports playbackRate. I eagerly gave it a try. Even more surprising, it actually worked. I tried the same in Chrome, and while it worked it was horribly grating when I set it to 0.5. I've already ditched Firefox because it doesn't support MP3.

继续,这是我的问题:IE和Chrome在更改playbackRate时应用音高修正。 IE做得很好,Chrome做得很糟糕。无论哪种方式,我都不希望这样,我 想要 改变音高的声音。有了这种力量,我可以删除650个文件,我必须在程序上生成一个备用音高,并且我的项目将拥有更多的自由。哎呀,如果我真的想,我甚至可以在HTML5中创建一个MOD轨道播放器(减去效果频道)。

Moving on, here's my question: both IE and Chrome apply pitch correction when changing the playbackRate. IE does a great job, Chrome does a horrible one. Either way, I don't want this, I want the sounds to change pitch. With that kind of power I can delete 650 files I had to procedurally generate to have an alternate pitch, and will have far more freedom with my projects. Heck, I could even make a MOD track player in HTML5 (minus the Effects channel) if I really wanted to.

那么,HTML5规范中是否有任何内容允许我关掉了音高修正,只是把声音打得好像是样品已被挤压在一起挤压了一起?

So, is there anything in the HTML5 specification that allows me to turn pitch correction off, and just have the sound be played as if the samples had literally been stretched apart of squeezed together?

推荐答案

不,HTML5规范中没有任何内容可以让你对音频进行微调。

No, there's currenly nothing in the HTML5 specification that allows you such fine tuning with audio.

但是。

当你通过决定放弃Firefox来限制自己时,为什么关心权力和项目自由?顺便说一句,Opera也不支持MP3。

Why do you care about "power" and "freedom with projects" when you're already limiting yourself by deciding to ditch Firefox? Incidentally Opera also doesn't support MP3.

除非当然这是个人项目,除了你自己之外没有人会使用它,因此这是一个没有实际意义的点。在这种情况下,如果您想要定位Chrome,例如,您可以查看 Web Audio API 可能包含您想要的内容。

Unless of course it's a personal project where no-one but yourself will be using it and therefore it's a moot point. In which case if you want to target Chrome for example, you could check out the Web Audio API which might have something you want.

这篇关于在音频和音高上播放的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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