supersonic-scsynth 0.1.1 → 0.1.2
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 +12 -12
- package/dist/supersonic.js +3 -3
- package/dist/wasm/manifest.json +3 -3
- package/dist/wasm/scsynth-nrt.wasm +0 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# SuperSonic
|
|
2
2
|
|
|
3
|
-
> **Warning - Super Alpha Status**: SuperSonic is currently in active development (v0.1.
|
|
3
|
+
> **Warning - Super Alpha Status**: SuperSonic is currently in active development (v0.1.1). The API is likely to change between releases. Feedback welcome!
|
|
4
4
|
|
|
5
5
|
This is a WebAssembly port of SuperCollider's highly flexible and powerful synthesis engine scsynth.
|
|
6
6
|
|
|
@@ -27,10 +27,10 @@ npm install supersonic-scsynth-bundle
|
|
|
27
27
|
|
|
28
28
|
```html
|
|
29
29
|
<script type="module">
|
|
30
|
-
import { SuperSonic } from 'https://unpkg.com/supersonic-scsynth@
|
|
30
|
+
import { SuperSonic } from 'https://unpkg.com/supersonic-scsynth@latest';
|
|
31
31
|
|
|
32
32
|
const sonic = new SuperSonic({
|
|
33
|
-
audioBaseURL: 'https://unpkg.com/supersonic-scsynth-samples@
|
|
33
|
+
audioBaseURL: 'https://unpkg.com/supersonic-scsynth-samples@latest/samples/'
|
|
34
34
|
});
|
|
35
35
|
|
|
36
36
|
await sonic.init();
|
|
@@ -38,7 +38,7 @@ npm install supersonic-scsynth-bundle
|
|
|
38
38
|
// Load synthdefs from CDN
|
|
39
39
|
await sonic.loadSynthDefs(
|
|
40
40
|
['sonic-pi-beep'],
|
|
41
|
-
'https://unpkg.com/supersonic-scsynth-synthdefs@
|
|
41
|
+
'https://unpkg.com/supersonic-scsynth-synthdefs@latest/synthdefs/'
|
|
42
42
|
);
|
|
43
43
|
</script>
|
|
44
44
|
```
|
|
@@ -154,11 +154,11 @@ sonic.send('/notify', 1);
|
|
|
154
154
|
### With Synthdefs and Samples (npm/CDN)
|
|
155
155
|
|
|
156
156
|
```javascript
|
|
157
|
-
import { SuperSonic } from 'https://unpkg.com/supersonic-scsynth@
|
|
157
|
+
import { SuperSonic } from 'https://unpkg.com/supersonic-scsynth@latest';
|
|
158
158
|
|
|
159
159
|
// Configure sample path (required for buffer loading)
|
|
160
160
|
const sonic = new SuperSonic({
|
|
161
|
-
audioBaseURL: 'https://unpkg.com/supersonic-scsynth-samples@
|
|
161
|
+
audioBaseURL: 'https://unpkg.com/supersonic-scsynth-samples@latest/samples/'
|
|
162
162
|
});
|
|
163
163
|
|
|
164
164
|
await sonic.init();
|
|
@@ -166,7 +166,7 @@ await sonic.init();
|
|
|
166
166
|
// Load synthdefs (baseUrl is required)
|
|
167
167
|
await sonic.loadSynthDefs(
|
|
168
168
|
['sonic-pi-beep', 'sonic-pi-tb303'],
|
|
169
|
-
'https://unpkg.com/supersonic-scsynth-synthdefs@
|
|
169
|
+
'https://unpkg.com/supersonic-scsynth-synthdefs@latest/synthdefs/'
|
|
170
170
|
);
|
|
171
171
|
|
|
172
172
|
// Play a synth
|
|
@@ -236,16 +236,16 @@ Then use via CDN in your HTML:
|
|
|
236
236
|
|
|
237
237
|
```html
|
|
238
238
|
<script type="module">
|
|
239
|
-
import { SuperSonic } from 'https://unpkg.com/supersonic-scsynth@
|
|
239
|
+
import { SuperSonic } from 'https://unpkg.com/supersonic-scsynth@latest';
|
|
240
240
|
|
|
241
241
|
const sonic = new SuperSonic({
|
|
242
|
-
audioBaseURL: 'https://unpkg.com/supersonic-scsynth-samples@
|
|
242
|
+
audioBaseURL: 'https://unpkg.com/supersonic-scsynth-samples@latest/samples/'
|
|
243
243
|
});
|
|
244
244
|
|
|
245
245
|
await sonic.init();
|
|
246
246
|
await sonic.loadSynthDefs(
|
|
247
247
|
['sonic-pi-beep'],
|
|
248
|
-
'https://unpkg.com/supersonic-scsynth-synthdefs@
|
|
248
|
+
'https://unpkg.com/supersonic-scsynth-synthdefs@latest/synthdefs/'
|
|
249
249
|
);
|
|
250
250
|
</script>
|
|
251
251
|
```
|
|
@@ -276,12 +276,12 @@ Sample and synthdef paths must be explicitly configured:
|
|
|
276
276
|
|
|
277
277
|
```javascript
|
|
278
278
|
const sonic = new SuperSonic({
|
|
279
|
-
audioBaseURL: 'https://unpkg.com/supersonic-scsynth-samples@
|
|
279
|
+
audioBaseURL: 'https://unpkg.com/supersonic-scsynth-samples@latest/samples/'
|
|
280
280
|
});
|
|
281
281
|
|
|
282
282
|
await sonic.loadSynthDefs(
|
|
283
283
|
['sonic-pi-beep'],
|
|
284
|
-
'https://unpkg.com/supersonic-scsynth-synthdefs@
|
|
284
|
+
'https://unpkg.com/supersonic-scsynth-synthdefs@latest/synthdefs/'
|
|
285
285
|
);
|
|
286
286
|
```
|
|
287
287
|
|
package/dist/supersonic.js
CHANGED
|
@@ -2101,7 +2101,7 @@ var SuperSonic = class {
|
|
|
2101
2101
|
}
|
|
2102
2102
|
if (!this.audioBaseURL) {
|
|
2103
2103
|
throw new Error(
|
|
2104
|
-
'audioBaseURL not configured. Please set it in SuperSonic constructor options.\nExample: new SuperSonic({ audioBaseURL: "https://unpkg.com/supersonic-scsynth-samples
|
|
2104
|
+
'audioBaseURL not configured. Please set it in SuperSonic constructor options.\nExample: new SuperSonic({ audioBaseURL: "https://unpkg.com/supersonic-scsynth-samples@latest/samples/" })\nOr install sample packages: npm install supersonic-scsynth-samples'
|
|
2105
2105
|
);
|
|
2106
2106
|
}
|
|
2107
2107
|
return this.audioBaseURL + scPath;
|
|
@@ -2316,7 +2316,7 @@ var SuperSonic = class {
|
|
|
2316
2316
|
* @example
|
|
2317
2317
|
* const results = await sonic.loadSynthDefs(
|
|
2318
2318
|
* ['sonic-pi-beep', 'sonic-pi-tb303'],
|
|
2319
|
-
* 'https://unpkg.com/supersonic-scsynth-synthdefs@
|
|
2319
|
+
* 'https://unpkg.com/supersonic-scsynth-synthdefs@latest/synthdefs/'
|
|
2320
2320
|
* );
|
|
2321
2321
|
*/
|
|
2322
2322
|
async loadSynthDefs(names, baseUrl) {
|
|
@@ -2325,7 +2325,7 @@ var SuperSonic = class {
|
|
|
2325
2325
|
}
|
|
2326
2326
|
if (!baseUrl) {
|
|
2327
2327
|
throw new Error(
|
|
2328
|
-
'baseUrl is required. Please specify the URL to your synthdefs.\nExample: await sonic.loadSynthDefs(["sonic-pi-beep"], "https://unpkg.com/supersonic-scsynth-synthdefs@
|
|
2328
|
+
'baseUrl is required. Please specify the URL to your synthdefs.\nExample: await sonic.loadSynthDefs(["sonic-pi-beep"], "https://unpkg.com/supersonic-scsynth-synthdefs@latest/synthdefs/")\nOr install: npm install supersonic-scsynth-synthdefs'
|
|
2329
2329
|
);
|
|
2330
2330
|
}
|
|
2331
2331
|
const results = {};
|
package/dist/wasm/manifest.json
CHANGED
|
Binary file
|
package/package.json
CHANGED