p5.js-sound
p5.js-sound copied to clipboard
PolySynth has a constant 440Hz sound after constructor called
Immediately audible when using a lot of voices (e.g. 128). Constant 440Hz sine wave coming from PolySynth.
mySynth = new p5.PolySynth(p5.MonoSynth, 128);
I can hear it on
- OSX: Chrome, Safari
- Android: Chrome and native browser.
Even when using default (8) number of voices (but much softer).
This changes the constant drone frequency:
for (var i = 0; i < 128; i++){
mySynth.audiovoices[i].oscillator.freqNode.value = 1000;
}
I'm not a trained developer, might probably be easy to fix, but I suppose this should not happen by default.
@kovatsgergo yes, this also happens when multiple MonoSynth constructors called. I don't know if this intended . But I found out a way to fix this.
this.oscillator.output.gain.value = 1.0; // should be changed to
this.oscillator.output.gain.value = 0.0; // this
//and
triggerAttack(...){
this.amp(1)
...
}
should I start working on? @therewasaguy