A MIDI piano synthesizer that implements the Karplus Strong physical modeling algorithm.
Dependencies: mbed USBDevice PinDetect
Constants.h@18:26d93c5b9bb6, 2016-04-21 (annotated)
- Committer:
- asuszek
- Date:
- Thu Apr 21 01:41:13 2016 +0000
- Revision:
- 18:26d93c5b9bb6
- Parent:
- 16:b25ca34a705f
- Child:
- 19:894c31ee9ad4
Added a counter to show what instrument you are on.
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 | 13:bb0ec927e458 | 13 | const int SAMPLE_RATE = 22050; |
asuszek | 2:e21bd39bdf46 | 14 | const int MAX_POLYPHONY = 4; |
asuszek | 18:26d93c5b9bb6 | 15 | const int MIN_FREQUENCY = 55; |
asuszek | 13:bb0ec927e458 | 16 | |
asuszek | 13:bb0ec927e458 | 17 | const float STRING_DAMPING = 0.7; |
asuszek | 15:aa5a4c350251 | 18 | const float STRING_DAMPING_VARIATION = 0.35; |
asuszek | 15:aa5a4c350251 | 19 | const float CHARACTER_VARIATION = 0.5; |
asuszek | 16:b25ca34a705f | 20 | const float PLUCK_DAMPING = 0.5; |
asuszek | 16:b25ca34a705f | 21 | const float PLUCK_DAMPING_VARIATION = 0.25; |
asuszek | 2:e21bd39bdf46 | 22 | |
asuszek | 2:e21bd39bdf46 | 23 | } // namespace C |
asuszek | 2:e21bd39bdf46 | 24 | |
asuszek | 2:e21bd39bdf46 | 25 | #endif |