-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
178 lines (166 loc) · 8.22 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
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
<html>
<head>
<meta charset="UTF-8">
<title>MusicVAE with Web Piano</title>
<meta name="description" content="Melody Mixer">
<meta content="A fun way to explore melodies using machine learning." name="description">
<meta content="Melody Mixer" property="og:title">
<meta content="./data/images/melody-mixer-og2.jpeg" property="og:image">
<meta content="A fun way to explore melodies using machine learning." property="og:description">
<meta content="summary" name="twitter:card">
<meta name="twitter:title" content="Melody Mixer" />
<meta name="twitter:description" content="A fun way to explore melodies using machine learning." />
<meta name="twitter:image" content="./data/images/melody-mixer-og2.jpeg" />
<meta name="viewport"
content="width=device-width, user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1">
<!-- Global site tag (gtag.js) - Google Analytics -->
<!-- <script async src="https://www.googletagmanager.com/gtag/js?id=UA-86665855-4"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag() { dataLayer.push(arguments); }
gtag('js', new Date());
gtag('config', 'UA-86665855-4', {
'referrer': document.referrer.split('?')[0],
});
</script> -->
<script language="javascript" type="text/javascript" src="./libraries/musicvae.js"></script>
<script language="javascript" type="text/javascript" src="./libraries/p5.js"></script>
<script language="javascript" type="text/javascript" src="./libraries/tone.js"></script>
<script language="javascript" type="text/javascript" src="./preset-melodies.js"></script>
<script language="javascript" type="text/javascript" src="./libraries/StartAudioContext.js"></script>
<link href="./data/images/favicon-melody-mixer-small.png" rel="shortcut icon" type="image/x-icon">
<link href="./data/images/favicon-melody-mixer.png" rel="apple-touch-icon">
<!-- <link href="https://fonts.googleapis.com/css?family=Poppins" rel="stylesheet"> -->
<!-- <script src='https://unpkg.com/tone@latest/build/Tone.js'></script> -->
<link rel="stylesheet" href="style2.css">
</head>
<body>
<section class="splash">
<div class="splash-wrapper">
<img class="splash-icon" src="./data/images/melody-mixer.gif" width="375" height="auto"
alt="Melody Mixer icon" />
<h1>MusicVAE with Web Piano</h1>
<div class="device-supported">
<p class="splash-description">AIST2010: Introduction to Computer Music (2022-23 Term 1)
<br />Group 5 Course Project
</p>
<button class="splash-play-button" id="splash-play-button" onclick="onPlay();"
disabled>LOADING...</button>
<p class="splash-description">
</p>
<p class="built-with">
Built with tone.js + musicvae.js + p5.js.
<br/> References:
<a class ="about" target="_blank" href="https://medium.com/@torinblankensmith/how-to-blend-melodies-with-machine-learning-in-real-time-in-the-browser-8ad5b42b4d0b">Melody Mixer</a>,
<a class ="about" target="_blank" href="https://dev.to/shimphillip/building-a-piano-with-tone-js-5c2f">Building a piano with tone.js!</a>
</p>
</div>
<p class="device-not-supported" style="display: none">Sorry, looks like your browser or device doesn't
support this experiment.
Learn more about Melody Mixer
<a target="_blank"
href="https://medium.com/@torinblankensmith/how-to-blend-melodies-with-machine-learning-in-real-time-in-the-browser-8ad5b42b4d0b">here</a>.
Or try visiting this site on a desktop computer in a browser like Chrome.
</p>
</div>
<!-- <div class="badge-wrapper">
<a class="ai-experiment badge" href="https://aiexperiments.withgoogle.com" target="_blank" ></a>
<div class="badge-break"></div>
<a class="google-friends badge" href="https://aiexperiments.withgoogle.com" target="_blank"></a>
<div class="badge-break"></div>
<a class="magenta-link badge" href="https://magenta.tensorflow.org/" target="_blank" >
<div class="magenta-logo"></div>
<div class="magenta-text">Built using <span>Magenta</span>
</div>
</a>
</div> -->
<!-- <div class="splash-privacy">
<a href="https://www.google.com/intl/en/policies/privacy/" target="_blank">Privacy & </a>
<a href="https://www.google.com/intl/en/policies/terms/" target="_blank">Terms</a>
</div> -->
</section>
<div class="piano-container">
<ul id="piano">
<li id="a" data-note="C4" class="key">
<div id="w" data-note="C#4" class="black-key">W</div>
A
</li>
<li id="s" data-note="D4" class="key">
<div id="e" data-note="D#4" class="black-key">E</div>
S
</li>
<li id="d" data-note="E4" class="key">
D
</li>
<li id="f" data-note="F4" class="key">
<div id="t" data-note="F#4" class="black-key">T</div>
F
</li>
<li id="g" data-note="G4" class="key">
<div id="y" data-note="G#4" class="black-key">Y</div>
G
</li>
<li id="h" data-note="A4" class="key">
<div id="u" data-note="A#4" class="black-key">U</div>
H
</li>
<li id="j" data-note="B4" class="key">
J
</li>
<li id="k" data-note="C5" class="key">
<div id="o" data-note="C#5" class="black-key">O</div>
K
</li>
<li id="l" data-note="D5" class="key">
<div id="p" data-note="D#5" class="black-key">P</div>
L
</li>
<li id=";" data-note="E5" class="key">
;
</li>
<li id="" data-note="F5" class="key">
<div id="" data-note="F#5" class="black-key"></div>
</li>
<li id="" data-note="G5" class="key">
<div id="" data-note="G#5" class="black-key"></div>
</li>
<li id="" data-note="A5" class="key">
<div id="" data-note="A#5" class="black-key"></div>
</li>
<li id="" data-note="B5" class="key">
</li>
<li id="" data-note="C6" class="key">
</li>
</ul>
<!-- <p>
<a href="/" class="bn1">Record</a>
<a href="/" class="bn1">Clear</a>
</p> -->
</div>
<h2>AIST2010 Group 5 Course Project</h2>
<p class="built-with">
Built with tone.js + musicvae.js + p5.js.
<br/> References:
<a class ="about" target="_blank" href="https://medium.com/@torinblankensmith/how-to-blend-melodies-with-machine-learning-in-real-time-in-the-browser-8ad5b42b4d0b">Melody Mixer</a>,
<a class ="about" target="_blank" href="https://dev.to/shimphillip/building-a-piano-with-tone-js-5c2f">Building a piano with tone.js!</a>
</p>
<!-- <a class="about-button" target="_blank" href="https://medium.com/@torinblankensmith/how-to-blend-melodies-with-machine-learning-in-real-time-in-the-browser-8ad5b42b4d0b"></a> -->
<div class="control-container">
<div class="drop-down-container">
<select name="melody-one" class="drop-down">
<option>Melody 1</option>
</select>
<label for="melody-one">Melody 1</label>
</div>
<button class="play-pause-button"></button>
<div class="drop-down-container">
<select name="melody-two" class="drop-down">
<option>Melody 2</option>
</select>
<label for="melody-two">Melody 2</label>
</div>
</div>
<script language="javascript" type="text/javascript" src='piano.js'></script>
<script language="javascript" type="text/javascript" src="script.js"></script>
</body>
</html>