Details container, webpack caching
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
This commit is contained in:
6 files changed
+81
-90
No files matched your search
Vendored
+1
@@ -0,0 +1 @@
|
||||
!function(e){var r={};function t(o){if(r[o])return r[o].exports;var s=r[o]={i:o,l:!1,exports:{}};return e[o].call(s.exports,s,s.exports,t),s.l=!0,s.exports}t.m=e,t.c=r,t.d=function(e,r,o){t.o(e,r)||Object.defineProperty(e,r,{enumerable:!0,get:o})},t.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},t.t=function(e,r){if(1&r&&(e=t(e)),8&r)return e;if(4&r&&"object"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(t.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&r&&"string"!=typeof e)for(var s in e)t.d(o,s,function(r){return e[r]}.bind(null,s));return o},t.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(r,"a",r),r},t.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},t.p="",t(t.s=0)}([function(e,r){class t extends AudioWorkletProcessor{process(e,r){const t=e[0],o=r[0];for(let e=0;e<t.length;e++)o[e].set(t[e]);return!0}}registerProcessor("noop",t);class o extends AudioWorkletProcessor{process(e,r){const t=e[0],o=r[0];o[0].set(t[0]);for(let e=1;e<t.length;e++)for(let r=0;r<t[0].length;r++)o[0][r]+=t[e][r]*(1/t.length);for(let e=1;e<o.length;e++)o[e].set(o[0]);return!0}}registerProcessor("mono",o);class s extends AudioWorkletProcessor{process(e,r){const t=e[0],o=r[0];for(let e=0;e<t.length;e++){o[e][0]=o[e][o[e].length-1];for(let r=1;r<t[e].length;r++)o[e][r]=t[e][r]-t[e][r-1]}return!0}}registerProcessor("derivative",s);class n extends AudioWorkletProcessor{process(e,r){const t=e[0],o=r[0];for(let e=0;e<t.length;e++){o[e][0]=o[e][o[e].length-1];for(let r=1;r<t[e].length;r++)o[e][r]=(t[e][r-1]+t[e][r])/2}return!0}}registerProcessor("integral",n);class l extends AudioWorkletProcessor{process(e,r){const t=e[0],o=r[0];for(let e=0;e<t.length;e++)for(let r=0;r<t[e].length;r+=8){let s=0;for(let o=0;o<8;o++)s+=t[e][r+o];const n=s/8;for(let t=0;t<8;t++)o[e][r+t]=n}return!0}}registerProcessor("bit-crusher-sr8",l);class c extends AudioWorkletProcessor{process(e,r){const t=e[0],o=r[0];for(let e=0;e<t.length;e++)for(let r=0;r<t[e].length;r++)o[e][r]=Math.round(16*t[e][r])/16;return!0}}registerProcessor("bit-crusher-res",c);class u extends AudioWorkletProcessor{process(e,r){const t=e[0],o=r[0];for(let e=0;e<t.length;e++)for(let r=0;r<t[e].length;r+=8){let s=0;for(let o=0;o<8;o++)s+=Math.round(16*t[e][r])/16;const n=s/8;for(let t=0;t<8;t++)o[e][r+t]=n}return!0}}registerProcessor("bit-crusher-both",u);class f extends AudioWorkletProcessor{process(e,r){const t=e[0],o=r[0];o[0].set(t[0]);for(let e=1;e<t.length;e++)for(let r=0;r<t[e].length;r++)o[0][r]+=t[e][r]*(e%2==0?1:-1);for(let e=1;e<o.length;e++)o[e].set(o[0]);return!0}}registerProcessor("subtract-overlap",f);class i extends AudioWorkletProcessor{process(e,r){const t=e[0],o=r[0];o[0].set(t[0]);for(let e=1;e<t.length;e++)for(let r=0;r<t[e].length;r++)o[0][r]+=(e%2==0?1:-1)*t[e][r];for(let e=t.length-1;0<=e;e--)for(let r=0;r<t[e].length;r++)o[e][r]=t[e][r]-o[0][r];return!0}}registerProcessor("isolate-overlap",i);class g extends AudioWorkletProcessor{process(e,r){for(let e=0;e<r.length;e++)for(let t=0;e<r.length;e++)for(let o=0;e<r.length;e++)r[e][t][o]=0;return!0}}registerProcessor("zeroes",g)}]);
|
||||
Vendored
+1
-1
@@ -1 +1 @@
|
||||
!function(e){var t={};function n(i){if(t[i])return t[i].exports;var o=t[i]={i:i,l:!1,exports:{}};return e[i].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=e,n.c=t,n.d=function(e,t,i){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:i})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(i,o,function(t){return e[t]}.bind(null,o));return i},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=1)}([function(e,t,n){e.exports=n.p+"processors.worklet.js"},function(e,t,n){e.exports=n(2)},function(e,t,n){"use strict";n.r(t);var i=n(0),o=n.n(i);const r=document.querySelector("audio"),a=new AudioContext,c=function(e,t){const n=e.createAnalyser(),i=new Uint8Array(n.frequencyBinCount),o=document.querySelector("canvas"),r=o.getContext("2d"),a=document.getElementById("visualizerSelect");let c=0;return a.addEventListener("input",()=>{c=+a.value}),requestAnimationFrame((function e(){if(!t.paused)switch(o.width=window.innerWidth*window.devicePixelRatio,o.height=window.innerHeight*window.devicePixelRatio,c){case 0:!function(){r.clearRect(0,0,o.width,o.height),r.fillStyle="rgba(255, 255, 255, .72)",r.strokeStyle="rgba(255, 255, 255, .72)",r.lineWidth=2*window.devicePixelRatio,n.getByteTimeDomainData(i);const e=o.width/n.frequencyBinCount;let t=0,a=0,c=0;for(;a<n.frequencyBinCount;a++)c=i[a]/128*(o.height/2),r.lineTo(t,c),t+=e;r.stroke()}();break;case 1:!function(){r.clearRect(0,0,o.width,o.height),r.fillStyle="rgba(255, 255, 255, .72)",r.strokeStyle="rgba(255, 255, 255, .72)",r.lineWidth=2*window.devicePixelRatio,n.getByteFrequencyData(i);const e=o.width/n.frequencyBinCount;let t=0,a=n.frequencyBinCount,c=0;for(;0<a;a--)c=o.height-i[a]/128*(o.height/2),r.lineTo(t,c),t+=e;r.stroke()}()}requestAnimationFrame(e)})),n}(a,r),d=a.createMediaElementSource(r);let u;function s(e){u&&(u.disconnect(),d.disconnect(),c.disconnect()),u=new AudioWorkletNode(a,e,{processorOptions:{maxChannels:a.destination.maxChannelCount}}),d.connect(u),u.connect(c),c.connect(a.destination)}function l(e){const t=[...e],n=t.find(e=>e.type.startsWith("audio/"))||t.find(e=>e.type.startsWith("video/"));if(!n)return console.log(t.map(e=>e.type)),void alert("Be sure to drop an audio file your browser supports :)");!async function(e){const t=document.querySelector("audio");t.src=URL.createObjectURL(e),s(f.value),a.resume().then(()=>t.play()),document.title="D♭ • "+e.name,navigator.mediaSession&&"undefined"!=typeof MediaMetadata&&(navigator.mediaSession.metadata=new MediaMetadata({title:e.name,album:"D♭"}),navigator.mediaSession.setActionHandler("play",()=>{t.play()}),navigator.mediaSession.setActionHandler("pause",()=>{t.pause()}),navigator.mediaSession.setActionHandler("seekbackward",()=>{t.currentTime-=5}),navigator.mediaSession.setActionHandler("seekforward",()=>{t.currentTime+=5}))}(n)}a.audioWorklet.addModule("/dist/"+o.a),document.getElementById("choose").addEventListener("click",()=>{document.getElementById("file").click()}),document.querySelector("input").addEventListener("input",(function(){l(this.files)})),window.addEventListener("drop",async e=>{e.preventDefault(),l(e.dataTransfer.files)}),document.addEventListener("dragover",e=>{e.preventDefault()});const f=document.querySelector("select");f.addEventListener("input",()=>{s(f.value)})}]);
|
||||
!function(e){var t={};function n(i){if(t[i])return t[i].exports;var o=t[i]={i:i,l:!1,exports:{}};return e[i].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=e,n.c=t,n.d=function(e,t,i){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:i})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(i,o,function(t){return e[t]}.bind(null,o));return i},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=1)}([function(e,t,n){e.exports=n.p+"10d2006b2fd760ec2f41.worklet.js"},function(e,t,n){e.exports=n(2)},function(e,t,n){"use strict";n.r(t);var i=n(0),o=n.n(i);const r=document.querySelector("audio"),a=new AudioContext,c=function(e,t){const n=e.createAnalyser(),i=new Uint8Array(n.frequencyBinCount),o=document.querySelector("canvas"),r=o.getContext("2d"),a=document.getElementById("visualizerSelect");let c=0;return a.addEventListener("input",()=>{c=+a.value}),requestAnimationFrame((function e(){if(!t.paused)switch(o.width=window.innerWidth*window.devicePixelRatio,o.height=window.innerHeight*window.devicePixelRatio,c){case 0:!function(){r.clearRect(0,0,o.width,o.height),r.fillStyle="rgba(255, 255, 255, .72)",r.strokeStyle="rgba(255, 255, 255, .72)",r.lineWidth=2*window.devicePixelRatio,n.getByteTimeDomainData(i);const e=o.width/n.frequencyBinCount;let t=0,a=0,c=0;for(;a<n.frequencyBinCount;a++)c=i[a]/128*(o.height/2),r.lineTo(t,c),t+=e;r.stroke()}();break;case 1:!function(){r.clearRect(0,0,o.width,o.height),r.fillStyle="rgba(255, 255, 255, .72)",r.strokeStyle="rgba(255, 255, 255, .72)",r.lineWidth=2*window.devicePixelRatio,n.getByteFrequencyData(i);const e=o.width/n.frequencyBinCount;let t=0,a=n.frequencyBinCount,c=0;for(;0<a;a--)c=o.height-i[a]/128*(o.height/2),r.lineTo(t,c),t+=e;r.stroke()}()}requestAnimationFrame(e)})),n}(a,r),d=a.createMediaElementSource(r);let u;function s(e){u&&(u.disconnect(),d.disconnect(),c.disconnect()),u=new AudioWorkletNode(a,e,{processorOptions:{maxChannels:a.destination.maxChannelCount}}),d.connect(u),u.connect(c),c.connect(a.destination)}function l(e){const t=[...e],n=t.find(e=>e.type.startsWith("audio/"))||t.find(e=>e.type.startsWith("video/"));if(!n)return console.log(t.map(e=>e.type)),void alert("Be sure to drop an audio file your browser supports :)");!async function(e){const t=document.querySelector("audio");t.src=URL.createObjectURL(e),s(f.value),a.resume().then(()=>t.play()),document.title="D♭ • "+e.name,navigator.mediaSession&&"undefined"!=typeof MediaMetadata&&(navigator.mediaSession.metadata=new MediaMetadata({title:e.name,album:"D♭"}),navigator.mediaSession.setActionHandler("play",()=>{t.play()}),navigator.mediaSession.setActionHandler("pause",()=>{t.pause()}),navigator.mediaSession.setActionHandler("seekbackward",()=>{t.currentTime-=5}),navigator.mediaSession.setActionHandler("seekforward",()=>{t.currentTime+=5}))}(n)}a.audioWorklet.addModule("/dist/"+o.a),document.getElementById("choose").addEventListener("click",()=>{document.getElementById("file").click()}),document.querySelector("input").addEventListener("input",(function(){l(this.files)})),window.addEventListener("drop",async e=>{e.preventDefault(),l(e.dataTransfer.files)}),document.addEventListener("dragover",e=>{e.preventDefault()});const f=document.querySelector("select");f.addEventListener("input",()=>{s(f.value)})}]);
|
||||
Vendored
-1
@@ -1 +0,0 @@
|
||||
!function(e){var r={};function t(o){if(r[o])return r[o].exports;var s=r[o]={i:o,l:!1,exports:{}};return e[o].call(s.exports,s,s.exports,t),s.l=!0,s.exports}t.m=e,t.c=r,t.d=function(e,r,o){t.o(e,r)||Object.defineProperty(e,r,{enumerable:!0,get:o})},t.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},t.t=function(e,r){if(1&r&&(e=t(e)),8&r)return e;if(4&r&&"object"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(t.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&r&&"string"!=typeof e)for(var s in e)t.d(o,s,function(r){return e[r]}.bind(null,s));return o},t.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(r,"a",r),r},t.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},t.p="",t(t.s=0)}([function(e,r){const t=Symbol();class o extends AudioWorkletProcessor{process(e,r){const t=e[0],o=r[0];for(let e=0;e<t.length;e++)o[e].set(t[e]);return!0}}registerProcessor("noop",o);class s extends AudioWorkletProcessor{process(e,r){const t=e[0],o=r[0];o[0].set(t[0]);for(let e=1;e<t.length;e++)for(let r=0;r<t[0].length;r++)o[0][r]+=t[e][r]*(1/t.length);for(let e=1;e<o.length;e++)o[e].set(o[0]);return!0}}registerProcessor("mono",s);class n extends AudioWorkletProcessor{constructor(e){super(),this[t]=new Float32Array(e.processorOptions.maxChannels)}process(e,r){const t=e[0],o=r[0];for(let e=0;e<t.length;e++){o[e][0]=o[e][o[e].length-1];for(let r=1;r<t[e].length;r++)o[e][r]=t[e][r]-t[e][r-1]}return!0}}registerProcessor("derivative",n);class l extends AudioWorkletProcessor{constructor(e){super(),this[t]=new Float32Array(e.processorOptions.maxChannels)}process(e,r){const t=e[0],o=r[0];for(let e=0;e<t.length;e++){o[e][0]=o[e][o[e].length-1];for(let r=1;r<t[e].length;r++)o[e][r]=(t[e][r-1]+t[e][r])/2}return!0}}registerProcessor("integral",l);class c extends AudioWorkletProcessor{process(e,r){const t=e[0],o=r[0];for(let e=0;e<t.length;e++)for(let r=0;r<t[e].length;r+=8){let s=0;for(let o=0;o<8;o++)s+=t[e][r+o];const n=s/8;for(let t=0;t<8;t++)o[e][r+t]=n}return!0}}registerProcessor("bit-crusher-sr8",c);class u extends AudioWorkletProcessor{process(e,r){const t=e[0],o=r[0];for(let e=0;e<t.length;e++)for(let r=0;r<t[e].length;r++)o[e][r]=Math.round(16*t[e][r])/16;return!0}}registerProcessor("bit-crusher-res",u);class i extends AudioWorkletProcessor{process(e,r){const t=e[0],o=r[0];for(let e=0;e<t.length;e++)for(let r=0;r<t[e].length;r+=8){let s=0;for(let o=0;o<8;o++)s+=Math.round(16*t[e][r])/16;const n=s/8;for(let t=0;t<8;t++)o[e][r+t]=n}return!0}}registerProcessor("bit-crusher-both",i);class f extends AudioWorkletProcessor{process(e,r){const t=e[0],o=r[0];o[0].set(t[0]);for(let e=1;e<t.length;e++)for(let r=0;r<t[e].length;r++)o[0][r]+=t[e][r]*(e%2==0?1:-1);for(let e=1;e<o.length;e++)o[e].set(o[0]);return!0}}registerProcessor("subtract-overlap",f);class a extends AudioWorkletProcessor{process(e,r){const t=e[0],o=r[0];o[0].set(t[0]);for(let e=1;e<t.length;e++)for(let r=0;r<t[e].length;r++)o[0][r]+=(e%2==0?1:-1)*t[e][r];for(let e=t.length-1;0<=e;e--)for(let r=0;r<t[e].length;r++)o[e][r]=t[e][r]-o[0][r];return!0}}registerProcessor("isolate-overlap",a);class g extends AudioWorkletProcessor{process(e,r){for(let e=0;e<r.length;e++)for(let t=0;e<r.length;e++)for(let o=0;e<r.length;e++)r[e][t][o]=0;return!0}}registerProcessor("zeroes",g)}]);
|
||||
+77
-73
@@ -16,6 +16,7 @@
|
||||
:root {
|
||||
--input-color: rgb(255 255 255 / .52);
|
||||
--input-border: #424242;
|
||||
--accent: #448aff;
|
||||
}
|
||||
html, body {
|
||||
font-family: "Roboto", Helvetica, Arial, sans-serif;
|
||||
@@ -71,12 +72,31 @@
|
||||
option[disabled] { color: rgb(0 0 0 / .3); }
|
||||
button:focus,
|
||||
select:focus {
|
||||
border-color: #448aff;
|
||||
border-color: var(--accent);
|
||||
}
|
||||
|
||||
button, select {
|
||||
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;
|
||||
@@ -110,30 +130,10 @@
|
||||
opacity: .5;
|
||||
}
|
||||
</style>
|
||||
|
||||
<!-- <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/katex.min.css" integrity="sha384-zB1R0rpPzHqg7Kpt0Aljp8JPLqbXI3bhnPWROx27a9N0Ll6ZP/+DiW/UqRcLbRjq" crossorigin="anonymous">
|
||||
|
||||
<script defer src="https://cdn.jsdelivr.net/npm/[email protected]/dist/katex.min.js" integrity="sha384-y23I5Q6l+B6vatafAwxRu/0oK/79VlbSz7Q9aiSZUvyWYIYsd+qj+o24G5ZU2zJz" crossorigin="anonymous"></script>
|
||||
|
||||
<script defer src="https://cdn.jsdelivr.net/npm/[email protected]/dist/contrib/auto-render.min.js" integrity="sha384-kWPLUVMOks5AQFrykwIup5lo0m3iMkkHrD0uJ4H5cjeGihAutqP0yW0J6dpFiVkI" crossorigin="anonymous"
|
||||
onload="renderMathInElement(document.body, {
|
||||
fleqn: true,
|
||||
delimiters: [
|
||||
{ left: '$$', right: '$$', display: true },
|
||||
{ left: '$', right: '$', display: false }
|
||||
]
|
||||
});"></script> -->
|
||||
</head>
|
||||
<body>
|
||||
<canvas></canvas>
|
||||
<div class="container">
|
||||
<div class="warn">
|
||||
<p>
|
||||
There’s currently a bug in Chrome that causes the <code>subtract-overlap</code> filter to glitch and scream.
|
||||
Refrain from using it, it’ll hurt your years X(
|
||||
</p>
|
||||
<p>(This glitch doesn’t occur in Firefox, so maybe try that instead :) )</p>
|
||||
</div>
|
||||
<p>
|
||||
Drag and drop an audio file anywhere or <button id="choose">choose one from your filesystem.</button>
|
||||
</p>
|
||||
@@ -163,57 +163,61 @@
|
||||
</p>
|
||||
<audio controls></audio>
|
||||
|
||||
<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>
|
||||
<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>
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
/// <reference path="./types.d.ts" />
|
||||
|
||||
const carry = Symbol()
|
||||
|
||||
class NoopProcessor extends AudioWorkletProcessor {
|
||||
/**
|
||||
* @param {Float32Array[][]} inputs
|
||||
@@ -47,11 +45,6 @@ class Mono extends AudioWorkletProcessor {
|
||||
registerProcessor('mono', Mono)
|
||||
|
||||
class DerivativeProcessor extends AudioWorkletProcessor {
|
||||
constructor(options) {
|
||||
super()
|
||||
this[carry] = new Float32Array(options.processorOptions.maxChannels)
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {Float32Array[][]} inputs
|
||||
* @param {Float32Array[][]} outputs
|
||||
@@ -75,12 +68,6 @@ class DerivativeProcessor extends AudioWorkletProcessor {
|
||||
registerProcessor('derivative', DerivativeProcessor)
|
||||
|
||||
class IntegralProcessor extends AudioWorkletProcessor {
|
||||
|
||||
constructor(options) {
|
||||
super()
|
||||
this[carry] = new Float32Array(options.processorOptions.maxChannels)
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {Float32Array[][]} inputs
|
||||
* @param {Float32Array[][]} outputs
|
||||
|
||||
+2
-2
@@ -6,8 +6,8 @@ module.exports = {
|
||||
rules: [{
|
||||
test: /\.worklet\.js$/,
|
||||
use: {
|
||||
loader: "worklet-loader",
|
||||
options: { name: "[name].js" }
|
||||
loader: "worklet-loader"
|
||||
// options: { name: "[name].js" }
|
||||
}
|
||||
}]
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user