Long delay while using "play sound with Hz" block/DOM Nodes problem

So, I'm working on a PVZ project (over 50MB) and I was looking for a replacement for the "play sound until done" block because it still doesn't delete any DOM Nodes...


I use a looping method for the "play sound at HZ" block, and I was thinking this was going to work. But the delay at the start just bugs me out.

Is there any way to fix the long delay on the "play sound at Hz" block or automatically delete the DOM nodes on the "play sound" block so I can use it? Some JavaScript code will work for me.

If you're already using javascript in your project, then this might help. It's not perfect, but it's probably the best option, because it's using the native javascript loop property.

Here's a project with the block, and other blocks that you need in order to stop a sound played with this.

https://snap.berkeley.edu/snap/snap.html#present:Username=ego-lay_atman-bay&ProjectName=play%20sound%20blocks