+ 2

How to fix this weird lag sound?

I've been trying to figure out why the weird electronic lag sound is being created when two sounds are played together can anyone explain how to fix it. I've tried my best to include comments for all important parts so that it can be of some help https://sololearn.com/compiler-playground/WryBy4npCVtu/?ref=app Until now I've figured out that the fade out part is causing that lag. But how to fix it?

14th Oct 2024, 3:56 PM
Just Some Random Guy
Just Some Random Guy - avatar
2 Respuestas
0
Just Some Random Guy Your projector is amazing. Although I've never played the piano and I'm no expert in coding either. Since you said it was a problem with the fade out part, I looked at the code and tried to figure out what actually happened. From looking at the code and listening to the sound, what I thought was that it was overlapping one note with another. I think you can fix it Instead of adding a long fade-out (+ 3), try to reduce it to a more reasonable value that fits the note duration. A shorter fade-out will reduce the overlap between consecutive notes, which should help eliminate the lag. Also you can increase or decrease the gain volume to see if that resolves. I'm not an expert, just trying to say what I understand. I hope you will look kindly on forgiveness if I am wrong.
25th Oct 2024, 3:29 PM
EAJUDDIN
EAJUDDIN - avatar
0
EAJUDDIN yeah I have tried those earlier but still I'm getting the lag in sound
25th Oct 2024, 10:49 PM
Just Some Random Guy
Just Some Random Guy - avatar