supersonic-scsynth 0.1.8 → 0.2.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 +4 -4
- package/dist/supersonic.js +1264 -702
- package/dist/wasm/manifest.json +3 -3
- package/dist/wasm/scsynth-nrt.wasm +0 -0
- package/dist/workers/debug_worker.js +16 -3
- package/dist/workers/osc_in_worker.js +17 -8
- package/dist/workers/osc_out_prescheduler_worker.js +575 -0
- package/dist/workers/osc_out_worker.js +46 -183
- package/dist/workers/ring_buffer_worker_base.js +305 -0
- package/dist/workers/scsynth_audio_worklet.js +44 -23
- package/dist/workers/system_worker.js +64 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -21,11 +21,11 @@ A WebAssembly port of SuperCollider's scsynth audio synthesis engine for the bro
|
|
|
21
21
|
await sonic.loadSynthDefs(['sonic-pi-beep']);
|
|
22
22
|
|
|
23
23
|
// Trigger the synth
|
|
24
|
-
sonic.send('/s_new', 'sonic-pi-beep', -1, 0,
|
|
24
|
+
sonic.send('/s_new', 'sonic-pi-beep', -1, 0, 0, 'note', 60);
|
|
25
25
|
|
|
26
26
|
// Load and play a sample
|
|
27
27
|
sonic.send('/b_allocRead', 0, 'bd_haus.flac');
|
|
28
|
-
sonic.send('/s_new', 'sonic-pi-basic_mono_player', -1, 0,
|
|
28
|
+
sonic.send('/s_new', 'sonic-pi-basic_mono_player', -1, 0, 0, 'buf', 0);
|
|
29
29
|
</script>
|
|
30
30
|
```
|
|
31
31
|
|
|
@@ -90,7 +90,7 @@ const sonic = new SuperSonic({
|
|
|
90
90
|
**Common OSC commands:**
|
|
91
91
|
```javascript
|
|
92
92
|
sonic.send('/notify', 1); // Enable notifications
|
|
93
|
-
sonic.send('/s_new', 'synth-name', -1, 0,
|
|
93
|
+
sonic.send('/s_new', 'synth-name', -1, 0, 0); // Create synth
|
|
94
94
|
sonic.send('/n_set', 1000, 'freq', 440.0, 'amp', 0.5); // Set parameters
|
|
95
95
|
sonic.send('/n_free', 1000); // Free node
|
|
96
96
|
sonic.send('/b_allocRead', 0, 'sample.flac'); // Load audio buffer
|
|
@@ -163,7 +163,7 @@ dist/
|
|
|
163
163
|
└── workers/
|
|
164
164
|
├── scsynth_audio_worklet.js # AudioWorklet processor
|
|
165
165
|
├── osc_in_worker.js # OSC input handler
|
|
166
|
-
├──
|
|
166
|
+
├── osc_out_prescheduler_worker.js # OSC pre-scheduler (timers & tag cancellation)
|
|
167
167
|
└── debug_worker.js # Debug logger
|
|
168
168
|
```
|
|
169
169
|
|