Changes between Version 3 and Version 4 of Docs/825gen2/Dev/Devices/Beeper


Ignore:
Timestamp:
09/18/24 12:59:29 (2 months ago)
Author:
Don Wilson
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Docs/825gen2/Dev/Devices/Beeper

    v3 v4  
    22
    33A built-in beeper is provided that beeps when touchscreen buttons are pressed, or based on app control.
     4
     5The beeper device /dev/cardbeep accepts formatted strings containing various notes to play. The following notes are supported:
     6||'''Note'''||'''Octave'''||'''Frequency (Hz)'''||
     7||C||5||523.25||
     8||D||5||587.33||
     9||E||5||659.26||
     10||F||5||698.46||
     11||G||5||783.99||
     12||A||5||880||
     13||B||5||987.77||
     14||C||6||1046.5||
     15||E||6||1318.5||
     16||G||6||1568||
     17||A||6||1760||
     18||C||7||2093||
     19||D||7||2349.3||
     20||E||7||2637||
     21
     22A string can be formatted to send to the device in the format:
     23{{{
     24
     25<duration><note><octave>
     26 * duration
     27  * 1 – 8, note = 1/duration
     28   * 1 = whole (1/1) note
     29   * 4 = quarter (1/4) note
     30   * 8 = eighth (1/8) note
     31 * note - letter from above table
     32 * octave - number from above table
     33}}}
     34
     35Commas are used to separate note information, for example:
     36{{{
     374A5,8E6
     38}}}
     39Plays a 1/4 note A in octave five then a 1/8 note E in octave 6.
     40
     41The default octave may be set by:
     42{{{
     43O<octave>
     44}}}
     45
     46Example:
     47{{{
     48O5,A,B,C
     49}}}
     50Sets the default octave to 5 then plays note A, B, and C.
     51
     52The tempo may be set by:
     53{{{
     54T<tempo>
     55}}}
     56''tempo must be three characters numeric'''
     57
     58Example:
     59{{{
     60T100,A,B
     61}}}
     62Sets the tempo to 100 then plays note A and B.
     63
     64Refer to the lib825ev library functions for sound output.
     65http://tech.825spectrum.com/trac/wiki/Docs/Prog/Manual/ApplicationLibraries/lib825ev/KeypadSound#KeypadSoundFunctions
     66
     67