supersonic-scsynth-samples 0.7.2 → 0.10.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 +9 -9
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -16,21 +16,21 @@ npm install supersonic-scsynth-samples
|
|
|
16
16
|
|
|
17
17
|
```javascript
|
|
18
18
|
// Self-hosted core library
|
|
19
|
-
import { SuperSonic } from './dist/
|
|
19
|
+
import { SuperSonic } from './dist/supersupersonic.js';
|
|
20
20
|
|
|
21
|
-
const
|
|
21
|
+
const supersonic = new SuperSonic({
|
|
22
22
|
sampleBaseURL: 'https://unpkg.com/supersonic-scsynth-samples@latest/samples/'
|
|
23
23
|
});
|
|
24
24
|
|
|
25
|
-
await
|
|
25
|
+
await supersonic.init();
|
|
26
26
|
|
|
27
27
|
// Load any sample
|
|
28
|
-
await
|
|
29
|
-
await
|
|
30
|
-
await
|
|
28
|
+
await supersonic.allocReadBuffer(0, 'bd_haus.flac');
|
|
29
|
+
await supersonic.allocReadBuffer(1, 'loop_amen.flac');
|
|
30
|
+
await supersonic.allocReadBuffer(2, 'ambi_choir.flac');
|
|
31
31
|
|
|
32
32
|
// Play with basic_mono_player synthdef
|
|
33
|
-
|
|
33
|
+
supersonic.send('/s_new', 'sonic-pi-basic_mono_player', -1, 0, 1, 'buf', 0);
|
|
34
34
|
```
|
|
35
35
|
|
|
36
36
|
### Self-hosted core and samples
|
|
@@ -38,9 +38,9 @@ sonic.send('/s_new', 'sonic-pi-basic_mono_player', -1, 0, 1, 'buf', 0);
|
|
|
38
38
|
Copy samples to your public directory and reference them locally:
|
|
39
39
|
|
|
40
40
|
```javascript
|
|
41
|
-
import { SuperSonic } from './dist/
|
|
41
|
+
import { SuperSonic } from './dist/supersupersonic.js';
|
|
42
42
|
|
|
43
|
-
const
|
|
43
|
+
const supersonic = new SuperSonic({
|
|
44
44
|
sampleBaseURL: './samples/'
|
|
45
45
|
});
|
|
46
46
|
```
|