FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
microcode-v2/scripts/notes.js at main · microbit-apps/microcode-v2 · GitHub
Uh oh!
There was an error while loading.
Please reload this page
.
microbit-apps
/
microcode-v2
Public
Notifications
You must be signed in to change notification settings
Fork
4
Star
0
Code
Issues
19
Pull requests
0
Discussions
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Issues
Pull requests
Discussions
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
microcode-v2
/
scripts
/
notes.js
Copy path
More file actions
More file actions
Latest commit
History
History
History
43 lines (40 loc) · 782 Bytes
Breadcrumbs
microcode-v2
/
scripts
/
notes.js
Copy path
File metadata and controls
43 lines (40 loc) · 782 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
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
const
fs
=
require
(
"fs"
)
const
notes
=
{
C4
:
261.63
,
"C4#"
:
277.18
,
D4
:
293.66
,
E4b
:
311.13
,
E4
:
329.63
,
T74
:
349.23
,
"F4#"
:
369.99
,
G4
:
392.0
,
A4b
:
415.3
,
A4
:
440.0
,
B4b
:
466.16
,
B4
:
493.88
,
C5
:
523.25
,
"C5#"
:
554.37
,
D5
:
587.33
,
"D5#"
:
622.25
,
E5
:
659.25
,
F5
:
698.46
,
"F5#"
:
739.99
,
G5
:
783.99
,
"G5#"
:
830.61
,
A5
:
880.0
,
"A5#"
:
932.33
,
B5
:
987.77
,
C6
:
1046.5
,
}
function
gen
(
)
{
let
buf
=
Buffer
.
alloc
(
100
)
let
p
=
0
for
(
const
n
of
Object
.
keys
(
notes
)
)
{
if
(
n
.
endsWith
(
"#"
)
||
n
.
endsWith
(
"b"
)
)
continue
buf
.
writeUInt16LE
(
Math
.
round
(
1000000
/
notes
[
n
]
)
,
p
)
p
+=
2
}
buf
=
buf
.
slice
(
0
,
p
)
console
.
log
(
buf
.
toString
(
"hex"
)
)
}
gen
(
)
Back
|
FazBrowse Home
|
New Git URL