chordsheetjs 7.6.0 → 7.7.0
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 +32 -9
- package/lib/bundle.js +297 -215
- package/lib/index.js +297 -215
- package/lib/index.js.map +1 -1
- package/lib/main.d.ts +26 -12
- package/lib/main.d.ts.map +1 -1
- package/lib/module.js +297 -215
- package/lib/module.js.map +1 -1
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -398,6 +398,9 @@ Inherits from [ChordSheetParser](#ChordSheetParser)</p></dd>
|
|
|
398
398
|
<dd><p>Represents a Chord, consisting of a root, suffix (quality) and bass</p></dd>
|
|
399
399
|
<dt><a href="#ChordSheetSerializer">ChordSheetSerializer</a></dt>
|
|
400
400
|
<dd><p>Serializes a song into een plain object, and deserializes the serialized object back into a [Song](#Song)</p></dd>
|
|
401
|
+
<dt><a href="#Key">Key</a></dt>
|
|
402
|
+
<dd><p>Represents a key, such as Eb (symbol), #3 (numeric) or VII (numeral).</p>
|
|
403
|
+
<p>The only function considered public API is <code>Key.distance</code></p></dd>
|
|
401
404
|
</dl>
|
|
402
405
|
|
|
403
406
|
## Members
|
|
@@ -1228,7 +1231,7 @@ When the chord is already a chord symbol, it will return a clone of the object.<
|
|
|
1228
1231
|
|
|
1229
1232
|
| Param | Type | Default | Description |
|
|
1230
1233
|
| --- | --- | --- | --- |
|
|
1231
|
-
| [key] | <code>Key</code> \| <code>string</code> | <code></code> | <p>the reference key</p> |
|
|
1234
|
+
| [key] | [<code>Key</code>](#Key) \| <code>string</code> | <code></code> | <p>the reference key</p> |
|
|
1232
1235
|
|
|
1233
1236
|
<a name="Chord+toChordSymbolString"></a>
|
|
1234
1237
|
|
|
@@ -1243,7 +1246,7 @@ When the chord is already a chord symbol, it will return a string version of the
|
|
|
1243
1246
|
|
|
1244
1247
|
| Param | Type | Default | Description |
|
|
1245
1248
|
| --- | --- | --- | --- |
|
|
1246
|
-
| [key] | <code>Key</code> \| <code>string</code> | <code></code> | <p>the reference key</p> |
|
|
1249
|
+
| [key] | [<code>Key</code>](#Key) \| <code>string</code> | <code></code> | <p>the reference key</p> |
|
|
1247
1250
|
|
|
1248
1251
|
<a name="Chord+isChordSymbol"></a>
|
|
1249
1252
|
|
|
@@ -1262,7 +1265,7 @@ For example, a chord symbol A# with reference key E will return the numeric chor
|
|
|
1262
1265
|
|
|
1263
1266
|
| Param | Type | Default | Description |
|
|
1264
1267
|
| --- | --- | --- | --- |
|
|
1265
|
-
| [key] | <code>Key</code> \| <code>string</code> | <code></code> | <p>the reference key</p> |
|
|
1268
|
+
| [key] | [<code>Key</code>](#Key) \| <code>string</code> | <code></code> | <p>the reference key</p> |
|
|
1266
1269
|
|
|
1267
1270
|
<a name="Chord+toNumeral"></a>
|
|
1268
1271
|
|
|
@@ -1275,7 +1278,7 @@ For example, a chord symbol A# with reference key E will return the numeral chor
|
|
|
1275
1278
|
|
|
1276
1279
|
| Param | Type | Default | Description |
|
|
1277
1280
|
| --- | --- | --- | --- |
|
|
1278
|
-
| key | <code>Key</code> \| <code>string</code> \| <code>null</code> | <code></code> | <p>the reference key. The key is required when converting a chord symbol</p> |
|
|
1281
|
+
| key | [<code>Key</code>](#Key) \| <code>string</code> \| <code>null</code> | <code></code> | <p>the reference key. The key is required when converting a chord symbol</p> |
|
|
1279
1282
|
|
|
1280
1283
|
<a name="Chord+toNumeralString"></a>
|
|
1281
1284
|
|
|
@@ -1289,7 +1292,7 @@ For example, a chord symbol A# with reference key E will return the numeral chor
|
|
|
1289
1292
|
|
|
1290
1293
|
| Param | Type | Default | Description |
|
|
1291
1294
|
| --- | --- | --- | --- |
|
|
1292
|
-
| [key] | <code>Key</code> \| <code>string</code> | <code></code> | <p>the reference key</p> |
|
|
1295
|
+
| [key] | [<code>Key</code>](#Key) \| <code>string</code> | <code></code> | <p>the reference key</p> |
|
|
1293
1296
|
|
|
1294
1297
|
<a name="Chord+isNumeric"></a>
|
|
1295
1298
|
|
|
@@ -1309,7 +1312,7 @@ For example, a chord symbol A# with reference key E will return the numeric chor
|
|
|
1309
1312
|
|
|
1310
1313
|
| Param | Type | Default | Description |
|
|
1311
1314
|
| --- | --- | --- | --- |
|
|
1312
|
-
| [key] | <code>Key</code> \| <code>string</code> | <code></code> | <p>the reference key</p> |
|
|
1315
|
+
| [key] | [<code>Key</code>](#Key) \| <code>string</code> | <code></code> | <p>the reference key</p> |
|
|
1313
1316
|
|
|
1314
1317
|
<a name="Chord+isNumeral"></a>
|
|
1315
1318
|
|
|
@@ -1347,7 +1350,7 @@ All suffix normalizations can be found in <code>src/normalize_mappings/suffix-ma
|
|
|
1347
1350
|
|
|
1348
1351
|
| Param | Type | Default | Description |
|
|
1349
1352
|
| --- | --- | --- | --- |
|
|
1350
|
-
| [key] | <code>Key</code> \| <code>string</code> | <code></code> | <p>the key to normalize to</p> |
|
|
1353
|
+
| [key] | [<code>Key</code>](#Key) \| <code>string</code> | <code></code> | <p>the key to normalize to</p> |
|
|
1351
1354
|
| [options] | <code>Object</code> | <code>{}</code> | <p>options</p> |
|
|
1352
1355
|
| [options.normalizeSuffix] | <code>boolean</code> | <code>true</code> | <p>whether to normalize the chord suffix after transposing</p> |
|
|
1353
1356
|
|
|
@@ -1431,6 +1434,26 @@ Can be deserialized using [deserialize](deserialize)</p>
|
|
|
1431
1434
|
| --- | --- | --- |
|
|
1432
1435
|
| serializedSong | <code>object</code> | <p>The serialized song</p> |
|
|
1433
1436
|
|
|
1437
|
+
<a name="Key"></a>
|
|
1438
|
+
|
|
1439
|
+
## Key
|
|
1440
|
+
<p>Represents a key, such as Eb (symbol), #3 (numeric) or VII (numeral).</p>
|
|
1441
|
+
<p>The only function considered public API is <code>Key.distance</code></p>
|
|
1442
|
+
|
|
1443
|
+
**Kind**: global class
|
|
1444
|
+
<a name="Key.distance"></a>
|
|
1445
|
+
|
|
1446
|
+
### Key.distance(oneKey, otherKey) ⇒ <code>number</code>
|
|
1447
|
+
<p>Calculates the distance in semitones between one key and another.</p>
|
|
1448
|
+
|
|
1449
|
+
**Kind**: static method of [<code>Key</code>](#Key)
|
|
1450
|
+
**Returns**: <code>number</code> - <p>the distance in semitones</p>
|
|
1451
|
+
|
|
1452
|
+
| Param | Type | Description |
|
|
1453
|
+
| --- | --- | --- |
|
|
1454
|
+
| oneKey | [<code>Key</code>](#Key) \| <code>string</code> | <p>the key</p> |
|
|
1455
|
+
| otherKey | [<code>Key</code>](#Key) \| <code>string</code> | <p>the other key</p> |
|
|
1456
|
+
|
|
1434
1457
|
<a name="ALBUM"></a>
|
|
1435
1458
|
|
|
1436
1459
|
## ALBUM : <code>string</code>
|
|
@@ -1637,7 +1660,7 @@ values are the effective key for that capo.</p>
|
|
|
1637
1660
|
|
|
1638
1661
|
| Param | Type | Description |
|
|
1639
1662
|
| --- | --- | --- |
|
|
1640
|
-
| key | <code>Key</code> \| <code>string</code> | <p>The key to get capos for</p> |
|
|
1663
|
+
| key | [<code>Key</code>](#Key) \| <code>string</code> | <p>The key to get capos for</p> |
|
|
1641
1664
|
|
|
1642
1665
|
<a name="getKeys"></a>
|
|
1643
1666
|
|
|
@@ -1649,5 +1672,5 @@ values are the effective key for that capo.</p>
|
|
|
1649
1672
|
|
|
1650
1673
|
| Param | Type | Description |
|
|
1651
1674
|
| --- | --- | --- |
|
|
1652
|
-
| key | <code>Key</code> \| <code>string</code> | <p>The key to get keys for</p> |
|
|
1675
|
+
| key | [<code>Key</code>](#Key) \| <code>string</code> | <p>The key to get keys for</p> |
|
|
1653
1676
|
|