deploy: ad66618796
This commit is contained in:
@ -1 +0,0 @@
|
||||
var p=Object.defineProperty;var d=(e,s,i)=>s in e?p(e,s,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[s]=i;var o=(e,s,i)=>(d(e,typeof s!="symbol"?s+"":s,i),i);(function(){"use strict";class e extends AudioWorkletProcessor{constructor(t){super(t);o(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,this.lastPausedTime===0&&(this.lastPausedTime=currentTime)):t.data==="stop"?(this.started=!1,this.totalPausedTime=0,this.lastPausedTime=0,this.wasStopped=!0,this.currentPulsePosition=0):t.data.type==="bpm"?this.bpm=t.data.value:t.data.type==="ppqn"&&(this.ppqn=t.data.value)});this.port.addEventListener("message",this.handleMessage),this.port.start(),this.started=!1,this.totalPausedTime=0,this.lastPausedTime=0,this.startedAgainTime=0,this.wasStopped=!1,this.bpm=120,this.ppqn=48,this.currentPulsePosition=0}process(t,n,l){if(this.started){if(this.lastPausedTime>0){const h=currentTime-this.lastPausedTime;this.totalPausedTime+=h,this.lastPausedTime=0}this.wasStopped&&(this.startedAgainTime=currentTime,this.wasStopped=!1);const a=currentTime-this.totalPausedTime-this.startedAgainTime,u=a/(60/this.bpm),r=Math.ceil(u*this.ppqn);r>this.currentPulsePosition&&(this.currentPulsePosition=r,this.port.postMessage({type:"bang",logicalTime:a}))}return!0}}registerProcessor("transport",e)})();
|
||||
1
assets/TransportProcessor-b463db54.js
Normal file
1
assets/TransportProcessor-b463db54.js
Normal file
@ -0,0 +1 @@
|
||||
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
@ -6,7 +6,7 @@
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>Topos</title>
|
||||
|
||||
<script type="module" crossorigin src="/assets/index-0cd81c9c.js"></script>
|
||||
<script type="module" crossorigin src="/assets/index-3ef91956.js"></script>
|
||||
<link rel="stylesheet" href="/assets/index-adcffe3f.css">
|
||||
</head>
|
||||
<style>
|
||||
|
||||
Reference in New Issue
Block a user