Added the information in a container because I don't think that many people care about what's going on. worklet-loader uses a hash to avoid caching issues, I just ran into them
236 lines
9.0 KiB
HTML
236 lines
9.0 KiB
HTML
<!doctype html>
|
|
<!--
|
|
Made with love by MindfulMinun
|
|
https://benjic.xyz
|
|
-->
|
|
<html lang="en-US" dir="ltr">
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<title>D♭</title>
|
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
|
<meta name="viewport" content="width=device-width">
|
|
<meta name="theme-color" content="#1e1e1e">
|
|
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/normalize/8.0.1/normalize.min.css">
|
|
<style media="screen">
|
|
*, *::before, *::after { box-sizing: border-box; }
|
|
:root {
|
|
--input-color: rgb(255 255 255 / .52);
|
|
--input-border: #424242;
|
|
--accent: #448aff;
|
|
}
|
|
html, body {
|
|
font-family: "Roboto", Helvetica, Arial, sans-serif;
|
|
line-height: 1.15;
|
|
height: 100%;
|
|
margin: 0;
|
|
color: white;
|
|
background-color: black;
|
|
}
|
|
body { display: flex; }
|
|
a[href] { color: var(--accent); }
|
|
|
|
input, audio {
|
|
display: block;
|
|
margin: 1em 0;
|
|
}
|
|
audio {
|
|
width: 100%;
|
|
}
|
|
button {
|
|
/* display: inline-block;
|
|
background: 0; border: 0; font: inherit; color: inherit;
|
|
border: 1px solid #727272;
|
|
padding: .25em .5em;
|
|
cursor: pointer; */
|
|
background: 0; border: 0; font: inherit;
|
|
color: var(--input-color);
|
|
font-size: 87.5%;
|
|
border: 2px solid var(--input-border);
|
|
outline: 0;
|
|
padding: .5em .75em;
|
|
}
|
|
select {
|
|
/* background: 0; border: 0; font: inherit; color: inherit; */
|
|
-moz-appearance: none;
|
|
-webkit-appearance: none;
|
|
appearance: none;
|
|
background: 0;
|
|
background-image: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNHB4IiBoZWlnaHQ9IjI0cHgiIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0iIzU0NTQ1NCI+PHBhdGggZD0iTTcgMTBsNSA1IDUtNXoiPjwvcGF0aD48L3N2Zz4=);
|
|
background-position: right 50%;
|
|
background-repeat: no-repeat;
|
|
outline: 0;
|
|
border: 2px solid var(--input-border);
|
|
border-radius: 0;
|
|
color: var(--input-color);
|
|
font: inherit;
|
|
font-size: 87.5%;
|
|
/* padding: .5em 1.5em .5em 1em; */
|
|
padding: .5em 1.5em .5em .5em;
|
|
min-width: 120px;
|
|
}
|
|
option { color: initial; }
|
|
option[disabled] { color: rgb(0 0 0 / .3); }
|
|
button:focus,
|
|
select:focus {
|
|
border-color: var(--accent);
|
|
}
|
|
|
|
button, select, details {
|
|
backdrop-filter: blur(2px);
|
|
}
|
|
|
|
summary {
|
|
cursor: pointer;
|
|
margin: -1em;
|
|
padding: 1em;
|
|
/* color: var(--input-color); */
|
|
}
|
|
details {
|
|
border: 2px solid var(--input-border);
|
|
padding: 1em;
|
|
}
|
|
details[open] > summary {
|
|
margin: -1em -1em 1em;
|
|
border-bottom: 2px solid var(--input-border);
|
|
}
|
|
details > summary:focus {
|
|
outline: 2px solid var(--accent);
|
|
outline-offset: -2px;
|
|
}
|
|
|
|
canvas {
|
|
position: fixed;
|
|
top: 0; left: 0; bottom: 0; right: 0;
|
|
width: 100%;
|
|
height: 100%;
|
|
background-color: #000;
|
|
}
|
|
|
|
.container {
|
|
width: 840px;
|
|
max-width: 100%;
|
|
margin: 0 auto;
|
|
padding: 1em;
|
|
z-index: 1;
|
|
}
|
|
.warn {
|
|
border: 2px solid red;
|
|
padding: 0 1em;
|
|
}
|
|
.spacer {
|
|
/* height: 90vh; */
|
|
height: 1000px;
|
|
height: 90vh;
|
|
height: calc(100vh - 6rem);
|
|
}
|
|
.credits {
|
|
text-align: center;
|
|
font-style: italic;
|
|
margin: 3rem auto;
|
|
opacity: .5;
|
|
}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<canvas></canvas>
|
|
<div class="container">
|
|
<p>
|
|
Drag and drop an audio file anywhere or <button id="choose">choose one from your filesystem.</button>
|
|
</p>
|
|
<p>
|
|
<label>
|
|
Filter:
|
|
<select id="processorSelect">
|
|
<option value="noop" selected>noop</option>
|
|
<option value="derivative">derivative</option>
|
|
<option value="integral">integral</option>
|
|
<option value="subtract-overlap">subtract-overlap</option>
|
|
<option value="isolate-overlap" disabled>isolate-overlap</option>
|
|
<option value="bit-crusher-sr8">bit-crusher-sr8 (Sample-rate reduction)</option>
|
|
<option value="bit-crusher-res">bit-crusher-res (bit-depth reduction)</option>
|
|
<option value="bit-crusher-both">bit-crusher-both</option>
|
|
<option value="mono">mono</option>
|
|
<option value="zeroes">zeroes</option>
|
|
</select>
|
|
</label>
|
|
<label>
|
|
Visualizer:
|
|
<select id="visualizerSelect">
|
|
<option value="0" selected>Oscilloscope</option>
|
|
<option value="1">Linear spectrogram</option>
|
|
</select>
|
|
</label>
|
|
</p>
|
|
<audio controls></audio>
|
|
|
|
<details>
|
|
<summary>What does each filter do?</summary>
|
|
|
|
<ul>
|
|
<li>
|
|
<code>noop</code>
|
|
<p>Leaves the audio unchanged.</p>
|
|
</li>
|
|
<li>
|
|
<code>derivative</code>
|
|
<p>
|
|
Approximates the first derivative of the audio as a function respect to time.
|
|
Sounds like a <strong>high-pass filter</strong>.
|
|
</p>
|
|
</li>
|
|
<li>
|
|
<code>integral</code>
|
|
<p>
|
|
Approximates the first integral of the audio as a function respect to time. Plus C of zero. Sounds like a <strong>low-pass filter</strong>.
|
|
</p>
|
|
</li>
|
|
<li>
|
|
<code>subtract-overlap</code>
|
|
<p>Inverts the amplitude of every even-numbered channel and merges all channels to mono. This effectively cancels the sounds the left and right channels share in common. Quick-and-dirty way of removing vocals.</p>
|
|
</li>
|
|
<li>
|
|
<code>isolate-overlap</code>
|
|
<p>The opposite of subtract-overlap. You think it'd be simple but I can't get it to work :/</p>
|
|
</li>
|
|
<!-- bit-crusher-sr8
|
|
bit-crusher-res -->
|
|
<li>
|
|
<code>bit-crusher-sr8</code>
|
|
<p>Bitcrusher. Works by taking the average of 8 samples of the input and setting that average as the output for those 8 samples, effectively <strong>reducing the sampling rate</strong>.</p>
|
|
</li>
|
|
<li>
|
|
<code>bit-crusher-res</code>
|
|
<p>Bitcrusher. Works by <strong>reducing the resolution of each sample</strong> from a 32-bit float to a 8-bit float.</p>
|
|
</li>
|
|
<li>
|
|
<code>bit-crusher-both</code>
|
|
<p>Bitcrusher. Combines the output of bit-crusher-sr8 and bit-crusher-res.</p>
|
|
</li>
|
|
<li>
|
|
<code>mono</code>
|
|
<p>
|
|
Converts the audio to mono by taking the arithmetic average of the samples of each channel.
|
|
</p>
|
|
</li>
|
|
<li>
|
|
<code>zeroes</code>
|
|
<p>Outputs no sound.</p>
|
|
</li>
|
|
</ul>
|
|
</details>
|
|
|
|
<p class="credits">
|
|
Made with :3c by <a href="https://benjic.xyz">MindfulMinun</a>
|
|
•
|
|
<a href="https://github.com/MindfulMinun/d-flat">Source code</a>
|
|
</p>
|
|
|
|
<div class="spacer"></div>
|
|
|
|
</div>
|
|
<input id="file" type="file" hidden>
|
|
|
|
<script src="./dist/main.js"></script>
|
|
</body>
|
|
</html>
|