deploy: 138f64d8212f2f9baedb03590bcf9b29a4ab4514

This commit is contained in:
Bubobubobubobubo
2023-11-20 10:21:43 +00:00
parent 66ba421e46
commit 56a4930e65
7 changed files with 7 additions and 8 deletions

View File

@ -1 +0,0 @@
var u=Object.defineProperty;var p=(s,e,i)=>e in s?u(s,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):s[e]=i;var a=(s,e,i)=>(p(s,typeof e!="symbol"?e+"":e,i),i);(function(){"use strict";class s extends AudioWorkletProcessor{constructor(t){super(t);a(this,"handleMessage",t=>{t.data&&t.data.type==="ping"?this.port.postMessage(t.data):t.data.type==="start"?this.started=!0:t.data.type==="pause"?this.started=!1:t.data.type==="stop"?this.started=!1:t.data.type==="bpm"?(this.bpm=t.data.value,this.currentPulsePosition=currentTime):t.data.type==="ppqn"?(this.ppqn=t.data.value,this.currentPulsePosition=currentTime):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,o,d){if(this.started){const n=(currentTime+this.nudge/100)/(60/this.bpm),r=Math.ceil(n*this.ppqn);r>this.currentPulsePosition&&(this.currentPulsePosition=r,this.port.postMessage({type:"bang",bpm:this.bpm}))}return!0}}registerProcessor("transport",s)})();

File diff suppressed because one or more lines are too long