js webaudio音量
How about generating some noise in JavaScript?
如何在JavaScript中产生一些噪音?
Demo is here: oscillator.
演示在这里:振荡器。
这是如何运作的? (How does this work?)
Using HTML Web Audio you can synthesize audio with a given frequency. E.g. 440Hz is A ("la" in solfège)
使用HTML Web Audio,您可以合成给定频率的音频。 例如440Hz为A(在solfège中为“ la”)
This means you don't need an <audio>
element or any mp3, ogg, wav, etc, no external files.
这意味着您不需要<audio>
元素或任何mp3,ogg,wav等文件,也不需要外部文件。
Let's see how.
让我们看看如何。
能够使用浏览器? (Capable browser?)
You need a browser that supports AudioContext
. No such (major) browser at the time of writing, afaik. But there's webkitAudioContext
supported in stable iOS Safari, Safari, Chrome. Also there could be brow