supersonic-scsynth-bundle 0.23.3 → 0.24.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -11
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -20,27 +20,21 @@ This installs all three packages as dependencies.
|
|
|
20
20
|
|
|
21
21
|
## Usage
|
|
22
22
|
|
|
23
|
-
**Important:** SuperSonic cannot be loaded from a CDN. You must self-host the core library and serve it with COOP/COEP headers. See the [main README](https://github.com/samaaron/supersonic#cdn-usage) for details.
|
|
24
|
-
|
|
25
23
|
```javascript
|
|
26
|
-
import { SuperSonic } from '
|
|
27
|
-
|
|
28
|
-
// Synthdefs and samples can use CDN
|
|
29
|
-
const supersonic = new SuperSonic({
|
|
30
|
-
sampleBaseURL: 'https://unpkg.com/supersonic-scsynth-samples@latest/samples/',
|
|
31
|
-
synthdefBaseURL: 'https://unpkg.com/supersonic-scsynth-synthdefs@latest/synthdefs/'
|
|
32
|
-
});
|
|
24
|
+
import { SuperSonic } from 'https://unpkg.com/supersonic-scsynth@latest';
|
|
33
25
|
|
|
26
|
+
const supersonic = new SuperSonic();
|
|
34
27
|
await supersonic.init();
|
|
35
28
|
await supersonic.loadSynthDefs(['sonic-pi-beep', 'sonic-pi-tb303']);
|
|
36
29
|
```
|
|
37
30
|
|
|
31
|
+
SuperSonic works directly from CDN with zero configuration using the default `postMessage` mode. For lower latency, use `mode: 'sab'` which requires COOP/COEP headers.
|
|
32
|
+
|
|
38
33
|
## When to Use This
|
|
39
34
|
|
|
40
35
|
**Use this bundle if:**
|
|
41
36
|
- You want a quick start with everything included
|
|
42
|
-
- You
|
|
43
|
-
- You want the Sonic Pi synthdefs and samples
|
|
37
|
+
- You want access to all the Sonic Pi synths and samples
|
|
44
38
|
|
|
45
39
|
**Use separate packages if:**
|
|
46
40
|
- You want minimal package size (just install `supersonic-scsynth`)
|