Version 7 (modified by 15 years ago) ( diff ) | ,
---|
Table of Contents
Beeper
The beeper device /dev/cardbeep accepts formatted strings containing various notes to play. The following notes are supported:
Note | Octave | Frequency (Hz) |
C | 5 | 523.25 |
D | 5 | 587.33 |
E | 5 | 659.26 |
F | 5 | 698.46 |
G | 5 | 783.99 |
A | 5 | 880 |
B | 5 | 987.77 |
C | 6 | 1046.5 |
E | 6 | 1318.5 |
G | 6 | 1568 |
A | 6 | 1760 |
C | 7 | 2093 |
D | 7 | 2349.3 |
E | 7 | 2637 |
A string can be formatted to send to the device in the format:
<duration><note><octave> * duration * 1 – 8, note = 1/duration * 1 = whole (1/1) note * 4 = quarter (1/4) note * 8 = eighth (1/8) note * note - letter from above table * octave - number from above table
Commas are used to separate note information, for example:
4A5,8E6
Plays a 1/4 note A in octave five then a 1/8 note E in octave 6.
The default octave may be set by:
O<octave>
Example:
O5,A,B,C
Sets the default octave to 5 then plays note A, B, and C.
The tempo may be set by:
T<tempo>
tempo must be three characters numeric
Example:
T100,A,B
Sets the tempo to 100 then plays note A and B.
Note:
See TracWiki
for help on using the wiki.