From 9bab06ad2ae852af54e28dfcd7299bf70f41114d Mon Sep 17 00:00:00 2001 From: Raphael Forment Date: Sat, 16 Dec 2023 17:46:55 +0100 Subject: [PATCH] Beginning work on sample import --- index.html | 14 ++++++++++++++ src/DomElements.ts | 1 + src/IO/SampleLoading.ts | 0 src/InterfaceLogic.ts | 4 ++++ 4 files changed, 19 insertions(+) create mode 100644 src/IO/SampleLoading.ts diff --git a/index.html b/index.html index e88f57b..7aa938c 100644 --- a/index.html +++ b/index.html @@ -377,6 +377,20 @@ Destroy universes + +

Audio samples

+ + + diff --git a/src/DomElements.ts b/src/DomElements.ts index 2784767..411d41d 100644 --- a/src/DomElements.ts +++ b/src/DomElements.ts @@ -18,6 +18,7 @@ export const singleElements = { load_universe_button: "load-universe-button", download_universe_button: "download-universes", upload_universe_button: "upload-universes", + upload_samples_button: "upload-samples", destroy_universes_button: "destroy-universes", documentation_button: "doc-button-1", eval_button: "eval-button-1", diff --git a/src/IO/SampleLoading.ts b/src/IO/SampleLoading.ts new file mode 100644 index 0000000..e69de29 diff --git a/src/InterfaceLogic.ts b/src/InterfaceLogic.ts index bb5eaa6..98f4440 100644 --- a/src/InterfaceLogic.ts +++ b/src/InterfaceLogic.ts @@ -159,6 +159,10 @@ export const installInterfaceLogic = (app: Editor) => { ); }); + app.interface.upload_samples_button.addEventListener("click", () => { + console.log("Uploading audio samples!") + }); + app.interface.upload_universe_button.addEventListener("click", () => { const fileInput = document.createElement("input"); fileInput.type = "file";