diff --git a/dev-dist/sw.js b/dev-dist/sw.js index 4bf24cf..ab8dd34 100644 --- a/dev-dist/sw.js +++ b/dev-dist/sw.js @@ -82,7 +82,7 @@ define(['./workbox-5357ef54'], (function (workbox) { 'use strict'; "revision": "3ca0b8505b4bec776b69afdba2768812" }, { "url": "index.html", - "revision": "0.juov83h1sno" + "revision": "0.aa2tv1h0in8" }], {}); workbox.cleanupOutdatedCaches(); workbox.registerRoute(new workbox.NavigationRoute(workbox.createHandlerBoundToURL("index.html"), { diff --git a/dev-dist/sw.js.map b/dev-dist/sw.js.map index 62eb1b9..3442860 100644 --- a/dev-dist/sw.js.map +++ b/dev-dist/sw.js.map @@ -1 +1 @@ -{"version":3,"file":"sw.js","sources":["../../../private/var/folders/zq/nwpwzg_s2rq87xq7zggqfvhw0000gn/T/785e34b954b8574748801e9e083e93e0/sw.js"],"sourcesContent":["import {clientsClaim as workbox_core_clientsClaim} from '/Users/bubo/Topos/node_modules/workbox-core/clientsClaim.mjs';\nimport {precacheAndRoute as workbox_precaching_precacheAndRoute} from '/Users/bubo/Topos/node_modules/workbox-precaching/precacheAndRoute.mjs';\nimport {cleanupOutdatedCaches as workbox_precaching_cleanupOutdatedCaches} from '/Users/bubo/Topos/node_modules/workbox-precaching/cleanupOutdatedCaches.mjs';\nimport {registerRoute as workbox_routing_registerRoute} from '/Users/bubo/Topos/node_modules/workbox-routing/registerRoute.mjs';\nimport {NavigationRoute as workbox_routing_NavigationRoute} from '/Users/bubo/Topos/node_modules/workbox-routing/NavigationRoute.mjs';\nimport {createHandlerBoundToURL as workbox_precaching_createHandlerBoundToURL} from '/Users/bubo/Topos/node_modules/workbox-precaching/createHandlerBoundToURL.mjs';/**\n * Welcome to your Workbox-powered service worker!\n *\n * You'll need to register this file in your web app.\n * See https://goo.gl/nhQhGp\n *\n * The rest of the code is auto-generated. Please don't update this file\n * directly; instead, make changes to your Workbox build configuration\n * and re-run your build process.\n * See https://goo.gl/2aRDsh\n */\n\n\n\n\n\n\n\n\nself.skipWaiting();\n\nworkbox_core_clientsClaim();\n\n\n/**\n * The precacheAndRoute() method efficiently caches and responds to\n * requests for URLs in the manifest.\n * See https://goo.gl/S9QRab\n */\nworkbox_precaching_precacheAndRoute([\n {\n \"url\": \"registerSW.js\",\n \"revision\": \"3ca0b8505b4bec776b69afdba2768812\"\n },\n {\n \"url\": \"index.html\",\n \"revision\": \"0.juov83h1sno\"\n }\n], {});\nworkbox_precaching_cleanupOutdatedCaches();\nworkbox_routing_registerRoute(new workbox_routing_NavigationRoute(workbox_precaching_createHandlerBoundToURL(\"index.html\"), {\n allowlist: [/^\\/$/],\n \n}));\n\n\n\n\n\n\n"],"names":["self","skipWaiting","workbox_core_clientsClaim","workbox_precaching_precacheAndRoute","workbox_precaching_cleanupOutdatedCaches","workbox_routing_registerRoute","workbox_routing_NavigationRoute","workbox_precaching_createHandlerBoundToURL","allowlist"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAwBAA,CAAI,CAAA,CAAA,CAAA,CAACC,CAAW,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAE,CAAA;AAElBC,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAyB,EAAE,CAAA;;AAG3B,CAAA,CAAA,CAAA,CAAA,CAAA;AACA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA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CAAA;AAEpB,CAAA,CAAA,CAAC,CAAC,CAAC,CAAA;;"} \ No newline at end of file +{"version":3,"file":"sw.js","sources":["../../../private/var/folders/zq/nwpwzg_s2rq87xq7zggqfvhw0000gn/T/261e41c066a43cabd4994553621a21c9/sw.js"],"sourcesContent":["import {clientsClaim as workbox_core_clientsClaim} from '/Users/bubo/Topos/node_modules/workbox-core/clientsClaim.mjs';\nimport {precacheAndRoute as workbox_precaching_precacheAndRoute} from '/Users/bubo/Topos/node_modules/workbox-precaching/precacheAndRoute.mjs';\nimport {cleanupOutdatedCaches as workbox_precaching_cleanupOutdatedCaches} from '/Users/bubo/Topos/node_modules/workbox-precaching/cleanupOutdatedCaches.mjs';\nimport {registerRoute as workbox_routing_registerRoute} from '/Users/bubo/Topos/node_modules/workbox-routing/registerRoute.mjs';\nimport {NavigationRoute as workbox_routing_NavigationRoute} from '/Users/bubo/Topos/node_modules/workbox-routing/NavigationRoute.mjs';\nimport {createHandlerBoundToURL as workbox_precaching_createHandlerBoundToURL} from '/Users/bubo/Topos/node_modules/workbox-precaching/createHandlerBoundToURL.mjs';/**\n * Welcome to your Workbox-powered service worker!\n *\n * You'll need to register this file in your web app.\n * See https://goo.gl/nhQhGp\n *\n * The rest of the code is auto-generated. Please don't update this file\n * directly; instead, make changes to your Workbox build configuration\n * and re-run your build process.\n * See https://goo.gl/2aRDsh\n */\n\n\n\n\n\n\n\n\nself.skipWaiting();\n\nworkbox_core_clientsClaim();\n\n\n/**\n * The precacheAndRoute() method efficiently caches and responds to\n * requests for URLs in the manifest.\n * See https://goo.gl/S9QRab\n */\nworkbox_precaching_precacheAndRoute([\n {\n \"url\": \"registerSW.js\",\n \"revision\": \"3ca0b8505b4bec776b69afdba2768812\"\n },\n {\n \"url\": \"index.html\",\n \"revision\": \"0.aa2tv1h0in8\"\n }\n], {});\nworkbox_precaching_cleanupOutdatedCaches();\nworkbox_routing_registerRoute(new workbox_routing_NavigationRoute(workbox_precaching_createHandlerBoundToURL(\"index.html\"), {\n allowlist: [/^\\/$/],\n \n}));\n\n\n\n\n\n\n"],"names":["self","skipWaiting","workbox_core_clientsClaim","workbox_precaching_precacheAndRoute","workbox_precaching_cleanupOutdatedCaches","workbox_routing_registerRoute","workbox_routing_NavigationRoute","workbox_precaching_createHandlerBoundToURL","allowlist"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAwBAA,CAAI,CAAA,CAAA,CAAA,CAACC,CAAW,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAE,CAAA;AAElBC,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAyB,EAAE,CAAA;;AAG3B,CAAA,CAAA,CAAA,CAAA,CAAA;AACA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AACA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA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A,CAAA,CAAA,CAAA,CAAA,CAAA;AACd,CAAA,CAAA,CAAC,CACF,CAAA,CAAE,CAAE,CAAA,CAAC,CAAA;AACNC,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAwC,EAAE,CAAA;AAC1CC,CAA6B,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAC,IAAIC,CAA+B,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAACC,+BAA0C,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAY,CAAC,CAAE,CAAA,CAAA;IAC1HC,CAAS,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAE,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAM,CAAA;AAEpB,CAAA,CAAA,CAAC,CAAC,CAAC,CAAA;;"} \ No newline at end of file diff --git a/src/Clock.ts b/src/Clock.ts index 428dae8..7638c7b 100644 --- a/src/Clock.ts +++ b/src/Clock.ts @@ -164,7 +164,7 @@ export class Clock { } get realTime(): number { - return this.app.audioContext.currentTime - this.totalPauseTime; + return this.app.audioContext.currentTime - this.totalPauseTime; } get deviation(): number { @@ -175,6 +175,7 @@ export class Clock { if (ppqn > 0 && this._ppqn !== ppqn) { this._ppqn = ppqn; this.transportNode?.setPPQN(ppqn); + this.logicalTime = this.realTime; } } @@ -192,15 +193,12 @@ export class Clock { */ const pulseDuration = this.pulse_duration; const nudgedTime = time + nudge; - const nextTickTime = Math.ceil(nudgedTime / - pulseDuration) * pulseDuration; + const nextTickTime = Math.ceil(nudgedTime / pulseDuration) * pulseDuration; const remainingTime = nextTickTime - nudgedTime; return remainingTime; } - - public convertPulseToSecond(n: number): number { /** * Converts a pulse to a second. @@ -218,7 +216,7 @@ export class Clock { this.running = true; this.app.api.MidiConnection.sendStartMessage(); this.lastPlayPressTime = this.app.audioContext.currentTime; - this.totalPauseTime += (this.lastPlayPressTime - this.lastPauseTime); + this.totalPauseTime += this.lastPlayPressTime - this.lastPauseTime; this.transportNode?.start(); } diff --git a/src/TransportProcessor.js b/src/TransportProcessor.js index 17507f2..20e96ce 100644 --- a/src/TransportProcessor.js +++ b/src/TransportProcessor.js @@ -1,5 +1,4 @@ class TransportProcessor extends AudioWorkletProcessor { - constructor(options) { super(options); this.port.addEventListener("message", this.handleMessage); @@ -20,19 +19,20 @@ class TransportProcessor extends AudioWorkletProcessor { this.started = false; } else if (message.data.type === "stop") { this.started = false; - } else if (message.data.type === 'bpm') { + } else if (message.data.type === "bpm") { this.bpm = message.data.value; this.currentPulsePosition = currentTime; - } else if (message.data.type === 'ppqn') { + } else if (message.data.type === "ppqn") { this.ppqn = message.data.value; - } else if (message.data.type === 'nudge') { + this.currentPulsePosition = currentTime; + } else if (message.data.type === "nudge") { this.nudge = message.data.value; } - } + }; process(inputs, outputs, parameters) { if (this.started) { - const adjustedCurrentTime = currentTime + (this.nudge / 100); + const adjustedCurrentTime = currentTime + this.nudge / 100; const beatNumber = adjustedCurrentTime / (60 / this.bpm); const currentPulsePosition = Math.ceil(beatNumber * this.ppqn); if (currentPulsePosition > this.currentPulsePosition) { @@ -44,7 +44,4 @@ class TransportProcessor extends AudioWorkletProcessor { } } -registerProcessor( - "transport", - TransportProcessor -); +registerProcessor("transport", TransportProcessor); diff --git a/src/examples/excerpts.ts b/src/examples/excerpts.ts index 45da2f6..eebc28b 100644 --- a/src/examples/excerpts.ts +++ b/src/examples/excerpts.ts @@ -88,8 +88,9 @@ if (flip(8, 75)) { .end(1).out() beat(.5) :: sound('ST01').note(melody).n($(1)).gain(0.4).end(1).out() beat(1) :: sound('ST02').note(melody).n($(1)).gain(0.4).end(1).out() -}`, `// Race day - Bubobubobubo -bpm(125); +}`, + `// Race day - Bubobubobubo +tempo(125); beat(.5) :: sound('STB6').n(irand(1,10)).gain(1).out() rhythm(flip(4) ? 1 : .5, 5, 8) :: sound('kick').out() rhythm(flip(2) ? .5 : .25, 7, 8) :: sound('click') @@ -113,7 +114,7 @@ rhythm(flip(2) ? .5 : .25, flip(4) ? 8 : 11, 12) :: sound('hat') .orbit(3).room(0.5).size(0.5).n(0).out() `, `// Part-Dieu - Bubobubobubo -bpm(90); +tempo(90); beat(rarely(12) ? .5 : .25) :: sound('ST22') .note([30, 30, 30, 31].repeat(8).beat(.5)) .cut(1).n([19, 21].beat(.75)) @@ -127,10 +128,11 @@ beat(.5) :: snd('dr') .gain(1).out() beat(flip(2) ? 1 : 0.75) :: snd('bd').n(2).out() beat(4) :: snd('snare').n(5) - .delay(0.5).delayt(bpm() / 60 / 8) + .delay(0.5).delayt(tempo() / 60 / 8) .delayfb(0.25).out() -`, `// Atarism - Bubobubobubo -bpm(85); +`, + `// Atarism - Bubobubobubo +tempo(85); let modifier = [.5, 1, 2].beat(8); let othermod = [1, .5, 4].beat(4); beat(modifier / 2):: sound('STA9').n([0,2].beat(.5)).vel(0.5).out() @@ -159,7 +161,7 @@ beat(1/4)::snd(['sawtooth', 'triangle', 'square'].beat(1)) .sustain(0.01 + usine(.25) / 10).out() beat(4)::snd('amencutup').n($(19)).cut(1).orbit(2).pan(rand(0.0,1.0)).out()`, `// Crazy arpeggios - Bubobubobubo -bpm(110) +tempo(110) beat([0.25, 0.5].beat(4)) && sound('sawtooth') .note([60, 62, 63, 67, 70].beat(.125) + [-12,0,12].beat() + [0, 0, 5, 7].bar()) @@ -194,7 +196,8 @@ beat([.25,.125, .5].beat(4))::snd('arpy:4') .cutoff(100 + usine(1/8) * 800).lpadsr(5, 0, [1/8, 1.16].beat(), 0, 0) .resonance(0.2).gain(0.4).end(0.8).room(0.9).size(0.9).n(3).out(); beat(.5) :: snd('arpy').note([30, 33, 35].repeat(4).beat(1) - [24,12].beat(0.5)) - .cutoff(500).lpadsr(8, 0.05, .125, 0, 0).out()`, `// Naïf et agréable -- Bubobubobubo + .cutoff(500).lpadsr(8, 0.05, .125, 0, 0).out()`, + `// Naïf et agréable -- Bubobubobubo z1('1/8 024!3 035 024 0124').sound('wt_stereo') .adsr(0, .4, 0.5, .4).gain(0.1) .lpadsr(4, 0, .2, 0, 0) @@ -211,7 +214,7 @@ z4('1/4 kick kick snare kick').sound().gain(1).cutoff(osci).out()`, /* `// Numerology - Bubobubobubo -bpm(130); +tempo(130); let mel = [ "0.125 _ (0 3 7 0 3 5 0 3 9)+(0 2)", "0.125 (0 7 0 10 0 5)+(0 3)", "0.125 (0 3 7 0 3 5 0 3 9)+(0 2)", "0.125 (0 2 4 5 9 10)+(0 2)", @@ -219,7 +222,7 @@ let mel = [ z0(mel) .scale('minor').sound('wt_piano').cutoff(800 + usine(.5) * 5000) .fmi([2, 4, 8].beat(2)).fmh(flip(2) ? 2 : 4) - .delay(bpm() / 60 / 9).delayt(0.25).delayfb(0.5) + .delay(tempo() / 60 / 9).delayt(0.25).delayfb(0.5) .fmsus(0.3).fmrel(0.3).rel(rand(0.5,0.8)) .sus(rand(0.05, 0.1)).out(); beat(1) :: sound(flip(2) ? 'kick' : ['sd', 'cp'].beat(3)).out();