Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: improve Scale.scaleNotes documentation #394

Merged
merged 1 commit into from
Nov 19, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading