supersonic-scsynth 0.1.0 → 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 CHANGED
@@ -1,6 +1,6 @@
1
1
  # SuperSonic
2
2
 
3
- > **Warning - Super Alpha Status**: SuperSonic is currently in active development (v0.1.0). The API is likely to change between releases. Feedback welcome!
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
 
@@ -16,7 +16,7 @@ Note: SuperSonic uses a SharedBuffer to send and receive OSC messages from scsyn
16
16
  ### Option 1: npm Package (Recommended)
17
17
 
18
18
  ```bash
19
- # Core engine only (~2MB)
19
+ # Core engine only (~450KB)
20
20
  npm install supersonic-scsynth
21
21
 
22
22
  # Or install everything (engine + synthdefs + samples)
@@ -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@0.1.0';
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-bd@0.1.0/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@0.1.0/synthdefs/'
41
+ 'https://unpkg.com/supersonic-scsynth-synthdefs@latest/synthdefs/'
42
42
  );
43
43
  </script>
44
44
  ```
@@ -49,34 +49,29 @@ The 'nightly' (i.e. for every new commit) pre-built distribution files are publi
49
49
 
50
50
  https://samaaron.github.io/supersonic/supersonic-dist.zip
51
51
 
52
+ This includes:
53
+ - Core engine (WASM + JS)
54
+ - All 120 synthdefs
55
+ - All 206 samples
56
+ - Size: ~35MB
57
+
52
58
  ## Package Structure
53
59
 
54
60
  SuperSonic is published as multiple npm packages to keep the core engine small:
55
61
 
56
62
  ### Core Package
57
- - **`supersonic-scsynth`** (~2MB) - The WebAssembly scsynth engine
63
+ - **`supersonic-scsynth`** (~450KB) - The WebAssembly scsynth engine
58
64
  - GPL-3.0-or-later license
59
65
 
60
66
  ### Resource Packages
61
- - **`supersonic-scsynth-synthdefs`** (~7MB) - All 120 Sonic Pi synthdefs
67
+ - **`supersonic-scsynth-synthdefs`** (~67KB) - All 120 Sonic Pi synthdefs
62
68
  - MIT license
