Tone Alarm Driver

The tone alarm driver can play QBasic PLAY / ANSI music strings and drives a piezo buzzer depending on the frequency of the note.

The default tunes are stored in the tone_alarm driver file, but any tune can be played with a simple console command:


Note that in order to be recognised, a sequence passed to the tone_alarm command must begin with 'M'. ANSI music files typically also contain escape sequences at the beginning and end of the file that need to be removed before playing (as otherwise they tend to confuse the player).

The default meaning of the different tunes is:

Index Short name Description
0 STOP Stops the current tune
1 BOOT 'PX4 startup sound'. Is auto-played by the tone alarm driver on system startup
2 BATT_LOW The battery is low, but not fully empty. Running on reserve.
3 BATT_EMPTY The battery is completely flat, the system is not able to maintain safe flight.
4 CMD_ACK The last command has been accepted
5 CMD_REJ The last command has been rejected
6 POS_LOCK The position estimator obtained a valid position (emitted once on first lock)
7 ARMING Emitted on the transition to armed
8 DISARMING Emitted on the transition to disarmed
9 EMERGENCY General, potentially fatal error. NOT due to battery. Land immediately.

Creating new Alarm Tunes

ANSI music was popular in the days of ANSI BBS systems, and so the best editing tools are DOS utilities. One excellent option is Melody Master combined with DosBox.

  1. Download Dosbox and install the app
  2. Create a new directory in your home directory, e.g. dosprogs, and unzip Melody Master to it
  3. Mount the directory in dos with
mount c ~/dosprogs
  1. Start Melody Master with:
  cd melody21


Translations of this page:

Quick Links

QR Code: URL of current page