Synth with C64 like sounds. Played on two piezo buzzers with a PS/2 keyboard. Implemented on FRDM-KL46Z
Dependencies: PS2 TSI beep2 mbed
Diff: C64Synth.cpp
- Revision:
- 3:2cd5dfcad0e6
- Parent:
- 2:a8ec77eed4cc
- Child:
- 4:0f73a5d06177
--- a/C64Synth.cpp Fri Jan 24 10:05:00 2014 +0000 +++ b/C64Synth.cpp Fri Jan 24 10:07:44 2014 +0000 @@ -1,4 +1,5 @@ -/* + +/** * C64Synth uses a PS/2 keyboard to play C64 arps and simple tones. * Implemented on a FRDM KL46Z board * @@ -265,7 +266,7 @@ //TONE HANDLER if (toneOn> 0) { - playContNote(playtone,octave,0.9,0.1); + playContNote(playtone,octave,0.9); } else { keytone = ' '; playtone = ' '; @@ -285,7 +286,7 @@ } } -/* -- PlayArp -- +/** -- PlayArp -- * * Plays an arpeggio of the provided chord. Arp speed can be controlled by touch slider or pgup/pgdown setting. PWM duty cycle is sweeped automatically * @@ -316,14 +317,14 @@ } } -/* -- PlayNote -- +/** -- PlayNote -- * -* @description: Plays a note on the provided buzzer +* Plays a note on the provided buzzer * * @param buz the buzzer to play the note on, * @param note the note to be played * @param dc the duty cycle value -* @param the length of the note +* @param len the length of the note * */ void playNote(Beep buz, char note,float dc,float len) @@ -338,13 +339,13 @@ } -/* -- PlayContNote -- +/** -- PlayContNote -- * * Plays a continuous note on the second buzzer * * @param note the note to be played * @param oct the octave - @param dc the duty cycle of the note +* @param dc the duty cycle of the note */ void playContNote(char note,int oct,float dc) { @@ -363,7 +364,7 @@ lastNote = note; } -/* +/** * * Gets the notes in a chord * @@ -407,7 +408,7 @@ } -/* +/** * * Gets the frequency of the note *