-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
105 lines (103 loc) · 5.21 KB
/
index.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
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<link href="styles.css" rel="stylesheet">
<link href="https://cdnjs.cloudflare.com/ajax/libs/materialize/1.0.0-rc.2/css/materialize.min.css" rel="stylesheet">
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
<link href="https://fonts.googleapis.com/css2?family=Inter&display=swap" rel="stylesheet">
<script language="javascript" type="text/javascript" src="https://cdn.jsdelivr.net/npm/[email protected]/lib/p5.min.js"></script>
<script language="javascript" type="text/javascript" src="https://cdn.jsdelivr.net/npm/[email protected]/lodash.min.js"></script>
<script language="javascript" type="text/javascript" src="https://cdn.jsdelivr.net/npm/@magenta/[email protected]/dist/magentamusic.min.js"></script>
<script language="javascript" type="text/javascript" src="https://code.jquery.com/jquery-3.2.1.min.js"></script>
<script language="javascript" type="text/javascript" src="https://cdn.jsdelivr.net/npm/[email protected]/runtime.min.js"></script>
<script language="javascript" type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/materialize/1.0.0-rc.2/js/materialize.min.js"></script>
<script language="javascript" type="text/javascript" src="https://cdn.jsdelivr.net/npm/[email protected]/web-animations.min.js"></script>
<script language="javascript" type="text/javascript" src="https://cdn.jsdelivr.net/npm/[email protected]/webmidi.min.js"></script>
<script language="javascript" type="text/javascript" src="drums.js"></script>
<script language="javascript" type="text/javascript" src="mixer.js"></script>
<script language="javascript" type="text/javascript" src="controller.js"></script>
<script language="javascript" type="text/javascript" src="display.js"></script>
<script language="javascript" type="text/javascript" src="animation.js"></script>
<script language="javascript" type="text/javascript" src="info.js"></script>
<script language="javascript" type="text/javascript" src="sketch.js"></script>
<title>Drums</title>
</head>
<body>
<div class="drum-info"></div>
<div class="drum-app" style="display: none;">
<div class="progress pink">
<div class="indeterminate white"></div>
</div>
<div class="app" style="display: none;">
<div class="sequencer">
<div class="steps"></div>
</div>
<a class="regenerate btn-floating btn-large waves-effect waves-light pink darken-2 pulse">
<i class="material-icons">refresh</i>
</a>
<div class="controls">
<div class="control">
<a class="playpause btn-floating btn-large waves-effect waves-light blue">
<i class="material-icons play-icon">play_arrow</i>
<i class="material-icons pause-icon" style="display: none">pause</i>
</a>
</div>
<div class="control">
<div class="input-field grey-text">
<select id="pattern-length">
<option>4</option>
<option>8</option>
<option selected>16</option>
<option>32</option>
</select>
Pattern length
</div>
</div>
<div class="control">
<p class="range-field grey-text">
<input type="range" id="tempo" min="20" max="240" value="120" step="1"> Tempo
</p>
</div>
<div class="control">
<p class="range-field grey-text">
<input type="range" id="swing" min="0.5" max="0.7" value="0.55" step="0.05"> Swing
</p>
</div>
<div class="control">
<p class="range-field grey-text">
<input type="range" id="temperature" class="tooltipped" min="0.5" max="2" value="1.1" step="0.1" data-tooltip="Higher temperatures will make the neural network generates wilder patterns"
data-delay="500"> Temperature
</p>
</div>
</div>
</div>
<div class="info">
<p class="webmidi-enabled" style="display: none;">
Output:
<select class="midi-output"></select>
</p>
<p class="webmidi-enabled" style="display: none;">
MIDI clock output:
<select class="midi-clock-output"></select>
</p>
<p class="webmidi-enabled" style="display: none;">
MIDI clock input:
<select class="midi-clock-input"></select>
</p>
<p>This is an experimental drum machine powered by a deep neural network. To use it, define a seed pattern on the left,
and use the “generate” button. A neural network will dream up a continuation to your seed pattern.</p>
<p>Using the
<a href="https://github.com/tensorflow/magenta/tree/master/magenta/models/drums_rnn">Drums RNN</a> (pretrained) model from
<a href="https://magenta.tensorflow.org/">Google Magenta</a>, and
<a href="https://goo.gl/magenta/js">Magenta.js</a> +
<a href="https://js.tensorflow.org/">TensorFlow.js</a> +
<a href="https://tonejs.github.io/">Tone.js</a>.</p>
<p>A pen by
<a href="https://twitter.com/teropa">@teropa</a>.</p>
</div>
</div>
</body>
</html>