Changes between Version 5 and Version 6 of Docs/Prog/Manual/ApplicationLibraries/lib825ev/KeypadSound/PlayNotes
- Timestamp:
- 02/18/11 13:52:08 (14 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Docs/Prog/Manual/ApplicationLibraries/lib825ev/KeypadSound/PlayNotes
v5 v6 31 31 Octave 7 - C, D, E 32 32 33 Beeper Frequencies - 33 The beeper device /dev/cardbeep accepts formatted strings containing various notes to play. The following notes are supported: 34 ||'''Note'''||'''Octave'''||'''Frequency (Hz)'''|| 35 ||C||5||523.25|| 36 ||D||5||587.33|| 37 ||E||5||659.26|| 38 ||F||5||698.46|| 39 ||G||5||783.99|| 40 ||A||5||880|| 41 ||B||5||987.77|| 42 ||C||6||1046.5|| 43 ||E||6||1318.5|| 44 ||G||6||1568|| 45 ||A||6||1760|| 46 ||C||7||2093|| 47 ||D||7||2349.3|| 48 ||E||7||2637|| 34 49 35 C5 = 523.25Hz 50 A string can be formatted to send to the device in the format: 51 {{{ 36 52 37 D5 = 587.33Hz 53 <duration><note><octave> 54 * duration 55 * 1 – 8, note = 1/duration 56 * 1 = whole (1/1) note 57 * 4 = quarter (1/4) note 58 * 8 = eighth (1/8) note 59 * note - letter from above table 60 * octave - number from above table 61 }}} 38 62 39 E5 = 659.26Hz 63 Commas are used to separate note information, for example: 64 {{{ 65 4A5,8E6 66 }}} 67 Plays a 1/4 note A in octave five then a 1/8 note E in octave 6. 40 68 41 F5 = 698.46Hz 69 The default octave may be set by: 70 {{{ 71 O<octave> 72 }}} 42 73 43 G5 = 783.99Hz 74 Example: 75 {{{ 76 O5,A,B,C 77 }}} 78 Sets the default octave to 5 then plays note A, B, and C. 44 79 45 A5 = 880.00Hz 80 The tempo may be set by: 81 {{{ 82 T<tempo> 83 }}} 84 ''tempo must be three characters numeric''' 46 85 47 B5 = 987.77Hz 48 49 C6 = 1046.50Hz 50 51 E6 = 1318.50Hz 52 53 G6 = 1568.00Hz 54 55 A6 = 1760.00Hz 56 57 C7 = 2093.00Hz 58 59 D7 = 2349.30Hz 60 61 E7 = 2637.00Hz 86 Example: 87 {{{ 88 T100,A,B 89 }}} 90 Sets the tempo to 100 then plays note A and B. 62 91 63 92 == Examples ==