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.
LUTs/LUTS.cpp@7:33cb5f2db1ee, 2020-05-05 (annotated)
- Committer:
- lukeocarwright
- Date:
- Tue May 05 14:32:04 2020 +0000
- Revision:
- 7:33cb5f2db1ee
- Child:
- 9:f6ba53e355a0
Added initial GUI for front and sorted menu bug
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
lukeocarwright | 7:33cb5f2db1ee | 1 | #include "mbed.h" |
lukeocarwright | 7:33cb5f2db1ee | 2 | #include "LUTs.h" |
lukeocarwright | 7:33cb5f2db1ee | 3 | |
lukeocarwright | 7:33cb5f2db1ee | 4 | LUTs::LUTs() |
lukeocarwright | 7:33cb5f2db1ee | 5 | { |
lukeocarwright | 7:33cb5f2db1ee | 6 | } |
lukeocarwright | 7:33cb5f2db1ee | 7 | LUTs::~LUTs() |
lukeocarwright | 7:33cb5f2db1ee | 8 | { |
lukeocarwright | 7:33cb5f2db1ee | 9 | } |
lukeocarwright | 7:33cb5f2db1ee | 10 | |
lukeocarwright | 7:33cb5f2db1ee | 11 | |
lukeocarwright | 7:33cb5f2db1ee | 12 | void LUTs::sin_wavetable() |
lukeocarwright | 7:33cb5f2db1ee | 13 | { |
lukeocarwright | 7:33cb5f2db1ee | 14 | printf("Generating Wavetable \n"); |
lukeocarwright | 7:33cb5f2db1ee | 15 | for (int i=0; i<4096; i++) { |
lukeocarwright | 7:33cb5f2db1ee | 16 | sin_d[i] = 0.5f*sin(2.0f*PI*(i/4096.0f)); |
lukeocarwright | 7:33cb5f2db1ee | 17 | wavtable[i]= sin_d[i]+0.5; //generates wave table 0<1 in double |
lukeocarwright | 7:33cb5f2db1ee | 18 | //printf("wav[i]= %f \n", wavtable[i]); // Used for Debug |
lukeocarwright | 7:33cb5f2db1ee | 19 | } |
lukeocarwright | 7:33cb5f2db1ee | 20 | } |