supersonic-scsynth-synthdefs 0.7.1 → 0.8.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 +12 -12
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -22,15 +22,15 @@ npm install supersonic-scsynth supersonic-scsynth-synthdefs
|
|
|
22
22
|
|
|
23
23
|
```javascript
|
|
24
24
|
// Self-hosted core library
|
|
25
|
-
import { SuperSonic } from './dist/
|
|
25
|
+
import { SuperSonic } from './dist/supersupersonic.js';
|
|
26
26
|
|
|
27
|
-
const
|
|
27
|
+
const supersonic = new SuperSonic({
|
|
28
28
|
synthdefBaseURL: 'https://unpkg.com/supersonic-scsynth-synthdefs/synthdefs/'
|
|
29
29
|
});
|
|
30
|
-
await
|
|
30
|
+
await supersonic.init();
|
|
31
31
|
|
|
32
32
|
// Load synthdefs from CDN
|
|
33
|
-
await
|
|
33
|
+
await supersonic.loadSynthDefs(['sonic-pi-beep', 'sonic-pi-tb303', 'sonic-pi-prophet']);
|
|
34
34
|
```
|
|
35
35
|
|
|
36
36
|
### Self-hosted core and synthdefs
|
|
@@ -44,27 +44,27 @@ cp -r node_modules/supersonic-scsynth-synthdefs/synthdefs public/
|
|
|
44
44
|
Then use:
|
|
45
45
|
|
|
46
46
|
```javascript
|
|
47
|
-
import { SuperSonic } from './dist/
|
|
47
|
+
import { SuperSonic } from './dist/supersupersonic.js';
|
|
48
48
|
|
|
49
|
-
const
|
|
49
|
+
const supersonic = new SuperSonic({
|
|
50
50
|
synthdefBaseURL: '/synthdefs/'
|
|
51
51
|
});
|
|
52
|
-
await
|
|
52
|
+
await supersonic.init();
|
|
53
53
|
|
|
54
|
-
await
|
|
54
|
+
await supersonic.loadSynthDefs(['sonic-pi-beep', 'sonic-pi-tb303']);
|
|
55
55
|
```
|
|
56
56
|
|
|
57
57
|
### Using the CDN path helper
|
|
58
58
|
|
|
59
59
|
```javascript
|
|
60
|
-
import { SuperSonic } from './dist/
|
|
60
|
+
import { SuperSonic } from './dist/supersupersonic.js';
|
|
61
61
|
import { SYNTHDEFS_CDN } from 'supersonic-scsynth-synthdefs';
|
|
62
62
|
|
|
63
|
-
const
|
|
63
|
+
const supersonic = new SuperSonic({
|
|
64
64
|
synthdefBaseURL: SYNTHDEFS_CDN
|
|
65
65
|
});
|
|
66
|
-
await
|
|
67
|
-
await
|
|
66
|
+
await supersonic.init();
|
|
67
|
+
await supersonic.loadSynthDefs(['sonic-pi-beep']);
|
|
68
68
|
```
|
|
69
69
|
|
|
70
70
|
## Included Synthdefs
|