A MIDI piano synthesizer that implements the Karplus Strong physical modeling algorithm.
Dependencies: mbed USBDevice PinDetect
Constants.h@19:894c31ee9ad4, 2016-04-21 (annotated)
- Committer:
- asuszek
- Date:
- Thu Apr 21 01:56:20 2016 +0000
- Revision:
- 19:894c31ee9ad4
- Parent:
- 18:26d93c5b9bb6
- Child:
- 20:bf675ba2c454
Changed velocity on Karplus Strong to control filter cutoff instead of velocity.
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 | 19:894c31ee9ad4 | 17 | const float STRING_DAMPING_MIN = 0.1; |
asuszek | 19:894c31ee9ad4 | 18 | const float STRING_DAMPING_MAX = 0.7; |
asuszek | 15:aa5a4c350251 | 19 | const float STRING_DAMPING_VARIATION = 0.35; |
asuszek | 19:894c31ee9ad4 | 20 | |
asuszek | 15:aa5a4c350251 | 21 | const float CHARACTER_VARIATION = 0.5; |
asuszek | 16:b25ca34a705f | 22 | const float PLUCK_DAMPING = 0.5; |
asuszek | 16:b25ca34a705f | 23 | const float PLUCK_DAMPING_VARIATION = 0.25; |
asuszek | 2:e21bd39bdf46 | 24 | |
asuszek | 2:e21bd39bdf46 | 25 | } // namespace C |
asuszek | 2:e21bd39bdf46 | 26 | |
asuszek | 2:e21bd39bdf46 | 27 | #endif |