Built in Sounds - piggei/wled-usermod-buzzer GitHub Wiki

v0.2.0 retains the qualified v0.1.1 sound IDs and presents them alphabetically in the configuration UI.

ID UI label Intended use Backends
alarm Alarm Repeating alarm pattern Active / Passive / Audio
attention Attention Attention indication Active / Passive / Audio
beep Beep Generic short indication Active / Passive / Audio
connect Connect Connection established Active / Passive / Audio
disconnect Disconnect Connection ended Active / Passive / Audio
double_beep Double Beep Generic two-pulse indication Active / Passive / Audio
error Error Low two-tone error indication Active / Passive / Audio
fail Fail Failure cue Active / Passive / Audio
imperial_march Imperial March Music cue Audio only
notification Notification Short notification Active / Passive / Audio
star_wars Star Wars Melody cue Active / Passive / Audio
success Success Positive result Active / Passive / Audio
triple_beep Triple Beep Alarm-style three-pulse indication Active / Passive / Audio
trumpet Trumpet Trumpet music cue Audio only
victory Victory Short victory fanfare Active / Passive / Audio
wakeup Wake Up Wake-up music cue Audio only
warning Warning Warning indication Active / Passive / Audio
yankee_doodle Yankee Doodle Melody cue Active / Passive / Audio

Active vs passive reproduction

The same registry is used for both hardware types.

On a passive buzzer, each entry contains frequency, note duration and following gap, so the intended melody is reproduced.

On an active buzzer, pitch is ignored because the hardware generates its own tone. The same definitions are reduced to their on/off rhythm.

Audio (I2S) sample-backed sounds

With the optional Waveshare audio profile, fifteen IDs use embedded PCM samples on the Audio backend: alarm, attention, connect, disconnect, error, fail, imperial_march, notification, star_wars, success, trumpet, victory, wakeup, warning, and yankee_doodle. The common beep, double_beep, and triple_beep remain synthesized tones. Active and Passive reproduction of the original 15 common sounds remains unchanged.

star_wars stores one theme loop per execution. The existing repeat and loop controls repeat the complete execution rather than embedding duplicate copies inside the sample.

Backend capabilities and Audio-only sounds

Each registry entry carries a backend capability mask. The original 15 public sounds remain available on all three backends.

imperial_march, trumpet, and wakeup are the first Audio-only entries. They are compiled only when the optional audio/sample feature is enabled, are shown only while Audio (I2S) is selected, and do not appear in Active/Passive-only or no-samples firmware. A known sound requested through the Web API on an unsupported backend returns HTTP 409 rather than being approximated with an unrelated buzzer pattern.

The Sound dropdown is sorted alphabetically after backend filtering.

API stability

Use the sound ID, not the display label, in integrations:

victory
alarm
notification

The string IDs are the public interface and should remain stable even if a melody is tuned in a later version.

Validation status

All 15 common buzzer-note sounds have received explicit hardware approval on the passive-buzzer test setup:

beep, double_beep, triple_beep, notification, success, victory, yankee_doodle, fail, star_wars, warning, error, connect, disconnect, attention, and alarm.

Basic active-buzzer playback has also been validated on real hardware. Active buzzers intentionally reproduce rhythm only. The three Audio-only entries have been verified on Waveshare hardware, and an ESP32-C3 build has been verified not to expose them.

Repeat and loop separation

Every built-in sound has a non-zero final gapMs. BuzzerEngine applies that final gap only when another complete execution follows, either through finite repeat=N playback or infinite loop=1.

This means one-shot playback is unchanged: the sound stops immediately after its final audible note. Repeated playback receives an intentional silent pause between complete executions so that short beeps and longer melodies do not run into each other.

The current inter-execution gaps are:

ID Final gap
alarm 180 ms
attention 300 ms
beep 200 ms
connect 250 ms
disconnect 250 ms
double_beep 250 ms
error 300 ms
fail 350 ms
notification 250 ms
star_wars 400 ms
success 300 ms
triple_beep 550 ms
victory 100 ms
warning 250 ms
yankee_doodle 400 ms

Audio-only proxy timing uses a 300 ms inter-execution gap for imperial_march, trumpet, and wakeup. The victory PCM proxy preserves the existing 100 ms final gap.

v0.2.0 audio level adjustment

The victory PCM sample is attenuated to 35% of its original amplitude (about -9.1 dB) for closer perceived-level matching with the other bundled audio cues. The Active/Passive fallback melody is unchanged.