Hi @ajus,
Can I ask which browser you used? The program runs differently on different machines and browsers. Although some are better than others, in my experience they have all been faulty. In my case, Safari has been the best browser. While the beeps completely stop playing on Chrome after around 380 trials, they only start glitching on Safari around the 900th trial (similar to what you mentioned). In my actual experiment, due to the added complexity, the sound starts glitching (and eventually stopping) even sooner.
However, since Safari is limited to macOS and is unaccessible by some participants, unfortunately its advantages over Chrome aren’t really useful to me. I will need to resolve the issue on Chrome.
Thank you so much for your response.