-
Notifications
You must be signed in to change notification settings - Fork 219
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat: tokenize accepts a pitch class as bass after a slash * feat: use always pitch classes with chords * feat: chord with bass and without octave number * feat: add Chord.transpose for slash chords * feat: changes to tonal package * feat: browser build
- Loading branch information
Showing
8 changed files
with
264 additions
and
134 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
--- | ||
"@tonaljs/chord": major | ||
"tonal": major | ||
--- | ||
|
||
#### Breaking change: chord uses pitch classes, never notes with octaves | ||
|
||
- Breaking change: chords uses only pitch classes. Before `Chord.getChord('M', 'C4')` would consider `C4` to be the tonic and now is `C`` | ||
|
||
So **before**: | ||
|
||
```js | ||
Chord.get("M", "C4"); // => | ||
// { | ||
// name: 'C4 major', | ||
// tonic: 'C4', | ||
// notes: [ 'C4', 'E4', 'G4' ] | ||
// ... | ||
// } | ||
``` | ||
|
||
**Now**: | ||
|
||
```js | ||
Chord.get("M", "C4"); // => | ||
// { | ||
// name: 'C major', | ||
// tonic: 'C', | ||
// notes: [ 'C', 'E', 'G' ] | ||
// } | ||
``` | ||
|
||
### Feature: slash chords | ||
|
||
- Chord now accepts a slash and a bass. The bass _must_ be a pitch class | ||
- Chord properties include `bass` that is a pitch class that could or could not belong to the chord itself. | ||
|
||
Example: | ||
|
||
```js | ||
Chord.get("Cmaj7/B"); | ||
Chord.get("Eb/D"); | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.