0
我可以使用振荡器来调制另一个振荡器频率或增益节点增益值......但是当我连接到biquadfilter频率参数时,没有任何变化。这是一个错误?LFO不会影响biquadfilter频率
https://jsbin.com/yurenexufe/edit?js,output
let ctx = new AudioContext()
let o = ctx.createOscillator()
let oGain = ctx.createGain()
let lfo = ctx.createOscillator()
lfo.type = 'sin'
lfo.frequency.value = 5
let lfoGain = ctx.createGain()
let hipass = ctx.createBiquadFilter()
hipass.type = 'highpass'
hipass.frequency.value = 3000
o.connect(oGain)
lfoGain.gain.value = 25
oGain.connect(hipass)
hipass.connect(ctx.destination)
o.type = 'square'
lfo.connect(lfoGain)
lfoGain.connect(hipass.frequency) // does nothing?
lfoGain.connect(o.frequency) // works
o.start()
lfo.start()