Skip to content
This repository was archived by the owner on Aug 15, 2019. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
b109cb9
performance_rnn
cghawthorne Aug 12, 2017
8dafab5
fixes
cghawthorne Aug 14, 2017
24d4de4
add decoding
cghawthorne Aug 14, 2017
1b36042
adding piano to perf_rnn samples
tambien Aug 29, 2017
6fbdeae
Incorperated front-end into demo
torinmb Sep 12, 2017
37d26df
added logo and text
torinmb Sep 12, 2017
2c0e646
Added js file to fix website frontend
torinmb Sep 12, 2017
a7efa2a
cleaning up
cghawthorne Sep 14, 2017
6b81460
more cleanup
cghawthorne Sep 15, 2017
5460c94
fix
cghawthorne Sep 15, 2017
6943a7c
cleanup
cghawthorne Sep 15, 2017
cc533e0
lint
cghawthorne Sep 15, 2017
931278e
conditioned performance rnn
cghawthorne Sep 15, 2017
cab002b
add presets, resetting, performance tweaks
cghawthorne Sep 19, 2017
bed7628
fix
cghawthorne Sep 20, 2017
0b5f7fe
allow unconditioned performance
cghawthorne Sep 25, 2017
cb896b6
GCS-hosted files
cghawthorne Sep 27, 2017
c265c4b
performance improvements from smilkov
cghawthorne Oct 3, 2017
e777faf
performance_rnn
cghawthorne Aug 12, 2017
844afd6
fixes
cghawthorne Aug 14, 2017
b57a962
add decoding
cghawthorne Aug 14, 2017
8af9352
adding piano to perf_rnn samples
tambien Aug 29, 2017
64c0bec
Incorperated front-end into demo
torinmb Sep 12, 2017
f9fd4e6
added logo and text
torinmb Sep 12, 2017
ab50a0f
Added js file to fix website frontend
torinmb Sep 12, 2017
1fb6518
cleaning up
cghawthorne Sep 14, 2017
b2d7578
more cleanup
cghawthorne Sep 15, 2017
c005ae6
fix
cghawthorne Sep 15, 2017
dfba252
cleanup
cghawthorne Sep 15, 2017
dde7a03
lint
cghawthorne Sep 15, 2017
0b7672e
conditioned performance rnn
cghawthorne Sep 15, 2017
f47d82c
add presets, resetting, performance tweaks
cghawthorne Sep 19, 2017
81d3065
fix
cghawthorne Sep 20, 2017
d95f46f
allow unconditioned performance
cghawthorne Sep 25, 2017
6cbec22
GCS-hosted files
cghawthorne Sep 27, 2017
8fa6ef5
performance improvements from smilkov
cghawthorne Oct 3, 2017
31cf9c8
ui tweaks
cghawthorne Oct 3, 2017
54e5170
ssl
cghawthorne Oct 3, 2017
9ad596e
Merge remote-tracking branch 'upstream/master' into perf_rnn_viz
dsmilkov Oct 3, 2017
e824a45
change to async gpu download
dsmilkov Oct 3, 2017
26aefba
improve piano dom: don't re-add dom elements
dsmilkov Oct 3, 2017
fadfe47
Merge remote-tracking branch 'dsmilkov/perf_rnn_viz' into perf_rnn_viz
cghawthorne Oct 3, 2017
319e2de
analytics
cghawthorne Oct 3, 2017
0751135
Merge remote-tracking branch 'upstream/master' into perf_rnn_viz
dsmilkov Oct 3, 2017
f15b1ac
update steps_per_gen to 10 and sync with deeplearnjs/master which get…
dsmilkov Oct 3, 2017
fe93bc9
fix bug with outdated setTimeout() from previous loop
dsmilkov Oct 4, 2017
af96ad9
ui tweaks
cghawthorne Oct 4, 2017
bce1daa
ui tweak
cghawthorne Oct 4, 2017
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@
"[json]": {
"editor.formatOnSave": false
},
"[html]": {
"editor.formatOnSave": false
},
"editor.formatOnSave": true,
"clang-format.style": "Google",
"files.insertFinalNewline": true,
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
306 changes: 306 additions & 0 deletions demos/performance_rnn/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,306 @@
<html>
<head>
<title>performance_rnn</title>
<style type="text/css">
#container,
body {
width: 100%;
height: 100%;
position: absolute;
top: 0;
left: 0;
margin: 0;
background-color: #fff;
font-family: Lato, sans-serif;
color: #7f7f7f;
}
#container #keyboard,
body #keyboard {
position: absolute;
left: 0px;
height: 20px;
top: 50%;
right: 0px;
bottom: 0px;
z-index: 10;
display: block;
height: auto;
margin-right: auto;
margin-left: auto;
-webkit-transform: translate(0px, -50%);
/*-ms-transform: translate(0px, -50%);*/
transform: translate(0px, -50%);
position: absolute;
bottom: -70px;
left: 0;
height: 100px
}
#container #glow,
#container #roll,
body #glow,
body #roll {
display: none;
width: 100%;
height: calc(100% - 130px);
position: absolute;
top: 0;
left: 0
}
#container #bottom,
body #bottom {
width: 100%;
height: 30px;
bottom: 0;
left: 0;
position: absolute;
background-color: #222;
box-shadow: inset 0 12px 30px -5px rgba(0, 0, 0, .75)
}
#container.focus {
-webkit-filter: none;
filter: none;
opacity: 1
}
#keyboard {
width: calc(100% - 20px);
}
#keyboard,
#keyboard .key {
position: absolute;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none
}
#keyboard .key {
height: calc(100% - 2 * 2px);
width: 10px;
left: 0;
top: 0
}
#keyboard .key.black {
z-index: 1;
height: 50%
}
#keyboard .key.black .fill {
background-color: #7f7f7f;

