deploy: 0c21770eaa
This commit is contained in:
1
assets/TransportProcessor-6c073985.js
Normal file
1
assets/TransportProcessor-6c073985.js
Normal file
@ -0,0 +1 @@
|
||||
var o=Object.defineProperty;var u=(e,s,i)=>s in e?o(e,s,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[s]=i;var a=(e,s,i)=>(u(e,typeof s!="symbol"?s+"":s,i),i);(function(){"use strict";class e extends AudioWorkletProcessor{constructor(t){super(t);a(this,"handleMessage",t=>{t.data&&t.data.type==="ping"?this.port.postMessage(t.data):t.data==="start"?this.started=!0:t.data==="pause"?this.started=!1:t.data==="stop"?this.started=!1:t.data.type==="bpm"?(this.bpm=t.data.value,this.currentPulsePosition=0):t.data.type==="ppqn"?(this.ppqn=t.data.value,this.currentPulsePosition=0):t.data.type==="nudge"&&(this.nudge=t.data.value)});this.port.addEventListener("message",this.handleMessage),this.port.start(),this.nudge=0,this.started=!1,this.bpm=120,this.ppqn=48,this.currentPulsePosition=0}process(t,p,d){if(this.started){const n=(currentTime+this.nudge/1e3)/(60/this.bpm),r=Math.ceil(n*this.ppqn);r>this.currentPulsePosition&&(this.currentPulsePosition=r,this.port.postMessage({type:"bang"}))}return!0}}registerProcessor("transport",e)})();
|
||||
@ -1 +0,0 @@
|
||||
var n=Object.defineProperty;var p=(e,s,r)=>s in e?n(e,s,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[s]=r;var a=(e,s,r)=>(p(e,typeof s!="symbol"?s+"":s,r),r);(function(){"use strict";class e extends AudioWorkletProcessor{constructor(t){super(t);a(this,"handleMessage",t=>{t.data&&t.data.type==="ping"?this.port.postMessage(t.data):t.data==="start"?this.started=!0:t.data==="pause"?this.started=!1:t.data==="stop"?this.started=!1:t.data.type==="bpm"?(this.bpm=t.data.value,this.currentPulsePosition=0):t.data.type==="ppqn"&&(this.ppqn=t.data.value,this.currentPulsePosition=0)});this.port.addEventListener("message",this.handleMessage),this.port.start(),this.started=!1,this.bpm=120,this.ppqn=48,this.currentPulsePosition=0}process(t,u,h){if(this.started){const o=currentTime/(60/this.bpm),i=Math.ceil(o*this.ppqn);i>this.currentPulsePosition&&(this.currentPulsePosition=i,this.port.postMessage({type:"bang"}))}return!0}}registerProcessor("transport",e)})();
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user