smplr 0.12.1 → 0.12.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.
Files changed (2) hide show
  1. package/README.md +8 -3
  2. package/package.json +10 -9
package/README.md CHANGED
@@ -296,16 +296,21 @@ const piano = new SplendidGrandPiano(context, { storage });
296
296
 
297
297
  ### Sampler
298
298
 
299
- An audio buffer sampler.
299
+ An audio buffer sampler. Pass a `buffers` object with the files to be load:
300
300
 
301
301
  ```js
302
302
  import { Sampler } from "smplr";
303
303
 
304
- const samples = {
304
+ const buffers = {
305
305
  kick: "https://danigb.github.io/samples/drum-machines/808-mini/kick.m4a",
306
306
  snare: "https://danigb.github.io/samples/drum-machines/808-mini/snare-1.m4a",
307
307
  };
308
- const sampler = new Sampler(new AudioContext(), { samples });
308
+ const sampler = new Sampler(new AudioContext(), { buffers });
309
+ ```
310
+
311
+ And then use the name of the buffer as note name:
312
+
313
+ ```js
309
314
  sampler.start({ note: "kick" });
310
315
  ```
311
316
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "smplr",
3
- "version": "0.12.1",
3
+ "version": "0.12.2",
4
4
  "homepage": "https://github.com/danigb/smplr#readme",
5
5
  "description": "A Sampled collection of instruments",
6
6
  "main": "dist/index.js",
@@ -26,14 +26,14 @@
26
26
  },
27
27
  "devDependencies": {
28
28
  "@changesets/cli": "^2.25.2",
29
- "@types/audioworklet": "^0.0.52",
30
- "@types/jest": "^29.5.8",
29
+ "@types/audioworklet": "^0.0.54",
30
+ "@types/jest": "^29.5.12",
31
31
  "jest": "^29.4.1",
32
- "prettier": "^3.1.0",
33
- "ts-jest": "^29.0.5",
34
- "tsup": "^8.0.1",
35
- "turbo": "^1.10.16",
36
- "typedoc": "^0.25.3"
32
+ "prettier": "^3.2.5",
33
+ "ts-jest": "^29.1.2",
34
+ "tsup": "^8.0.2",
35
+ "turbo": "^1.12.4",
36
+ "typedoc": "^0.25.8"
37
37
  },
38
38
  "publishConfig": {
39
39
  "access": "public"
@@ -43,7 +43,8 @@
43
43
  "build:worklet:reverb": "esbuild src/reverb/worklet-processor.ts --bundle --minify > src/reverb/processor.min.js",
44
44
  "test": "yarn test:unit && yarn test:types",
45
45
  "test:unit": "jest",
46
- "test:types": "tsc --noEmit"
46
+ "test:types": "tsc --noEmit",
47
+ "publish": "npm test && npm run build && changeset publish"
47
48
  },
48
49
  "engines": {
49
50
  "node": ">=14.0.0"