Is a Sound Playing?

Is there a way to tell if a sound is playing?

By listening to it..?
Can you give us more details as to what you're asking, please?

Do you want something like this?

 <is a sound playing? :: sound> 

or maybe something more specific, like

<is sound [sound V] playing? :: sound>
offtopic

flashbacks to

I have a project in which I plan to control a helicopter on the Snap! stage with an external micro:bit microcontroller (using the Snap! MicroBlocks library):

As the speed of the helicopter increases, I would like to increase the playback rate (i.e., with respect to samples per second) that the Helicopter Sound is played back. This would simulate the increased rotor speed of a helicopter. The way that I have currently achieved this is clumsy:

There's a certain amount of jitter in the output from the potentiometer attached to the microcontroller that I'm using to control the speed. Therefore, my initial thought was that if the user turns the dial attached to the potentiometer by more than a certain amount (5, 10 ... ?) so that I'm sure it is an intentional increase by the user and not just a random fluctuation, I will stop all sounds and then restart the sound at the increased playback rate.

This works, but not very well. Among other problems, the on-going interruption of the sound creates a picket-fencing effect - like the sound that you hear if you're listening to a sound as you go by a picket fence.

I'm searching for a more satisfactory solution. The search for a block would enable me to know when the sound ends so that I can restart it when necessary. But that won't address the more serious flaw.

As far as I know, there's no way to adjust the playback feed of a sound on the fly once the [Play Sound] command is issued. This project will be used by novices who are new to coding Snap!, so to make the project usable, I need a strategy that is ideally transparent and that can be understood by someone new to coding.

Hope this explain the larger context. Thanks for any ideas or suggestions that you might have.

How did you even remember that loll

A few years ago I delved into this when I developed a project involving creation of a sound editing program in Snap! However, that was some time ago, and I have forgotten a good bit of what I discovered about sound at that time.

you can find the length of the sound at any frequency like this:
untitled script pic

That's a good idea. I could set a timer for the length of the sound at a given rate and use that to check on when the sound will elapse. Thanks for the suggestion!

This worked well:

Thanks for the suggestion!

Here's a version of the Helicopter Animation that uses arrow keys for controls: