Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: mbed USBDevice PinDetect
Diff: Audio/KarplusStrong.h
- Revision:
- 15:aa5a4c350251
- Parent:
- 13:bb0ec927e458
- Child:
- 16:b25ca34a705f
diff -r 262db57746d9 -r aa5a4c350251 Audio/KarplusStrong.h
--- a/Audio/KarplusStrong.h Sun Apr 17 21:38:57 2016 +0000
+++ b/Audio/KarplusStrong.h Sun Apr 17 21:59:03 2016 +0000
@@ -52,6 +52,9 @@
static float getRand() {
return float(rand()) / float(RAND_MAX);
};
+ static float getRandSample() {
+ return 1.0 - 2.0 * getRand();
+ };
float lastOutput;
float filterCoefficient;
