smplr 0.14.0 → 0.15.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.
Files changed (2) hide show
  1. package/README.md +3 -2
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -121,6 +121,7 @@ All instruments share some configuration options that are passed as second argum
121
121
  - `volume`: A number from 0 to 127 representing the instrument global volume. 100 by default
122
122
  - `destination`: An `AudioNode` that is the output of the instrument. `AudioContext.destination` is used by default
123
123
  - `volumeToGain`: a function to convert the volume to gain. It uses MIDI standard as default.
124
+ - `disableScheduler`: disable internal scheduler. `false` by default.
124
125
  - `scheduleLookaheadMs`: the lookahead of the scheduler. If the start time of the note is less than current time plus this lookahead time, the note will be started. 200ms by default.
125
126
  - `scheduleIntervalMs`: the interval of the scheduler. 50ms by default.
126
127
  - `onStart`: a function that is called when starting a note. It receives the note started as parameter. Bear in mind that the time this function is called is not precise, and it's determined by lookahead.
@@ -498,7 +499,7 @@ import { Versilian, getVersilianInstruments } from "smplr";
498
499
  const instrumentNames = await getVersilianInstruments();
499
500
 
500
501
  const context = new AudioContext();
501
- const sampler = new Versilian(context, { instrument: instrumentNAmes[0] });
502
+ const sampler = new Versilian(context, { instrument: instrumentNames[0] });
502
503
  ```
503
504
 
504
505
  ### Soundfont2Sampler
@@ -510,7 +511,7 @@ import { Soundfont2Sampler } from "smplr";
510
511
  import { SoundFont2 } from "soundfont2";
511
512
 
512
513
  const context = new AudioContext();
513
- const sampler = Soundfont2Sampler(context, {
514
+ const sampler = new Soundfont2Sampler(context, {
514
515
  url: "https://smpldsnds.github.io/soundfonts/soundfonts/galaxy-electric-pianos.sf2",
515
516
  createSoundfont: (data) => new SoundFont2(data),
516
517
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "smplr",
3
- "version": "0.14.0",
3
+ "version": "0.15.0",
4
4
  "homepage": "https://github.com/danigb/smplr#readme",
5
5
  "description": "A Sampled collection of instruments",
6
6
  "main": "dist/index.js",