alemangui / pizzicato

Library to simplify the way you create and manipulate sounds with the Web Audio API.
https://alemangui.github.io/pizzicato/
MIT License
1.66k stars 130 forks source link

Multiple sine waves sound distorted #155

Open flappix opened 2 years ago

flappix commented 2 years ago

Hi,
thanks for providing this library, it's pretty nice.

I'm just facing the problem that multiple sine wave generators are sounding very distorted when played together while playing them once at time sound good.

let s = [1,2,3].map ( x => { return new Pizzicato.Sound () } );
s[0].frequency = 440;
s[1].frequency = 554.37;
s[2].frequency = 659.26;

s.forEach ( (x) => { x.play() } );

This is an A major chord and should sound very harmonic but the sound I get is very disgusting.

Any help would be appreciated, thanks.