Buzzer/Sounder Commands

buzz-note

Buzzes a note using the onboard peizo sounder.

Usage:

buzz-note note_or_tone_freq duration_ms [rest_ms] [volume]
Parameter Description
note_or_tone_freq If < 128, the midi note number. Otherwise the clock-divided tone frequency to buzz.
duration_ms Time in milliseconds to sustain note. Use -1 to sustain indefinitely.
[rest_ms] Optional time to rest after note is finished. (-1: indefinite, default: 0ms).
[volume] 1 Optional volume/timbre of the note. (off: 0, max: 100, default: 100)

buzz-song

Plays a song file from the "songs" folder.

Usage:

buzz-song song_file [repeat] [volume] [tempo_x] [note_delta]
Parameter Description
song_file The name of the song file within the "songs" folder to play..
[repeat] Optional number of times to repeat. (default: 0)
[volume]1 Optional volume to playback at. (off: 0, max: 100, default: 100)
[tempo_x] Optional tempo adjustment multiplier, specified as a float. (min: 0.25, max: 4)
[note_delta] Optional note adjustment. (default: 0, min: -12, max: 12)


1 Because of the buzzer's wacky frequency distribution and the magic of resonant frequencies, the volume parameter does not affect the perceived volume in an expected way. Treat it more like a "timbre" adjustment parameter.

results matching ""

    No results matching ""