diff --git a/dev-dist/sw.js b/dev-dist/sw.js index 2b86b7a..277f923 100644 --- a/dev-dist/sw.js +++ b/dev-dist/sw.js @@ -21,22 +21,20 @@ if (!self.define) { const singleRequire = (uri, parentUri) => { uri = new URL(uri + ".js", parentUri).href; - return registry[uri] || ( - - new Promise(resolve => { - if ("document" in self) { - const script = document.createElement("script"); - script.src = uri; - script.onload = resolve; - document.head.appendChild(script); - } else { - nextDefineUri = uri; - importScripts(uri); - resolve(); - } - }) - - .then(() => { + return ( + registry[uri] || + new Promise((resolve) => { + if ("document" in self) { + const script = document.createElement("script"); + script.src = uri; + script.onload = resolve; + document.head.appendChild(script); + } else { + nextDefineUri = uri; + importScripts(uri); + resolve(); + } + }).then(() => { let promise = registry[uri]; if (!promise) { throw new Error(`Module ${uri} didn’t register its module`); @@ -47,27 +45,31 @@ if (!self.define) { }; self.define = (depsNames, factory) => { - const uri = nextDefineUri || ("document" in self ? document.currentScript.src : "") || location.href; + const uri = + nextDefineUri || + ("document" in self ? document.currentScript.src : "") || + location.href; if (registry[uri]) { // Module is already loading or loaded. return; } let exports = {}; - const require = depUri => singleRequire(depUri, uri); + const require = (depUri) => singleRequire(depUri, uri); const specialDeps = { module: { uri }, exports, - require + require, }; - registry[uri] = Promise.all(depsNames.map( - depName => specialDeps[depName] || require(depName) - )).then(deps => { + registry[uri] = Promise.all( + depsNames.map((depName) => specialDeps[depName] || require(depName)) + ).then((deps) => { factory(...deps); return exports; }); }; } -define(['./workbox-b7fccfec'], (function (workbox) { 'use strict'; +define(["./workbox-b7fccfec"], function (workbox) { + "use strict"; self.skipWaiting(); workbox.clientsClaim(); @@ -77,28 +79,44 @@ define(['./workbox-b7fccfec'], (function (workbox) { 'use strict'; * requests for URLs in the manifest. * See https://goo.gl/S9QRab */ - workbox.precacheAndRoute([{ - "url": "registerSW.js", - "revision": "3ca0b8505b4bec776b69afdba2768812" - }, { - "url": "index.html", - "revision": "0.0ufj7f4tmog" - }], {}); + workbox.precacheAndRoute( + [ + { + url: "registerSW.js", + revision: "3ca0b8505b4bec776b69afdba2768812", + }, + { + url: "index.html", + revision: "0.0ufj7f4tmog", + }, + ], + {} + ); workbox.cleanupOutdatedCaches(); - workbox.registerRoute(new workbox.NavigationRoute(workbox.createHandlerBoundToURL("index.html"), { - allowlist: [/^\/$/] - })); - workbox.registerRoute(({ - url - }) => [/^https:\/\/raw\.githubusercontent\.com\/.*/i, /^https:\/\/shabda\.ndre\.gr\/.*/i].some(regex => regex.test(url)), new workbox.CacheFirst({ - "cacheName": "external-samples", - plugins: [new workbox.ExpirationPlugin({ - maxEntries: 5000, - maxAgeSeconds: 2592000 - }), new workbox.CacheableResponsePlugin({ - statuses: [0, 200] - })] - }), 'GET'); - -})); + workbox.registerRoute( + new workbox.NavigationRoute(workbox.createHandlerBoundToURL("index.html"), { + allowlist: [/^\/$/], + }) + ); + workbox.registerRoute( + ({ url }) => + [ + /^https:\/\/raw\.githubusercontent\.com\/.*/i, + /^https:\/\/shabda\.ndre\.gr\/.*/i, + ].some((regex) => regex.test(url)), + new workbox.CacheFirst({ + cacheName: "external-samples", + plugins: [ + new workbox.ExpirationPlugin({ + maxEntries: 5000, + maxAgeSeconds: 2592000, + }), + new workbox.CacheableResponsePlugin({ + statuses: [0, 200], + }), + ], + }), + "GET" + ); +}); //# sourceMappingURL=sw.js.map diff --git a/src/classes/SoundEvent.ts b/src/classes/SoundEvent.ts index 37e7579..d516d87 100644 --- a/src/classes/SoundEvent.ts +++ b/src/classes/SoundEvent.ts @@ -254,7 +254,7 @@ export class SoundEvent extends AudibleEvent { roomfade: ["roomfade", "rfade"], roomlp: ["roomlp", "rlp"], roomdim: ["roomdim", "rdim"], - sound: ["sound", "s"], + sound: ["s","sound"], size: (value: number) => { this.updateValue("roomsize", value); return this; @@ -435,8 +435,15 @@ export class SoundEvent extends AudibleEvent { const events = objectWithArraysToArrayOfObjects(this.values, [ "parsedScale", ]); + for (const event of events) { - superdough(event, this.nudge - this.app.clock.deviation, event.dur); + // Filter non superdough parameters + // TODO: Should filter relevant fields for superdough + // const filteredEvent = filterObject(event, ["analyze","note","dur","freq","s"]); + const filteredEvent = event; + // No need for note if there is freq + if(filteredEvent.freq) { delete filteredEvent.note; } + superdough(filteredEvent, this.nudge - this.app.clock.deviation, filteredEvent.dur); } }; }