@tonaljs/chord 6.1.0 → 6.1.2

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.
package/README.md CHANGED
@@ -73,7 +73,7 @@ Chord.getChord("maj7", "C", "B") === Chord.get("Cmaj7/B");
73
73
  Print the notes of the given chord at the given tonic:
74
74
 
75
75
  ```js
76
- Chord.notes("maj4", "C4"); // => ["C4", "E4", "G4", "B4"]
76
+ Chord.notes("maj7", "C4"); // => ["C4", "E4", "G4", "B4"]
77
77
  ```
78
78
 
79
79
  ### `Chord.degrees(chordType: string, tonic?: string) => (degree: number) => string`
@@ -106,15 +106,15 @@ c4m7(0); // => ""
106
106
 
107
107
  See [`Scale.degrees`](https://github.com/tonaljs/tonal/tree/main/packages/scale#scaledegreesscalename-string--degree-number--string)
108
108
 
109
- ### `Chord.steps(chordName: string) => (degree: number) => string`
109
+ ### `Chord.steps(chordType: string, tonic?: string) => (degree: number) => string`
110
110
 
111
111
  Same as `Chord.degrees` but 0 is the tonic. Plays better with numeric ranges:
112
112
 
113
113
  ```js
114
114
  import { Range, Chord } from "tonal";
115
115
 
116
- Range.numeric([-3, 3]).map(Chord.steps(["C4", "aug"]));
117
- // => ["G#3", "E3", "C3", "C4", "E4", "G#4", "C5"]
116
+ Range.numeric([-3, 3]).map(Chord.steps("aug", "C4"));
117
+ // => ["C3", "E3", "G#3", "C4", "E4", "G#4", "C5"]
118
118
  ```
119
119
 
120
120
  #### `Chord.detect(notes: string[]) => string[]`
package/dist/index.js CHANGED
@@ -18,11 +18,11 @@ var __copyProps = (to, from, except, desc) => {
18
18
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
19
 
20
20
  // index.ts
21
- var chord_exports = {};
22
- __export(chord_exports, {
21
+ var index_exports = {};
22
+ __export(index_exports, {
23
23
  chord: () => chord,
24
24
  chordScales: () => chordScales,
25
- default: () => chord_default,
25
+ default: () => index_default,
26
26
  degrees: () => degrees,
27
27
  detect: () => import_chord_detect2.detect,
28
28
  extended: () => extended,
@@ -34,7 +34,7 @@ __export(chord_exports, {
34
34
  tokenize: () => tokenize,
35
35
  transpose: () => transpose
36
36
  });
37
- module.exports = __toCommonJS(chord_exports);
37
+ module.exports = __toCommonJS(index_exports);
38
38
  var import_chord_detect = require("@tonaljs/chord-detect");
39
39
  var import_chord_type = require("@tonaljs/chord-type");
40
40
  var import_interval = require("@tonaljs/interval");
@@ -178,7 +178,7 @@ function steps(chordName, tonic) {
178
178
  const note2 = tonic || chord2.tonic;
179
179
  return (0, import_pitch_distance.tonicIntervalsTransposer)(chord2.intervals, note2);
180
180
  }
181
- var chord_default = {
181
+ var index_default = {
182
182
  getChord,
183
183
  get,
184
184
  detect: import_chord_detect.detect,
package/dist/index.mjs CHANGED
@@ -149,7 +149,7 @@ function steps(chordName, tonic) {
149
149
  const note2 = tonic || chord2.tonic;
150
150
  return tonicIntervalsTransposer(chord2.intervals, note2);
151
151
  }
152
- var chord_default = {
152
+ var index_default = {
153
153
  getChord,
154
154
  get,
155
155
  detect,
@@ -166,7 +166,7 @@ var chord_default = {
166
166
  export {
167
167
  chord,
168
168
  chordScales,
169
- chord_default as default,
169
+ index_default as default,
170
170
  degrees,
171
171
  detect2 as detect,
172
172
  extended,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tonaljs/chord",
3
- "version": "6.1.0",
3
+ "version": "6.1.2",
4
4
  "description": "Musical chords and its relations",
5
5
  "keywords": [
6
6
  "chord",
@@ -16,14 +16,14 @@
16
16
  ],
17
17
  "types": "dist/index.d.ts",
18
18
  "dependencies": {
19
- "@tonaljs/chord-detect": "4.9.0",
20
- "@tonaljs/chord-type": "5.1.0",
19
+ "@tonaljs/chord-detect": "4.9.1",
20
+ "@tonaljs/chord-type": "5.1.1",
21
21
  "@tonaljs/collection": "4.9.0",
22
22
  "@tonaljs/interval": "^5.1.0",
23
- "@tonaljs/pcset": "4.10.0",
24
- "@tonaljs/pitch-distance": "5.0.4",
25
- "@tonaljs/pitch-note": "6.0.0",
26
- "@tonaljs/scale-type": "4.9.0"
23
+ "@tonaljs/pcset": "4.10.1",
24
+ "@tonaljs/pitch-distance": "5.0.5",
25
+ "@tonaljs/pitch-note": "6.1.0",
26
+ "@tonaljs/scale-type": "4.9.2"
27
27
  },
28
28
  "author": "danigb@gmail.com",
29
29
  "license": "MIT",