| 4 | The beeper device /dev/cardbeep accepts formatted strings containing various notes to play. The following notes are supported: |
| 5 | ||'''Note'''||'''Octave'''||'''Frequency (Hz)'''|| |
| 6 | ||C||5||523.25|| |
| 7 | ||D||5||587.33|| |
| 8 | ||E||5||659.26|| |
| 9 | ||F||5||698.46|| |
| 10 | ||G||5||783.99|| |
| 11 | ||A||5||880|| |
| 12 | ||B||5||987.77|| |
| 13 | ||C||6||1046.5|| |
| 14 | ||E||6||1318.5|| |
| 15 | ||G||6||1568|| |
| 16 | ||A||6||1760|| |
| 17 | ||C||7||2093|| |
| 18 | ||D||7||2349.3|| |
| 19 | ||E||7||2637|| |
| 20 | |
| 21 | A string can be formatted to send to the device in the format: |
| 22 | {{{ |
| 23 | |
| 24 | <duration><note><octave> |
| 25 | * duration |
| 26 | * 1 – 8, note = 1/duration |
| 27 | * 1 = whole (1/1) note |
| 28 | * 4 = quarter (1/4) note |
| 29 | * 8 = eighth (1/8) note |
| 30 | * note - letter from above table |
| 31 | * octave - number from above table |
| 32 | }}} |
| 33 | |
| 34 | Commas are used to separate note information, for example: |
| 35 | {{{ |
| 36 | 4A5,8E6 |
| 37 | }}} |
| 38 | Plays a 1/4 note A in octave five then a 1/8 note E in octave 6. |
| 39 | |
| 40 | The default octave may be set by: |
| 41 | {{{ |
| 42 | O<octave> |
| 43 | }}} |
| 44 | |
| 45 | Example: |
| 46 | {{{ |
| 47 | O5,A,B,C |
| 48 | }}} |
| 49 | Sets the default octave to 5 then plays note A, B, and C. |
| 50 | |
| 51 | The tempo may be set by: |
| 52 | {{{ |
| 53 | T<tempo> |
| 54 | }}} |
| 55 | ''tempo must be three characters numeric''' |
| 56 | |
| 57 | Example: |
| 58 | {{{ |
| 59 | T100,A,B |
| 60 | }}} |
| 61 | Sets the tempo to 100 then plays note A and B. |
| 62 | |
| 63 | [[Top]] |