
Bluetooth Enabled Keyboard/Synthesizer for mbed
Dependencies: mbed 4DGL-uLCD-SE SDFileSystem mbed-rtos
Diff: Speaker.h
- Revision:
- 23:cf9d43d5a5b4
- Parent:
- 21:0df25c61c475
--- a/Speaker.h Sat Apr 30 21:54:33 2016 +0000 +++ b/Speaker.h Sat Apr 30 23:01:52 2016 +0000 @@ -8,10 +8,10 @@ } // class method to play a note based on AnalogOut class - void PlayNote(float frequency, float duration, float volume, short unsigned Analog_out_data[32]) { + void PlayNote(float frequency, float duration, float coefficientMatrix[32], short unsigned Analog_out_data[32]) { // scale samples using current volume level arg for(int k=0; k<32; k++) { - Analog_scaled_data[k] = Analog_out_data[k] * volume; + Analog_scaled_data[k] = Analog_out_data[k] * coefficientMatrix[k]; } // reset to start of sample array i=0;