Tell when the stop sound block is ran

No, you can't.

(function(cont) {
    warp(function() {
        cont();
    });
}).runWithCont();
// Code here is warped.

I tried to escape a warp in the same way, continuing into the middle of a warp and finishing it. However, it did not work, probably because of the code that makes a warp not disable another warp it is inside. This seems a safe thing to do with js, but it does not seem possible to do in Snap!

EDIT: I have made a project at Redirecting to Snap!. To yield from JS, simply set this.readyToYield to true;

I hadn't thought about

.

Put the warp inside the loop instead of the loop inside the warp.

But that won't speed up the situation in which you're doing some trivial thing to every pixel in a big picture. It's the whole loop structure that needs not to yield.