-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathtest.ts
71 lines (71 loc) · 4.33 KB
/
test.ts
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
// テストはここに来ます。このパッケージが拡張機能として使用されるときにはコンパイルされません。
input.onButtonPressed(Button.A, function () {
// let tempo = music.tempo()
music.setTempo(240)
nerds.playNoteArray(haruichiban2, MelodyOptions.Once)
// music.setTempo(tempo)
})
input.onButtonPressed(Button.B, function () {
music.setTempo(240)
nerds.playNoteArray(kaerunouta, MelodyOptions.Once)
})
input.onButtonPressed(Button.AB, function () {
music.setTempo(240)
nerds.playNoteArray(kirakiraboshi2, MelodyOptions.Once)
})
let haruichiban: string[] = []
haruichiban = nerds.stringToNoteArray(
"d5:2,d5:4,d5:4,c5:2,a4:2,a4:2,c5:2,c5:4,c5:4,a4:2,g4:2,f4:2," +
"g4:2,g4:2,g4:2,g4:2,g4:2,e4:2,c4:2,d4:2,r:8," +
"d5:2,d5:4,d5:4,c5:2,a4:2,a4:2,c5:2,c5:4,c5:4,a4:2,g4:2,f4:2," +
"g4:2,g4:4,g4:2,e4:2,c4:2,d4:2,r:8," +
"a4:4,c5:2,c5:2,d5:8,c5:2,a4:2,a4:2,c5:2,a4:2,r:4," +
"a4:3,r:1,a4:2,g4:2,g4:2,g4:2,r:2,e4:2,e4:2,e4:2,c4:2,d4:2,r:8," +
"g4:4,g4:2,g4:2,f4:2,g4:2,a4:2,c5:4,a4:2,r:4," +
"d5:4,d5:2,d5:2,d5:2,d5:2,a4:2,a4:2,c5:2,c5:4,r:4," +
"g4:2,g4:2,g4:2,g4:2,f4:2,g4:2,a4:2,c5:4,a4:2,r:4," +
"a4:2,a4:2,a4:2,a4:2,c5:2,g4:2,r:1,a4:2,r:4," +
"a4:4,c5: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