1 (edited by crispynuggat 2026-01-24 18:48:48)

Topic: Feature Request: One-Shot / Trigger Mode for Sound Element

I would like to request a feature improvement for the Sound element.

Currently, to play a sound, the sound ID must be held in the variable and then manually set back to 0 to stop or reset it. This makes it difficult to trigger "one-shot" sounds, such as a voice counting down.

Requested Feature:

An option in the element settings for a "Trigger Mode." In this mode, the app would play the sound effect exactly once when the ID is received, without requiring the controller to reset the variable to 0. This would allow us to simply "fire and forget" a sound command.

2

Re: Feature Request: One-Shot / Trigger Mode for Sound Element

You're right, a one-time sound signal is needed. But what you're proposing won't work.
For example, you set a variable's value from 0 to 1, and the sound plays once. The question is, how do you trigger the sound to play again?
If you simply reset the variable to 0 and then set it back to 1 in your code, the change will likely not reach the application.
We'll do this differently.

3

Re: Feature Request: One-Shot / Trigger Mode for Sound Element

I requested just this a long time ago....

I had the idea then that the remote app could reset the sound variable to zero after the sound had played to its finish, doing so would allow the sketch to monitor this variable and know that the sound event had finished.

2B, or not 2B, that is the pencil ...