-
-
Notifications
You must be signed in to change notification settings - Fork 3
/
test.html
61 lines (53 loc) · 1.48 KB
/
test.html
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
<!DOCTYPE html>
<html>
<head>
<title>JZZ.synth.Tiny test</title>
<style type="text/css">
button { text-align:left;}
</style>
<script src="node_modules/jzz/javascript/JZZ.js"></script>
<script src="javascript/JZZ.synth.Tiny.js"></script>
<script><!--
function button1(){
JZZ.synth.Tiny()
.or(function(){ alert('Cannot open MIDI-Out!\n' + this.err()); })
.note(0, 'C5', 127, 500).wait(500)
.note(0, 'E5', 127, 500).wait(500)
.note(0, 'G5', 127, 500).wait(500)
.note(9, 'C6', 127, 500);
}
function button2(){
JZZ.synth.Tiny.register('Web Audio');
JZZ().or(function(){ alert('Cannot start MIDI engine!\n' + this.err()); })
.openMidiOut('Web Audio').or(function(){ alert('Cannot open MIDI-Out!\n' + this.err()); })
.note(0, 'C5', 127, 500).wait(500)
.note(0, 'E5', 127, 500).wait(500)
.note(0, 'G5', 127, 500).wait(500)
.note(9, 'C6', 127, 500);
}
--></script>
</head>
<body>
<h1>JZZ.synth.Tiny</h1>
<button onclick='button1();'><pre>
JZZ.synth.Tiny()
.note(0, 'C5', 127, 500).wait(500)
.note(0, 'E5', 127, 500).wait(500)
.note(0, 'G5', 127, 500).wait(500)
.note(9, 'C6', 127, 500);
</pre></button>
<button onclick='button2();'><pre>
JZZ.synth.Tiny.register('Web Audio');
JZZ().openMidiOut('Web Audio')
.note(0, 'C5', 127, 500).wait(500)
.note(0, 'E5', 127, 500).wait(500)
.note(0, 'G5', 127, 500).wait(500)
.note(9, 'C6', 127, 500);
</pre></button>
<p id=note>
</p>
<p>
<a href=https://jazz-soft.net>https://jazz-soft.net</a>
</p>
</body>
</html>