Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

when called a new song volume is getting way harder and destorted #149

Open
ItzKevin01 opened this issue Dec 27, 2020 · 2 comments
Open

Comments

@ItzKevin01
Copy link

who can help

@ItzKevin01
Copy link
Author

audioPlayer = new Pizzicato.Sound("./songs/"+e.data.songname);
console.log("started timeout");
myVar = setTimeout(alertFunc, 3000);
function alertFunc() {
audioPlayer.volume = 0.0;
lowPassFilter.peak = 0;
audioPlayer.addEffect(reverb);
audioPlayer.addEffect(lowPassFilter);

audioPlayer.play();

console.log("started music");
}

@grommas
Copy link

grommas commented Feb 8, 2021

It would be easier to help with a provided Codepen, so I’m not sure about your setup. But try to group your sounds and add the effects to the group instead of applying them to the sounds directly. Instead of turning down the volume to zero, you could probably pause them while inactive. I detected the distortion on sounds e.g. when adding multiple groups to one effect. Besides of that the peak of your LPF can’t be 0 (min: 0.0001), but that shouldn’t cause your problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants