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.
Diff: main.cpp
- Revision:
- 4:1d2a699c95c7
- Parent:
- 3:83ac767f3a63
- Child:
- 5:ac5c4bd3ef4b
--- a/main.cpp Tue Nov 28 23:27:34 2017 +0000 +++ b/main.cpp Wed Nov 29 02:34:59 2017 +0000 @@ -42,15 +42,14 @@ #define numKeys 49 #define PI M_PI -//possible constants -int carrierIncrements[numKeys]; -/* -going to build table here later. -*/ +//constants +const int carrierIncrements[] = {107, 113, 120, 127, 135, 143, 151, 160, 170, + 180, 190, 202, 214, 227, 240, 254, 270, 286, 303, 321, 340, 360, 381, 404, + 428, 454, 481, 509, 540, 572, 606, 642, 680, 720, 763, 809, 857, 908, 962, + 1019, 1080, 1144, 1212, 1284, 1360, 1441, 1527, 1618, 1714}; const int attackLimit = (0x1 << 16) - 1; const int fixed2Pi = (int) ((2.0 * PI) * (0x1 << 16)); - //non-constants //Most of these will be recalculated or reset on every input cycle of the main // loop, as appropriate