]> git.sesse.net Git - pitch/blob - notes.h
Set the default back to guitar tuning (there was a commit mistake).
[pitch] / notes.h
1 #ifndef _NOTES_H
2 #define _NOTES_H 1
3
4 #include <math.h>
5
6 #include "config.h"
7
8 struct note {
9         char notename[16];
10         double freq;
11 };
12
13 #if TUNING == WELL_TEMPERED_GUITAR
14 static note notes[] = {
15         { "E-3", BASE_PITCH/4.0 * (3.0/4.0) },
16         { "A-3", BASE_PITCH/4.0 },
17         { "D-4", BASE_PITCH/4.0 * (4.0/3.0) },
18         { "G-4", BASE_PITCH/4.0 * (4.0/3.0)*(4.0/3.0) },
19         { "B-4", BASE_PITCH * (3.0/4.0)*(3.0/4.0) },
20         { "E-5", BASE_PITCH * (3.0/4.0) }
21 };
22 #else
23 static note notes[] = {
24         { "E-3", BASE_PITCH/4.0 * pow(2.0, -5.0/12.0) },
25         { "A-3", BASE_PITCH/4.0 },
26         { "D-4", BASE_PITCH/4.0 * pow(2.0, 5.0/12.0) },
27         { "G-4", BASE_PITCH/4.0 * pow(2.0, 10.0/12.0) },
28         { "B-4", BASE_PITCH/2.0 * pow(2.0, 2.0/12.0) },
29         { "E-5", BASE_PITCH/2.0 * pow(2.0, 7.0/12.0) },
30 };
31 #endif
32                 
33 #endif /* !defined(_NOTES_H) */