Skip to content

Commit

Permalink
v0.12.0 (#54)
Browse files Browse the repository at this point in the history
* feat: add changelog and documentation

* chore: bump deps
  • Loading branch information
danigb committed Dec 15, 2023
1 parent 410c86b commit 66b4654
Show file tree
Hide file tree
Showing 4 changed files with 447 additions and 6,821 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# smplr

## 0.12.0

### Minor Changes

- SplendidGrandPiano supports loading a subset of notes

## 0.11.x

- 0.11.3 Add support for standardized audio context
Expand Down
24 changes: 24 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -371,6 +371,30 @@ const piano = new SplendidGrandPiano(new AudioContext());
piano.start({ note: "C4" });
```

#### SplendidGrandPiano constructor

The second argument of the constructor accepts the following options:

- `baseUrl`:
- `detune`: global detune in cents (0 if not specified)
- `velocity`: default velocity (100 if not specified)
- `volume`: default volume (100 if not specified)
- `decayTime`: default decay time (0.5 seconds)
- `notesToLoad`: an object with the following shape: `{ notes: number[], velocityRange: [number, number]}` to specify a subset of notes to load

Example:

```ts
const piano = new SplendidGrandPiano(context, {
detune: -20,
volume: 80,
notesToLoad: {
notes: [60],
velocityRange: [1, 127],
},
});
```

### Electric Piano

A sampled electric pianos. Samples from https://github.com/sfzinstruments/GregSullivan.E-Pianos
Expand Down

0 comments on commit 66b4654

Please sign in to comment.