mohayonao / web-audio-engine

Pure JS implementation of the Web Audio API
243 stars 32 forks source link

AudioNode.connect(AudioParam) doesn't work for biquad filter and delay node #43

Closed buramensky closed 7 years ago

buramensky commented 8 years ago

Hi @mohayonao! Thanks for your amazing audio engine, it's great thing!

I noticed that control of some parameters by audio signal doesn't work. Specifically, I tested frequency of biquad filter, delay time of delay node and gain of gain node on benchmark page. Only gain node works properly :(

In example below wae doesn't change filter's frequency and output signal, but Web Audio API does.

module.exports = function(context) {
 var osc = context.createOscillator(),
   lfoOsc = context.createOscillator(),
   lfoScaler = context.createGain(),
   filter = context.createBiquadFilter();

 filter.type = 'allpass';

 lfoOsc.frequency.value = 5;
 lfoScaler.gain.value = 80;
 lfoOsc.connect(lfoScaler);
 lfoScaler.connect(filter.frequency);

 osc.frequency.value = 100;
 filter.frequency.value = 100;
 osc.connect(filter);
 filter.connect(context.destination);

 osc.start();
 lfoOsc.start();
};
mohayonao commented 8 years ago

oops!! Thank you for your report. I will fix it at this week end.

buramensky commented 8 years ago

Cool! Thanks @mohayonao! I'm looking forward to the fix! :)

mohayonao commented 8 years ago

I've fixed this issue. You can check fixed version at demo page.

But, I did not change delay node. I seem to work fine. Would you tell me a test code that replicate bug?