63
69
  - From [Sonic Pi](https://github.com/sonic-pi-net/sonic-pi)
64
70
 
65
- - **`supersonic-scsynth-samples`** - Meta-package for all Sonic Pi samples
71
+ - **`supersonic-scsynth-samples`** (~34MB) - All 206 Sonic Pi samples
66
72
  - CC0-1.0 license (public domain)
67
- - Includes 18 category packages (install individually to save space):
68
- - `supersonic-scsynth-samples-bd` - Bass drums
69
- - `supersonic-scsynth-samples-sn` - Snares
70
- - `supersonic-scsynth-samples-hat` - Hi-hats
71
- - `supersonic-scsynth-samples-loop` - Drum loops
72
- - `supersonic-scsynth-samples-ambi` - Ambient sounds
73
- - `supersonic-scsynth-samples-bass` - Bass sounds
74
- - `supersonic-scsynth-samples-elec` - Electronic sounds
75
- - `supersonic-scsynth-samples-glitch` - Glitch sounds
76
- - `supersonic-scsynth-samples-guit` - Guitar sounds
77
- - `supersonic-scsynth-samples-perc` - Percussion
78
- - `supersonic-scsynth-samples-misc` - Miscellaneous
79
- - Plus: arovane, drum, mehackit, ride, tabla, tbd, vinyl
73
+ - Categories: ambient, bass, drums, electronic, glitch, guitar, hi-hats, loops, percussion, snares, tabla, vinyl, and more
74
+ - From [Sonic Pi](https://github.com/sonic-pi-net/sonic-pi)
80
75
 
81
76
  ### Convenience Package
82
77
  - **`supersonic-scsynth-bundle`** - Includes core + synthdefs + all samples
@@ -107,7 +102,7 @@ source ~/path/to/emsdk_env.sh
107
102
  ./build.sh
108
103
  ```
109
104
 
110
- Outputs to `dist/` directory (~1.5MB WASM + ~80KB JS).
105
+ Outputs to `dist/` directory (~1.5MB WASM + ~76KB JS + symlinks to synthdefs/samples).
111
106
 
112
107
  ### 2. Serve Demo
113
108
 
@@ -159,11 +154,11 @@ sonic.send('/notify', 1);
159
154
  ### With Synthdefs and Samples (npm/CDN)
160
155
 
161
156
  ```javascript
162
- import { SuperSonic } from 'https://unpkg.com/supersonic-scsynth@0.1.0';
157
+ import { SuperSonic } from 'https://unpkg.com/supersonic-scsynth@latest';
163
158
 
164
159
  // Configure sample path (required for buffer loading)
165
160
  const sonic = new SuperSonic({
166
- audioBaseURL: 'https://unpkg.com/supersonic-scsynth-samples-bd@0.1.0/samples/'
161
+ audioBaseURL: 'https://unpkg.com/supersonic-scsynth-samples@latest/samples/'
167
162
  });
168
163
 
169
164
  await sonic.init();
@@ -171,7 +166,7 @@ await sonic.init();
171
166
  // Load synthdefs (baseUrl is required)
172
167
  await sonic.loadSynthDefs(
173
168
  ['sonic-pi-beep', 'sonic-pi-tb303'],
174
- 'https://unpkg.com/supersonic-scsynth-synthdefs@0.1.0/synthdefs/'
169
+ 'https://unpkg.com/supersonic-scsynth-synthdefs@latest/synthdefs/'
175
170
  );
176
171
 
177
172
  // Play a synth
@@ -230,9 +225,8 @@ npm install supersonic-scsynth
230
225
  # Synthdefs (optional)
231
226
  npm install supersonic-scsynth-synthdefs
232
227
 
233
- # Individual sample categories (optional)
234
- npm install supersonic-scsynth-samples-bd
235
- npm install supersonic-scsynth-samples-loop
228
+ # Samples (optional)
229
+ npm install supersonic-scsynth-samples
236
230
 
237
231
  # Or everything at once
238
232
  npm install supersonic-scsynth-bundle
@@ -242,16 +236,16 @@ Then use via CDN in your HTML:
242
236
 
243
237
  ```html
244
238
  <script type="module">
245
- import { SuperSonic } from 'https://unpkg.com/supersonic-scsynth@0.1.0';
239
+ import { SuperSonic } from 'https://unpkg.com/supersonic-scsynth@latest';
246
240
 
247
241
  const sonic = new SuperSonic({
248
- audioBaseURL: 'https://unpkg.com/supersonic-scsynth-samples-bd@0.1.0/samples/'
242
+ audioBaseURL: 'https://unpkg.com/supersonic-scsynth-samples@latest/samples/'
249
243
  });
250
244
 
251
245
  await sonic.init();
252
246
  await sonic.loadSynthDefs(
253
247
  ['sonic-pi-beep'],
254
- 'https://unpkg.com/supersonic-scsynth-synthdefs@0.1.0/synthdefs/'
248
+ 'https://unpkg.com/supersonic-scsynth-synthdefs@latest/synthdefs/'
255
249
  );
256
250
  </script>
257
251
  ```
@@ -282,32 +276,23 @@ Sample and synthdef paths must be explicitly configured:
282
276
 
283
277
  ```javascript
284
278
  const sonic = new SuperSonic({
285
- audioBaseURL: 'https://unpkg.com/supersonic-scsynth-samples-bd@0.1.0/samples/'
279
+ audioBaseURL: 'https://unpkg.com/supersonic-scsynth-samples@latest/samples/'
286
280
  });
287
281
 
288
282
  await sonic.loadSynthDefs(
289
283
  ['sonic-pi-beep'],
290
- 'https://unpkg.com/supersonic-scsynth-synthdefs@0.1.0/synthdefs/'
284
+ 'https://unpkg.com/supersonic-scsynth-synthdefs@latest/synthdefs/'
291
285
  );
292
286
  ```
293
287
 
294
- **Engine Paths (Default):**
288
+ **Engine Paths:**
295
289
 
296
290
  The core engine expects these files relative to your HTML:
297
291
  - WASM: `./dist/wasm/scsynth-nrt.wasm`
298
292
  - AudioWorklet: `./dist/workers/scsynth_audio_worklet.js`
299
293
  - Workers: `./dist/workers/osc_out_worker.js`, `osc_in_worker.js`, `debug_worker.js`
300
294
 
301
- **Custom Engine Paths:**
302
-
303
- ```javascript
304
- const sonic = new SuperSonic();
305
- sonic.config.wasmUrl = '/custom/path/scsynth-nrt.wasm';
306
- sonic.config.workletUrl = '/custom/path/scsynth_audio_worklet.js';
307
- await sonic.init();
308
- ```
309
-
310
- **Note:** Worker paths are currently hardcoded to `./dist/workers/` and cannot be configured.
295
+ These paths are currently not configurable.
311
296
 
312
297
 
313
298
  ## License
@@ -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-bd@0.1.0/samples/" })\nOr install sample packages: npm install supersonic-scsynth-samples-bd'
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@0.1.0/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@0.1.0/synthdefs/")\nOr install: npm install 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 = {};
@@ -1,8 +1,6 @@
1
1
  {
2
- "wasmFile": "scsynth-nrt.ca1dd592.wasm",
3
- "wasmFileStable": "scsynth-nrt.wasm",
4
- "hash": "ca1dd592",
5
- "buildId": "20251102-111057",
6
- "buildTime": "2025-11-02T11:10:57Z",
7
- "gitHash": "cc71875"
2
+ "wasmFile": "scsynth-nrt.wasm",
3
+ "buildId": "20251104-122135",
4
+ "buildTime": "2025-11-04T12:21:35Z",
5
+ "gitHash": "261e158"
8
6
  }
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "supersonic-scsynth",
3
- "version": "0.1.0",
3
+ "version": "0.1.2",
4
4
  "description": "SuperCollider scsynth WebAssembly port for AudioWorklet - Run SuperCollider synthesis in the browser",
5
5
  "main": "dist/supersonic.js",
6
6
  "unpkg": "dist/supersonic.js",
@@ -8,8 +8,10 @@
8
8
  "type": "module",
9
9
  "scripts": {
10
10
  "build": "./build.sh",
11
+ "build:release": "./build.sh --release",
11
12
  "clean": "./clean.sh",
12
- "dev": "cd example && ruby server.rb"
13
+ "dev": "cd example && ruby server.rb",
14
+ "prepublishOnly": "./build.sh --release"
13
15
  },
14
16
  "repository": {
15
17
  "type": "git",