Changes between Version 1 and Version 2 of Docs/Prog/Manual/DeviceSupport/Beeper


Ignore:
Timestamp:
11/30/09 09:25:42 (14 years ago)
Author:
Don Wilson
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Docs/Prog/Manual/DeviceSupport/Beeper

    v1 v2  
    22
    33== Beeper ==
     4The 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
     21A 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
     34Commas are used to separate note information, for example:
     35{{{
     364A5,8E6
     37}}}
     38Plays a 1/4 note A in octave five then a 1/8 note E in octave 6.
     39
     40The default octave may be set by:
     41{{{
     42O<octave>
     43}}}
     44
     45Example:
     46{{{
     47O5,A,B,C
     48}}}
     49Sets the default octave to 5 then plays note A, B, and C.
     50
     51The tempo may be set by:
     52{{{
     53T<tempo>
     54}}}
     55''tempo must be three characters numeric'''
     56
     57Example:
     58{{{
     59T100,A,B
     60}}}
     61Sets the tempo to 100 then plays note A and B.
     62
     63[[Top]]