A MIDI piano synthesizer that implements the Karplus Strong physical modeling algorithm.
Dependencies: mbed USBDevice PinDetect
Constants.h@6:688698f814c0, 2016-04-12 (annotated)
- Committer:
- asuszek
- Date:
- Tue Apr 12 20:37:08 2016 +0000
- Revision:
- 6:688698f814c0
- Parent:
- 2:e21bd39bdf46
- Child:
- 13:bb0ec927e458
Created Audio Engine and Synthesizer class. It is now a fully working MIDI synth with the following simple waveforms: sine, triangle, square, and saw.
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
asuszek | 2:e21bd39bdf46 | 1 | |
asuszek | 2:e21bd39bdf46 | 2 | #ifndef AS_CONSTANTS_H |
asuszek | 2:e21bd39bdf46 | 3 | #define AS_CONSTANTS_H |
asuszek | 2:e21bd39bdf46 | 4 | |
asuszek | 6:688698f814c0 | 5 | //#define DEBUG |
asuszek | 6:688698f814c0 | 6 | #define USE_PWM true |
asuszek | 2:e21bd39bdf46 | 7 | |
asuszek | 2:e21bd39bdf46 | 8 | /* A namespace for all global constants. |
asuszek | 2:e21bd39bdf46 | 9 | * Access using C::VAR_NAME |
asuszek | 2:e21bd39bdf46 | 10 | */ |
asuszek | 2:e21bd39bdf46 | 11 | namespace C { |
asuszek | 2:e21bd39bdf46 | 12 | |
asuszek | 2:e21bd39bdf46 | 13 | const int SAMPLE_RATE = 44100; |
asuszek | 2:e21bd39bdf46 | 14 | const int MAX_POLYPHONY = 4; |
asuszek | 2:e21bd39bdf46 | 15 | const int MIN_FREQUENCY = 110; |
asuszek | 2:e21bd39bdf46 | 16 | |
asuszek | 2:e21bd39bdf46 | 17 | } // namespace C |
asuszek | 2:e21bd39bdf46 | 18 | |
asuszek | 2:e21bd39bdf46 | 19 | #endif |