From d02b1fc05cbbd65d7f76d8977bc1b5d4306cec1a Mon Sep 17 00:00:00 2001 From: hpunq <128979576+hpunq@users.noreply.github.com> Date: Sun, 27 Apr 2025 11:05:06 +0100 Subject: [PATCH] update docs to reflect import sounds tab change --- website/src/pages/learn/samples.mdx | 14 ++++++++------ website/src/repl/components/panel/SoundsTab.jsx | 4 ++-- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/website/src/pages/learn/samples.mdx b/website/src/pages/learn/samples.mdx index 44259617..890de3aa 100644 --- a/website/src/pages/learn/samples.mdx +++ b/website/src/pages/learn/samples.mdx @@ -66,7 +66,7 @@ While it saves resources, it can also lead to sounds not being audible the first # Sound Banks -If we open the `sounds` tab and then `drum machines`, we can see that the drum samples are all prefixed with drum machine names: `RolandTR808_bd`, `RolandTR808_sd`, `RolandTR808_hh` etc.. +If we open the `sounds` tab and then `drum-machines`, we can see that the drum samples are all prefixed with drum machine names: `RolandTR808_bd`, `RolandTR808_sd`, `RolandTR808_hh` etc.. We _could_ use them like this: @@ -180,11 +180,12 @@ It assumes a `strudel.json` file to be present at the root of the repository: https://raw.githubusercontent.com////strudel.json ``` -## From Disk via "Import Sounds" +## From Disk via "Import Sounds Folder" If you don't want to upload your samples to the internet, you can also load them from your local disk. -Go to the `sounds` tab in the REPL and press "import sounds". -Then you can select a folder that contains audio files. The folder you select can also contain subfolders with audio files. +Go to the `sounds` tab in the REPL and open the `import-sounds` tab below the search bar. +Press the "import sounds folder" button and select a folder that contains audio files. +The folder you select can also contain subfolders with audio files. Example: ``` @@ -200,12 +201,13 @@ Example: ``` In the above example the folder `samples` contains 2 subfolders `swoop` and `smash`, which contain audio files. -If you select that `samples` folder, the `user` tab (next to the import sounds button) will then contain 2 new sounds: `swoop(3) smash(3)` +If you select that `samples` folder, the `user` tab (next to the `import-sounds` tab) will then contain 2 new sounds: `swoop(3) smash(3)` The individual samples can the be played normally like `s("swoop:0 swoop:1 smash:2")`. +The samples within each sound use zero-based indexing in alphabetical order. ## From Disk via @strudel/sampler -Instead of loading your samples into your browser with the "import sounds" button, you can also serve the samples from a local file server. +Instead of loading your samples into your browser with the "import sounds folder" button, you can also serve the samples from a local file server. The easiest way to do this is using [@strudel/sampler](https://www.npmjs.com/package/@strudel/sampler): ```sh diff --git a/website/src/repl/components/panel/SoundsTab.jsx b/website/src/repl/components/panel/SoundsTab.jsx index 4c88e8ae..a976eb3d 100644 --- a/website/src/repl/components/panel/SoundsTab.jsx +++ b/website/src/repl/components/panel/SoundsTab.jsx @@ -110,7 +110,7 @@ export function SoundsTab() { settingsMap.setKey('soundsFilter', 'user')} />

To import sounds into strudel, they must be contained{' '} - + within a folder or subfolder . The best way to do this is to upload a “samples” folder containing subfolders of individual sounds or @@ -134,7 +134,7 @@ export function SoundsTab() {

For more information, and other ways to use your own sounds in strudel,{' '} - + check out the docs !