AVRly - AVR Development Resources
scale.h
Go to the documentation of this file.
1
/******************************************************************************
2
@copyright Copyright © 2022 by Jason Duffy.
3
4
Permission is hereby granted, free of charge, to any person obtaining a copy
5
of this software and associated documentation files (the "Software"), to deal
6
in the Software without restriction, including without limitation the rights
7
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8
copies of the Software, and to permit persons to whom the Software is
9
furnished to do so, subject to the following conditions:
10
11
The above copyright notice and this permission notice shall be included in all
12
copies or substantial portions of the Software.
13
14
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20
SOFTWARE.
21
******************************************************************************/
22
23
/**
24
* @file scale.h
25
* @ingroup am_radio
26
* @author Jason Duffy
27
* @date 10th September 2022
28
* @brief Contains the count values required for the note pitches to work at
29
* 8MHZ F_CPU
30
*/
31
32
#ifndef SCALE_DOT_H
33
#define SCALE_DOT_H
34
35
/**
36
* Enum to expose the count values required to generate the pitches.
37
*/
38
typedef
enum
39
{
40
C0 = 10000,
41
Cx0 = 9439,
42
D0 = 8909,
43
Dx0 = 8409,
44
E0 = 7937,
45
F0 = 7492,
46
Fx0 = 7071,
47
G0 = 6674,
48
Gx0 = 6300,
49
A0 = 5946,
50
Ax0 = 5612,
51
B0 = 5297,
52
C1 = 5000,
53
Cx1 = 4719,
54
D1 = 4454,
55
Dx1 = 4204,
56
E1 = 3969,
57
F1 = 3746,
58
Fx1 = 3536,
59
G1 = 3337,
60
Gx1 = 3150,
61
A1 = 2973,
62
Ax1 = 2806,
63
B1 = 2649,
64
C2 = 2500,
65
Cx2 = 2360,
66
D2 = 2227,
67
Dx2 = 2102,
68
E2 = 1984,
69
F2 = 1873,
70
Fx2 = 1768,
71
G2 = 1669,
72
Gx2 = 1575,
73
A2 = 1487,
74
Ax2 = 1403,
75
B2 = 1324,
76
C3 = 1250,
77
Cx3 = 1180,
78
D3 = 1114,
79
Dx3 = 1051,
80
E3 = 992,
81
F3 = 936,
82
Fx3 = 884,
83
G3 = 834,
84
Gx3 = 787,
85
A3 = 743,
86
Ax3 = 702,
87
B3 = 662,
88
}
note_pitch_t
;
89
90
#endif
// SCALE_DOT_H
91
92
93
// End of file. //
94
note_pitch_t
note_pitch_t
Enum to expose the count values required to generate the pitches.
Definition:
scale.h:39
content
modules
avr-peripheral-features
timer-counter
am-radio-transmitter
example
scale.h
Generated by
1.9.4