From 663ac12abac3588ec8681040a22800dde6883daf Mon Sep 17 00:00:00 2001 From: cesare Date: Thu, 19 Sep 2024 21:49:11 +0100 Subject: [PATCH] Docs update 1.0.2637 --- assets/example_patches/808/cmaj_808.js | 2 +- .../808/cmaj_api/cmaj-audio-worklet-helper.js | 8 +++++++- .../808/cmaj_api/cmaj-generic-patch-view.js | 6 ++++-- .../CompuFart/cmaj_CompuFart.js | 2 +- .../cmaj_api/cmaj-audio-worklet-helper.js | 8 +++++++- .../cmaj_api/cmaj-generic-patch-view.js | 6 ++++-- .../ElectricPiano/cmaj_Electric_Piano.js | 2 +- .../cmaj_api/cmaj-audio-worklet-helper.js | 8 +++++++- .../cmaj_api/cmaj-generic-patch-view.js | 6 ++++-- .../GuitarLSTM/cmaj_GuitarLSTM.js | 2 +- .../cmaj_api/cmaj-audio-worklet-helper.js | 8 +++++++- .../cmaj_api/cmaj-generic-patch-view.js | 6 ++++-- .../HelloWorld/cmaj_Hello_World.js | 2 +- .../cmaj_api/cmaj-audio-worklet-helper.js | 8 +++++++- .../cmaj_api/cmaj-generic-patch-view.js | 6 ++++-- assets/example_patches/Piano/cmaj_Piano.js | 2 +- .../cmaj_api/cmaj-audio-worklet-helper.js | 8 +++++++- .../Piano/cmaj_api/cmaj-generic-patch-view.js | 6 ++++-- .../cmaj_api/cmaj-audio-worklet-helper.js | 8 +++++++- .../cmaj_api/cmaj-generic-patch-view.js | 6 ++++-- .../PirkleFilters/cmaj_vafilters.js | 2 +- assets/example_patches/Pro54/cmaj_Pro54.js | 2 +- .../cmaj_api/cmaj-audio-worklet-helper.js | 8 +++++++- .../Pro54/cmaj_api/cmaj-generic-patch-view.js | 6 ++++-- .../Replicant/cmaj_Replicant.js | 2 +- .../cmaj_api/cmaj-audio-worklet-helper.js | 8 +++++++- .../cmaj_api/cmaj-generic-patch-view.js | 6 ++++-- .../RingMod/cmaj_Ring_Mod_Demo.js | 2 +- .../cmaj_api/cmaj-audio-worklet-helper.js | 8 +++++++- .../cmaj_api/cmaj-generic-patch-view.js | 6 ++++-- .../STunedBar6/cmaj_STunedBar6.js | 2 +- .../cmaj_api/cmaj-audio-worklet-helper.js | 8 +++++++- .../cmaj_api/cmaj-generic-patch-view.js | 6 ++++-- .../SubtractOne/cmaj_SubtractOne.js | 2 +- .../cmaj_api/cmaj-audio-worklet-helper.js | 8 +++++++- .../cmaj_api/cmaj-generic-patch-view.js | 6 ++++-- .../example_patches/Tremolo/cmaj_Tremolo.js | 2 +- .../cmaj_api/cmaj-audio-worklet-helper.js | 8 +++++++- .../cmaj_api/cmaj-generic-patch-view.js | 6 ++++-- .../ZitaReverb/cmaj_Zita_Reverb.js | 2 +- .../cmaj_api/cmaj-audio-worklet-helper.js | 8 +++++++- .../cmaj_api/cmaj-generic-patch-view.js | 6 ++++-- cmaj_api/cmaj-audio-worklet-helper.js | 8 +++++++- cmaj_api/cmaj-compiler-wasm.wasm | Bin 26142814 -> 26142814 bytes cmaj_api/cmaj-generic-patch-view.js | 6 ++++-- 45 files changed, 179 insertions(+), 59 deletions(-) diff --git a/assets/example_patches/808/cmaj_808.js b/assets/example_patches/808/cmaj_808.js index c32215ba..fded5e2d 100644 --- a/assets/example_patches/808/cmaj_808.js +++ b/assets/example_patches/808/cmaj_808.js @@ -3,7 +3,7 @@ // This file contains a Javascript/Webassembly/WebAudio export of the Cmajor // patch '808.cmajorpatch'. // -// This file was auto-generated by the Cmajor toolkit v1.0.2636 +// This file was auto-generated by the Cmajor toolkit v1.0.2637 // // To use it, import this module into your HTML/Javascript code and call // `createAudioWorkletNodePatchConnection()`. The AudioWorkletPatchConnection diff --git a/assets/example_patches/808/cmaj_api/cmaj-audio-worklet-helper.js b/assets/example_patches/808/cmaj_api/cmaj-audio-worklet-helper.js index 362eab3f..a2217dfa 100644 --- a/assets/example_patches/808/cmaj_api/cmaj-audio-worklet-helper.js +++ b/assets/example_patches/808/cmaj_api/cmaj-audio-worklet-helper.js @@ -554,7 +554,13 @@ export class AudioWorkletPatchConnection extends PatchConnection } else { - this.rootResourcePath = window.location.href; + const getBaseUrl = (relativeURL) => + { + const baseURL = relativeURL.href.substring(0, relativeURL.href.lastIndexOf('/')); + return baseURL; + }; + + this.rootResourcePath = getBaseUrl(new URL('.', import.meta.url)); if (! this.rootResourcePath.endsWith ("/")) this.rootResourcePath += "/../"; diff --git a/assets/example_patches/808/cmaj_api/cmaj-generic-patch-view.js b/assets/example_patches/808/cmaj_api/cmaj-generic-patch-view.js index e30389b2..ca136b66 100644 --- a/assets/example_patches/808/cmaj_api/cmaj-generic-patch-view.js +++ b/assets/example_patches/808/cmaj_api/cmaj-generic-patch-view.js @@ -93,6 +93,8 @@ class GenericPatchView extends HTMLElement /** @private */ getHTML() { + const baseUrl = import.meta.url; + return `