old demo that i want to try in mbed studio
Dependencies: mbed SDFileSystem_Copy_of_mbed_version I2S
Diff: NotchingDemo.cpp
- Branch:
- LargeFile_Tests
- Revision:
- 65:8b6a4e307941
- Parent:
- 64:6061ffe25985
- Child:
- 66:edf370edd21c
--- a/NotchingDemo.cpp Sun Sep 29 19:57:01 2019 +0000 +++ b/NotchingDemo.cpp Sun Sep 29 19:58:24 2019 +0000 @@ -43,6 +43,50 @@ I2S i2s(I2S_TRANSMIT, p5, p6, p7); SDFileSystem sd(p11, p12, p13, p8, "sd"); // the new pinout that i am using +class classFade +{ +public: + + float powerval; + float FadeIteration; + float DecayFactor; + float Denom; + float FadeCoeff; + float Natural_Exp; + int LengthSecs; + int Length; + + //member Functions + float FadeOut(void) + { + powerval = -FadeIteration/Denom; + if (FadeIteration >=Length) { + FadeCoeff = 0; + + } else { + FadeCoeff = (Length - FadeIteration)/Length; + } + FadeIteration = FadeIteration + 1; + return FadeCoeff; + + } + float FadeIn(void) + { + powerval = FadeIteration/Denom; + if (FadeIteration >=Length) { + FadeCoeff = 1; + + } else { + FadeCoeff = FadeIteration/Length; + } + + FadeIteration = FadeIteration + 1; + return FadeCoeff; + + } +}; + + typedef struct uFMT_STRUCT { short comp_code; short num_channels;