使用 web-audio-draw 的麦克风音量 (rserota/wad)
Volume of Microphone using web-audio-draw (rserota/wad)
所以这个答案是我使用原生 html API 的问题:
但我想使用 WAD 库:https://github.com/rserota/wad#audio-meter
这是我开始尝试将#audio-meter 和#pitch-detection 的想法混合在一起的代码笔。 https://codepen.io/FlorianMettetal/pen/oNXjPOj?editors=0011
但是您可以在 console.logging 中看到并在麦克风中播放一些音乐时,音量始终为 0 且削波始终为 false
Object {
clipping: false,
noteName: "G#2",
pitch: 103,
volume: 0
}
Object {
clipping: false,
noteName: "G#2",
pitch: 103,
volume: 0
}
感谢您对此的任何帮助
我简要地查看了您的代码,我注意到至少有一点看起来不对劲。当您调用 this.tuner.setVolume(0)
时,这基本上会使麦克风或任何添加到调谐器的东西静音。这可以解释为什么您看到的输出音量始终为 0,以及为什么削波总是错误的。您可能希望将音量保留在默认级别,或者将其设置为某个非零数字(小于或等于 1)。
希望您使用愉快 Wad.js!
所以这个答案是我使用原生 html API 的问题:
但我想使用 WAD 库:https://github.com/rserota/wad#audio-meter
这是我开始尝试将#audio-meter 和#pitch-detection 的想法混合在一起的代码笔。 https://codepen.io/FlorianMettetal/pen/oNXjPOj?editors=0011
但是您可以在 console.logging 中看到并在麦克风中播放一些音乐时,音量始终为 0 且削波始终为 false
Object {
clipping: false,
noteName: "G#2",
pitch: 103,
volume: 0
}
Object {
clipping: false,
noteName: "G#2",
pitch: 103,
volume: 0
}
感谢您对此的任何帮助
我简要地查看了您的代码,我注意到至少有一点看起来不对劲。当您调用 this.tuner.setVolume(0)
时,这基本上会使麦克风或任何添加到调谐器的东西静音。这可以解释为什么您看到的输出音量始终为 0,以及为什么削波总是错误的。您可能希望将音量保留在默认级别,或者将其设置为某个非零数字(小于或等于 1)。
希望您使用愉快 Wad.js!