-
Notifications
You must be signed in to change notification settings - Fork 0
/
octave.asm
112 lines (107 loc) · 4.35 KB
/
octave.asm
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
;;; (k) ALL RIGHTS REVERSED - Reprint what you like
;;; Octave in DE
octave.set:
ld hl, _base_octave
ld (hl), e
inc hl
ld (hl), d
ret
;;; Base octave for songs.
;;; Call set_octave to set it.
_base_octave:
dw octave.A1
;;; Octaves starting at A1 (on piano) up to A7
;;; Generated by freqs.c (JUST scale, key in A).
;;; One octave = 12 semitones * 4 bytes = 48 bytes = $30 hex
;;; See freqs.c for info about calculating HL/DE values.
octave.A1:
dw $1ef5, $0037 ; 0, 55.000 Hz, Unison
dw $1db7, $0039 ; 0, 57.292 Hz, Minor Second
dw $1b81, $003e ; 0, 61.875 Hz, Major Second
dw $19c7, $0042 ; 0, 66.000 Hz, Minor Third
dw $18be, $0045 ; 0, 68.750 Hz, Major Third
dw $1730, $0049 ; 0, 73.333 Hz, Fourth
dw $15fb, $004d ; 0, 77.344 Hz, Diminished Fifth
dw $149a, $0052 ; 0, 82.500 Hz, Fifth
dw $134e, $0058 ; 0, 88.000 Hz, Minor Sixth
dw $1287, $005c ; 0, 91.667 Hz, Major Sixth
dw $1126, $0063 ; 0, 99.000 Hz, Minor Seventh
dw $1075, $0067 ; 0, 103.125 Hz, Major Seventh
octave.A2:
dw $0f6c, $006e ; 1, 110.000 Hz, Unison
dw $0ecd, $0073 ; 1, 114.583 Hz, Minor Second
dw $0db2, $007c ; 1, 123.750 Hz, Major Second
dw $0cd5, $0084 ; 1, 132.000 Hz, Minor Third
dw $0c50, $0089 ; 1, 137.500 Hz, Major Third
dw $0b89, $0093 ; 1, 146.667 Hz, Fourth
dw $0aef, $009b ; 1, 154.688 Hz, Diminished Fifth
dw $0a3e, $00a5 ; 1, 165.000 Hz, Fifth
dw $0998, $00b0 ; 1, 176.000 Hz, Minor Sixth
dw $0935, $00b7 ; 1, 183.333 Hz, Major Sixth
dw $0884, $00c6 ; 1, 198.000 Hz, Minor Seventh
dw $082c, $00ce ; 1, 206.250 Hz, Major Seventh
octave.A3:
dw $07a7, $00dc ; 2, 220.000 Hz, Unison
dw $0758, $00e5 ; 2, 229.167 Hz, Minor Second
dw $06ca, $00f7 ; 2, 247.500 Hz, Major Second
dw $065c, $0108 ; 2, 264.000 Hz, Minor Third
dw $0619, $0113 ; 2, 275.000 Hz, Major Third
dw $05b6, $0125 ; 2, 293.333 Hz, Fourth
dw $0569, $0135 ; 2, 309.375 Hz, Diminished Fifth
dw $0510, $014a ; 2, 330.000 Hz, Fifth
dw $04bd, $0160 ; 2, 352.000 Hz, Minor Sixth
dw $048c, $016f ; 2, 366.667 Hz, Major Sixth
dw $0433, $018c ; 2, 396.000 Hz, Minor Seventh
dw $0407, $019c ; 2, 412.500 Hz, Major Seventh
octave.A4:
dw $03c5, $01b8 ; 3, 440.000 Hz, Unison
dw $039d, $01ca ; 3, 458.333 Hz, Minor Second
dw $0356, $01ef ; 3, 495.000 Hz, Major Second
dw $031f, $0210 ; 3, 528.000 Hz, Minor Third
dw $02fe, $0226 ; 3, 550.000 Hz, Major Third
dw $02cc, $024b ; 3, 586.667 Hz, Fourth
dw $02a6, $026b ; 3, 618.750 Hz, Diminished Fifth
dw $0279, $0294 ; 3, 660.000 Hz, Fifth
dw $0250, $02c0 ; 3, 704.000 Hz, Minor Sixth
dw $0237, $02dd ; 3, 733.333 Hz, Major Sixth
dw $020b, $0318 ; 3, 792.000 Hz, Minor Seventh
dw $01f5, $0339 ; 3, 825.000 Hz, Major Seventh
octave.A5:
dw $01d4, $0370 ; 4, 880.000 Hz, Unison
dw $01c0, $0395 ; 4, 916.667 Hz, Minor Second
dw $019c, $03de ; 4, 990.000 Hz, Major Second
dw $0181, $0420 ; 4, 1056.000 Hz, Minor Third
dw $0170, $044c ; 4, 1100.000 Hz, Major Third
dw $0157, $0495 ; 4, 1173.333 Hz, Fourth
dw $0144, $04d5 ; 4, 1237.500 Hz, Diminished Fifth
dw $012e, $0528 ; 4, 1320.000 Hz, Fifth
dw $0119, $0580 ; 4, 1408.000 Hz, Minor Sixth
dw $010d, $05bb ; 4, 1466.667 Hz, Major Sixth
dw $00f7, $0630 ; 4, 1584.000 Hz, Minor Seventh
dw $00ec, $0672 ; 4, 1650.000 Hz, Major Seventh
octave.A6:
dw $00db, $06e0 ; 5, 1760.000 Hz, Unison
dw $00d1, $0729 ; 5, 1833.333 Hz, Minor Second
dw $00bf, $07bc ; 5, 1980.000 Hz, Major Second
dw $00b2, $0840 ; 5, 2112.000 Hz, Minor Third
dw $00a9, $0898 ; 5, 2200.000 Hz, Major Third
dw $009d, $092b ; 5, 2346.667 Hz, Fourth
dw $0093, $09ab ; 5, 2475.000 Hz, Diminished Fifth
dw $0088, $0a50 ; 5, 2640.000 Hz, Fifth
dw $007e, $0b00 ; 5, 2816.000 Hz, Minor Sixth
dw $0078, $0b75 ; 5, 2933.333 Hz, Major Sixth
dw $006d, $0c60 ; 5, 3168.000 Hz, Minor Seventh
dw $0067, $0ce4 ; 5, 3300.000 Hz, Major Seventh
octave.A7:
dw $005f, $0dc0 ; 6, 3520.000 Hz, Unison
dw $005a, $0e53 ; 6, 3666.667 Hz, Minor Second
dw $0051, $0f78 ; 6, 3960.000 Hz, Major Second
dw $004a, $1080 ; 6, 4224.000 Hz, Minor Third
dw $0046, $1130 ; 6, 4400.000 Hz, Major Third
dw $0040, $1255 ; 6, 4693.333 Hz, Fourth
dw $003b, $1356 ; 6, 4950.000 Hz, Diminished Fifth
dw $0035, $14a0 ; 6, 5280.000 Hz, Fifth
dw $0030, $1600 ; 6, 5632.000 Hz, Minor Sixth
dw $002d, $16eb ; 6, 5866.667 Hz, Major Sixth
dw $0028, $18c0 ; 6, 6336.000 Hz, Minor Seventh
dw $0025, $19c8 ; 6, 6600.000 Hz, Major Seventh