mirror of
https://github.com/wgreenberg/musicbox.git
synced 2024-11-22 11:30:25 +01:00
94 lines
2.1 KiB
HTML
94 lines
2.1 KiB
HTML
<html>
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<title>musicbox</title>
|
|
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/water.css@2/out/water.css">
|
|
<script src='musicbox.js'></script>
|
|
<style>
|
|
.body {
|
|
display: flex;
|
|
flex-direction: column;
|
|
}
|
|
|
|
button {
|
|
width: 150px;
|
|
margin: 10px;
|
|
}
|
|
|
|
p {
|
|
font-size: small;
|
|
margin-top: 0px;
|
|
}
|
|
|
|
textarea {
|
|
height: 150px;
|
|
flex: 1;
|
|
border-top-right-radius: 0px;
|
|
border-bottom-right-radius: 0px;
|
|
}
|
|
|
|
.sequencers {
|
|
display: flex;
|
|
flex-direction: column;
|
|
}
|
|
|
|
.sequencer-main {
|
|
display: flex;
|
|
flex-direction: row;
|
|
font-family: monospace;
|
|
}
|
|
|
|
.sequencer {
|
|
display: flex;
|
|
flex-direction: column;
|
|
width: 400px;
|
|
}
|
|
|
|
.sequencer-preview {
|
|
flex: 1;
|
|
background-color: #d0cfcf;
|
|
border-radius: 6px;
|
|
border-top-left-radius: 0px;
|
|
border-bottom-left-radius: 0px;
|
|
border: none;
|
|
margin-bottom: 6px;
|
|
padding: 10px;
|
|
white-space: pre;
|
|
}
|
|
|
|
.sequencer-preview > p {
|
|
margin: 0px;
|
|
}
|
|
|
|
.active {
|
|
background-color: #9b9b9b;
|
|
text-decoration: underline;
|
|
}
|
|
</style>
|
|
</head>
|
|
<div class="body">
|
|
<div class='sequencers'>
|
|
<div class='sequencer'>
|
|
<span>beats</span>
|
|
<div class="sequencer-main">
|
|
<textarea id='beats'></textarea>
|
|
<div class="sequencer-preview" id="beats-preview"></div>
|
|
</div>
|
|
<p>Each letter corresponds to a different sample. Non-letters are
|
|
silent.</p>
|
|
</div>
|
|
<div class='sequencer'>
|
|
<span>piano</span>
|
|
<div class="sequencer-main">
|
|
<textarea id='piano'></textarea>
|
|
<div class="sequencer-preview" id="piano-preview"></div>
|
|
</div>
|
|
<p>On a QWERTY keyboard, the first 7 letters on each row represent
|
|
notes C through B, with lower rows representing higher octaves. Capital
|
|
letters are louder, non-letters are silent.</p>
|
|
</div>
|
|
</div>
|
|
<button id="play">loading...</button>
|
|
<span><input type="checkbox" id="sync-sequences">sync rows</span>
|
|
</div>
|
|
</html>
|