Skip to content

Commit

Permalink
chore: improve Scale.scaleNotes documentation (#394)
Browse files Browse the repository at this point in the history
  • Loading branch information
danigb authored Nov 19, 2023
1 parent 82badd5 commit 1e34b9b
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions packages/scale/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,11 +109,13 @@ Scale.reduced("major");

### `Scale.scaleNotes(notes: string[]) => string[]`

Given an array of notes, return the scale: a pitch class set starting from the first note
Given an array of notes, return an array of sorted note names starting from the first note name of the input array.

```js
Scale.scaleNotes(["C4", "c3", "C5", "C4", "c4"]); // => ["C"]
// Always start with the first note of the input array
Scale.scaleNotes(["D4", "c#5", "A5", "F#6"]); // => ["D", "F#", "A", "C#"]
// Remove duplicates
Scale.scaleNotes(["C4", "c3", "C5", "C4", "c4"]); // => ["C"]
```

### `Scale.modes(name: string) => string[][]`
Expand Down

0 comments on commit 1e34b9b

Please sign in to comment.