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()