width: calc(100% - 8px);
left: 4px
}
#keyboard .key.white {
z-index: 0
}
#keyboard .key.white .fill {
background-color: #e5e5e5
}
#keyboard .key .fill {
border: 2px solid #d7d7d7;
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
pointer-events: none;
transition: background-color 0.6s;
}
#keyboard .key .fill.active {
background-color: #fff;
transition: background-color 0s;
}
#keyboard .key .highlight.ai {
background-color: #fff
}


#status {
position: absolute;
left: 0px;
height: 20px;
top: 50%;
right: 0px;
bottom: 0px;
z-index: 10;
display: block;
height: auto;
margin-right: auto;
margin-left: auto;
-webkit-transform: translate(0px, -50%);
/*-ms-transform: translate(0px, -50%);*/
transform: translate(0px, -50%);
font-size: 30px;
text-align: center;
}

.hidden {
visibility: hidden;

}
.image {
position: absolute;
left: 0px;
bottom: 0px;
margin-top: 40px;
margin-bottom: 40px;
margin-left: 40px;
}

.text-block {
position: absolute;
right: 40px;
bottom: 40px;
width: 450px;
font-size: 15px;
line-height: 25px;
}

.header {
font-size: 50px;
position: absolute;
width: 100%;
text-align: center;
margin-top: 20px;
font-weight: bold;
}

.link {
color: #6fc9c6;
}

#controls {
position: absolute;
width: 100%;
text-align: center;
margin-top: 100px;
}

.control {
display: inline-block;
vertical-align: middle;
}

.control .pitch {
width: 3em;
}

#conditioning-controls {
display: inline-block;
}

#conditioning-controls.inactive{
opacity: .2;
}

</style>
</head>
<body>
<div id="status">Loading...</div>
<div id="container"></div>
<div class="header">Performance RNN</div>
<div id="controls" class="hidden">
<div class="control" style="margin-right: 20px;">
Conditioning<br />
<input type="radio" name="conditioning" id="conditioning-on" checked>
On<br />
<input type="radio" name="conditioning" id="conditioning-off">
Off
</div>
<div id="conditioning-controls">
<div class="control" style="margin-right: 20px;">
Note Density<br/>
<input type="range" min="0" max="6" value="2" id="note-density"><br />
<span id="note-density-display"></span>
</div>
<div class="control">
Pitch Histogram<br/>
<div class="control">
<input class="pitch" id="pitch-c" type="number" min="0" value="2">
<br/>
C
</div>
<div class="control">
<input class="pitch" id="pitch-cs" type="number" min="0" value="0">
<br/>
C#
</div>
<div class="control">
<input class="pitch" id="pitch-d" type="number" min="0" value="1">
<br/>
D
</div>
<div class="control">
<input class="pitch" id="pitch-ds" type="number" min="0" value="0">
<br/>
D#
</div>
<div class="control">
<input class="pitch" id="pitch-e" type="number" min="0" value="1">
<br/>
E
</div>
<div class="control">
<input class="pitch" id="pitch-f" type="number" min="0" value="1">
<br/>
F
</div>
<div class="control">
<input class="pitch" id="pitch-fs" type="number" min="0" value="0">
<br/>
F#
</div>
<div class="control">
<input class="pitch" id="pitch-g" type="number" min="0" value="1">
<br/>
G
</div>
<div class="control">
<input class="pitch" id="pitch-gs" type="number" min="0" value="0">
<br/>
G#
</div>
<div class="control">
<input class="pitch" id="pitch-a" type="number" min="0" value="1">
<br/>
A
</div>
<div class="control">
<input class="pitch" id="pitch-as" type="number" min="0" value="0">
<br/>
A#
</div>
<div class="control">
<input class="pitch" id="pitch-b" type="number" min="0" value="1">
<br/>
B
</div>
<br />
<input type="button" value="C Major" id="c-major">
<input type="button" value="F Major" id="f-major">
<input type="button" value="D Minor" id="d-minor">
<input type="button" value="Whole Tone" id="whole-tone">
<input type="button" value="Pentatonic" id="pentatonic">
<input type="button" value="Preset 1" id="preset-1">
<input type="button" value="Preset 2" id="preset-2">
<br />
<br />
<input type="button" value="Save Preset 1" id="save-1">
<input type="button" value="Save Preset 2" id="save-2">
</div>
</div>
<div class="control" style="margin-right: 20px;">
<input type="button" value="Reset RNN" id="reset-rnn">
</div>
</div>
<div class="text-block"><a href="https://magenta.tensorflow.org/performance-rnn">Performance RNN</a> was trained in TensorFlow on MIDI from piano performances. It was then ported to run in the browser using only Javascript in the <a href="https://deeplearnjs.org/">deeplearn.js</a> environment.</div>
<a href="https://magenta.tensorflow.org/"><img class="image" sizes="128px" src="images/magenta-logo-bottom-text2.png" srcset="images/magenta-logo-bottom-text2.png 500w, images/magenta-logo-bottom-text2.png 640w" width="128"></a>
<script src="bundle.js"></script>
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-46457317-8', 'auto');
ga('send', 'pageview');
</script>
</body>
</html>
Loading