chordsheetjs 8.4.1 → 8.5.1

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
@@ -473,6 +473,8 @@ Inherits from [ChordSheetParser](#ChordSheetParser)</p></dd>
473
473
  <dd><p>End of bridge directive. See https://chordpro.org/chordpro/directives-env_bridge/</p></dd>
474
474
  <dt><a href="#END_OF_CHORUS">END_OF_CHORUS</a> : <code>string</code></dt>
475
475
  <dd><p>End of chorus directive. See https://www.chordpro.org/chordpro/directives-env_chorus/</p></dd>
476
+ <dt><a href="#END_OF_GRID">END_OF_GRID</a> : <code>string</code></dt>
477
+ <dd><p>End of grid directive. See https://www.chordpro.org/chordpro/directives-env_grid/</p></dd>
476
478
  <dt><a href="#END_OF_TAB">END_OF_TAB</a> : <code>string</code></dt>
477
479
  <dd><p>End of tab directive. See https://www.chordpro.org/chordpro/directives-env_tab/</p></dd>
478
480
  <dt><a href="#END_OF_VERSE">END_OF_VERSE</a> : <code>string</code></dt>
@@ -488,6 +490,8 @@ See https://www.chordpro.org/chordpro/directives-key/</p></dd>
488
490
  <dd><p>Start of bridge directive. See https://chordpro.org/chordpro/directives-env_bridge/</p></dd>
489
491
  <dt><a href="#START_OF_CHORUS">START_OF_CHORUS</a> : <code>string</code></dt>
490
492
  <dd><p>Start of chorus directive. See https://www.chordpro.org/chordpro/directives-env_chorus/</p></dd>
493
+ <dt><a href="#START_OF_GRID">START_OF_GRID</a> : <code>string</code></dt>
494
+ <dd><p>Start of grid directive. See https://www.chordpro.org/chordpro/directives-env_grid/</p></dd>
491
495
  <dt><a href="#START_OF_TAB">START_OF_TAB</a> : <code>string</code></dt>
492
496
  <dd><p>Start of tab directive. See https://www.chordpro.org/chordpro/directives-env_tab/</p></dd>
493
497
  <dt><a href="#START_OF_VERSE">START_OF_VERSE</a> : <code>string</code></dt>
@@ -529,17 +533,21 @@ See https://www.chordpro.org/chordpro/directives-key/</p></dd>
529
533
  See https://www.chordpro.org/chordpro/directives-env_chorus/</p></dd>
530
534
  <dt><a href="#CHORD_STYLE">CHORD_STYLE</a> : <code>string</code></dt>
531
535
  <dd><p>Chord type directive. Determines the type of chords used in the rendered chord sheet.
532
- Possible values are 'symbol', 'numeral' and 'number'</p></dd>
533
- <dt><a href="#VERSE">VERSE</a> : <code>string</code></dt>
534
- <dd><p>Used to mark a paragraph as verse</p></dd>
536
+ Possible values are 'solfege', 'symbol', 'numeral' and 'number'</p></dd>
537
+ <dt><a href="#BRIDGE">BRIDGE</a> : <code>string</code></dt>
538
+ <dd><p>Used to mark a paragraph as bridge</p></dd>
535
539
  <dt><a href="#CHORUS">CHORUS</a> : <code>string</code></dt>
536
540
  <dd><p>Used to mark a paragraph as chorus</p></dd>
537
- <dt><a href="#NONE">NONE</a> : <code>string</code></dt>
538
- <dd><p>Used to mark a paragraph as not containing a line marked with a type</p></dd>
541
+ <dt><a href="#GRID">GRID</a> : <code>string</code></dt>
542
+ <dd><p>Used to mark a paragraph as grid</p></dd>
539
543
  <dt><a href="#INDETERMINATE">INDETERMINATE</a> : <code>string</code></dt>
540
544
  <dd><p>Used to mark a paragraph as containing lines with both verse and chorus type</p></dd>
545
+ <dt><a href="#NONE">NONE</a> : <code>string</code></dt>
546
+ <dd><p>Used to mark a paragraph as not containing a line marked with a type</p></dd>
541
547
  <dt><a href="#TAB">TAB</a> : <code>string</code></dt>
542
548
  <dd><p>Used to mark a paragraph as tab</p></dd>
549
+ <dt><a href="#VERSE">VERSE</a> : <code>string</code></dt>
550
+ <dd><p>Used to mark a paragraph as verse</p></dd>
543
551
  </dl>
544
552
 
545
553
  ## Functions
@@ -639,8 +647,11 @@ Possible values are 'symbol', 'numeral' and 'number'</p></dd>
639
647
  * [.addItem(item)](#Line+addItem)
640
648
  * [.hasRenderableItems()](#Line+hasRenderableItems) ⇒ <code>boolean</code>
641
649
  * [.clone()](#Line+clone) ⇒ [<code>Line</code>](#Line)
642
- * [.isVerse()](#Line+isVerse) ⇒ <code>boolean</code>
650
+ * [.isBridge()](#Line+isBridge) ⇒ <code>boolean</code>
643
651
  * [.isChorus()](#Line+isChorus) ⇒ <code>boolean</code>
652
+ * [.isGrid()](#Line+isGrid) ⇒ <code>boolean</code>
653
+ * [.isTab()](#Line+isTab) ⇒ <code>boolean</code>
654
+ * [.isVerse()](#Line+isVerse) ⇒ <code>boolean</code>
644
655
  * ~~[.hasContent()](#Line+hasContent) ⇒ <code>boolean</code>~~
645
656
 
646
657
  <a name="Line+isEmpty"></a>
@@ -672,10 +683,10 @@ Possible values are 'symbol', 'numeral' and 'number'</p></dd>
672
683
  <p>Returns a deep copy of the line and all of its items</p>
673
684
 
674
685
  **Kind**: instance method of [<code>Line</code>](#Line)
675
- <a name="Line+isVerse"></a>
686
+ <a name="Line+isBridge"></a>
676
687
 
677
- ### line.isVerse() ⇒ <code>boolean</code>
678
- <p>Indicates whether the line type is [VERSE](#VERSE)</p>
688
+ ### line.isBridge() ⇒ <code>boolean</code>
689
+ <p>Indicates whether the line type is [BRIDGE](#BRIDGE)</p>
679
690
 
680
691
  **Kind**: instance method of [<code>Line</code>](#Line)
681
692
  <a name="Line+isChorus"></a>
@@ -683,6 +694,24 @@ Possible values are 'symbol', 'numeral' and 'number'</p></dd>
683
694
  ### line.isChorus() ⇒ <code>boolean</code>
684
695
  <p>Indicates whether the line type is [CHORUS](#CHORUS)</p>
685
696
 
697
+ **Kind**: instance method of [<code>Line</code>](#Line)
698
+ <a name="Line+isGrid"></a>
699
+
700
+ ### line.isGrid() ⇒ <code>boolean</code>
701
+ <p>Indicates whether the line type is [GRID](#GRID)</p>
702
+
703
+ **Kind**: instance method of [<code>Line</code>](#Line)
704
+ <a name="Line+isTab"></a>
705
+
706
+ ### line.isTab() ⇒ <code>boolean</code>
707
+ <p>Indicates whether the line type is [TAB](#TAB)</p>
708
+
709
+ **Kind**: instance method of [<code>Line</code>](#Line)
710
+ <a name="Line+isVerse"></a>
711
+
712
+ ### line.isVerse() ⇒ <code>boolean</code>
713
+ <p>Indicates whether the line type is [VERSE](#VERSE)</p>
714
+
686
715
  **Kind**: instance method of [<code>Line</code>](#Line)
687
716
  <a name="Line+hasContent"></a>
688
717
 
@@ -1376,6 +1405,9 @@ Inherits from [ChordSheetParser](#ChordSheetParser)</p>
1376
1405
  * [.toChordSymbol([referenceKey])](#Chord+toChordSymbol) ⇒ [<code>Chord</code>](#Chord)
1377
1406
  * [.toChordSymbolString([referenceKey])](#Chord+toChordSymbolString) ⇒ <code>string</code>
1378
1407
  * [.isChordSymbol()](#Chord+isChordSymbol) ⇒ <code>boolean</code>
1408
+ * [.toChordSolfege([referenceKey])](#Chord+toChordSolfege) ⇒ [<code>Chord</code>](#Chord)
1409
+ * [.toChordSolfegeString([referenceKey])](#Chord+toChordSolfegeString) ⇒ <code>string</code>
1410
+ * [.isChordSolfege()](#Chord+isChordSolfege) ⇒ <code>boolean</code>
1379
1411
  * [.toNumeric([referenceKey])](#Chord+toNumeric) ⇒ [<code>Chord</code>](#Chord)
1380
1412
  * [.toNumeral([referenceKey])](#Chord+toNumeral) ⇒ [<code>Chord</code>](#Chord)
1381
1413
  * [.toNumeralString([referenceKey])](#Chord+toNumeralString) ⇒ <code>string</code>
@@ -1431,6 +1463,41 @@ When the chord is already a chord symbol, it will return a string version of the
1431
1463
  ### chord.isChordSymbol() ⇒ <code>boolean</code>
1432
1464
  <p>Determines whether the chord is a chord symbol</p>
1433
1465
 
1466
+ **Kind**: instance method of [<code>Chord</code>](#Chord)
1467
+ <a name="Chord+toChordSolfege"></a>
1468
+
1469
+ ### chord.toChordSolfege([referenceKey]) ⇒ [<code>Chord</code>](#Chord)
1470
+ <p>Converts the chord to a chord solfege, using the supplied key as a reference.
1471
+ For example, a numeric chord <code>#4</code> with reference key <code>Mi</code> will return the chord symbol <code>La#</code>.
1472
+ When the chord is already a chord solfege, it will return a clone of the object.</p>
1473
+
1474
+ **Kind**: instance method of [<code>Chord</code>](#Chord)
1475
+ **Returns**: [<code>Chord</code>](#Chord) - <p>the chord solfege</p>
1476
+
1477
+ | Param | Type | Default | Description |
1478
+ | --- | --- | --- | --- |
1479
+ | [referenceKey] | [<code>Key</code>](#Key) \| <code>string</code> \| <code>null</code> | <code></code> | <p>the reference key. The key is required when converting a numeric or numeral.</p> |
1480
+
1481
+ <a name="Chord+toChordSolfegeString"></a>
1482
+
1483
+ ### chord.toChordSolfegeString([referenceKey]) ⇒ <code>string</code>
1484
+ <p>Converts the chord to a chord solfege string, using the supplied key as a reference.
1485
+ For example, a numeric chord <code>#4</code> with reference key <code>E</code> will return the chord solfege <code>A#</code>.
1486
+ When the chord is already a chord solfege, it will return a string version of the chord.</p>
1487
+
1488
+ **Kind**: instance method of [<code>Chord</code>](#Chord)
1489
+ **Returns**: <code>string</code> - <p>the chord solfege string</p>
1490
+ **See**: {toChordSolfege}
1491
+
1492
+ | Param | Type | Default | Description |
1493
+ | --- | --- | --- | --- |
1494
+ | [referenceKey] | [<code>Key</code>](#Key) \| <code>string</code> \| <code>null</code> | <code></code> | <p>the reference key. The key is required when converting a numeric or numeral.</p> |
1495
+
1496
+ <a name="Chord+isChordSolfege"></a>
1497
+
1498
+ ### chord.isChordSolfege() ⇒ <code>boolean</code>
1499
+ <p>Determines whether the chord is a chord solfege</p>
1500
+
1434
1501
  **Kind**: instance method of [<code>Chord</code>](#Chord)
1435
1502
  <a name="Chord+toNumeric"></a>
1436
1503
 
@@ -1516,6 +1583,10 @@ For example, a chord symbol A# with reference key E will return the numeric chor
1516
1583
  ### chord.normalize([key], [options]) ⇒ [<code>Chord</code>](#Chord)
1517
1584
  <p>Normalizes the chord root and bass notes:</p>
1518
1585
  <ul>
1586
+ <li>Fab becomes Mi</li>
1587
+ <li>Dob becomes Si</li>
1588
+ <li>Si# becomes Do</li>
1589
+ <li>Mi# becomes Fa</li>
1519
1590
  <li>Fb becomes E</li>
1520
1591
  <li>Cb becomes B</li>
1521
1592
  <li>B# becomes C</li>
@@ -1694,6 +1765,12 @@ Can be deserialized using [deserialize](deserialize)</p>
1694
1765
  ## END\_OF\_CHORUS : <code>string</code>
1695
1766
  <p>End of chorus directive. See https://www.chordpro.org/chordpro/directives-env_chorus/</p>
1696
1767
 
1768
+ **Kind**: global constant
1769
+ <a name="END_OF_GRID"></a>
1770
+
1771
+ ## END\_OF\_GRID : <code>string</code>
1772
+ <p>End of grid directive. See https://www.chordpro.org/chordpro/directives-env_grid/</p>
1773
+
1697
1774
  **Kind**: global constant
1698
1775
  <a name="END_OF_TAB"></a>
1699
1776
 
@@ -1737,6 +1814,12 @@ See https://www.chordpro.org/chordpro/directives-key/</p>
1737
1814
  ## START\_OF\_CHORUS : <code>string</code>
1738
1815
  <p>Start of chorus directive. See https://www.chordpro.org/chordpro/directives-env_chorus/</p>
1739
1816
 
1817
+ **Kind**: global constant
1818
+ <a name="START_OF_GRID"></a>
1819
+
1820
+ ## START\_OF\_GRID : <code>string</code>
1821
+ <p>Start of grid directive. See https://www.chordpro.org/chordpro/directives-env_grid/</p>
1822
+
1740
1823
  **Kind**: global constant
1741
1824
  <a name="START_OF_TAB"></a>
1742
1825
 
@@ -1857,14 +1940,14 @@ See https://www.chordpro.org/chordpro/directives-env_chorus/</p>
1857
1940
 
1858
1941
  ## CHORD\_STYLE : <code>string</code>
1859
1942
  <p>Chord type directive. Determines the type of chords used in the rendered chord sheet.
1860
- Possible values are 'symbol', 'numeral' and 'number'</p>
1943
+ Possible values are 'solfege', 'symbol', 'numeral' and 'number'</p>
1861
1944
 
1862
1945
  **Kind**: global constant
1863
1946
  **See**: https://github.com/bettermusic/ChordSheetJS/issues/352
1864
- <a name="VERSE"></a>
1947
+ <a name="BRIDGE"></a>
1865
1948
 
1866
- ## VERSE : <code>string</code>
1867
- <p>Used to mark a paragraph as verse</p>
1949
+ ## BRIDGE : <code>string</code>
1950
+ <p>Used to mark a paragraph as bridge</p>
1868
1951
 
1869
1952
  **Kind**: global constant
1870
1953
  <a name="CHORUS"></a>
@@ -1873,10 +1956,10 @@ Possible values are 'symbol', 'numeral' and 'number'</p>
1873
1956
  <p>Used to mark a paragraph as chorus</p>
1874
1957
 
1875
1958
  **Kind**: global constant
1876
- <a name="NONE"></a>
1959
+ <a name="GRID"></a>
1877
1960
 
1878
- ## NONE : <code>string</code>
1879
- <p>Used to mark a paragraph as not containing a line marked with a type</p>
1961
+ ## GRID : <code>string</code>
1962
+ <p>Used to mark a paragraph as grid</p>
1880
1963
 
1881
1964
  **Kind**: global constant
1882
1965
  <a name="INDETERMINATE"></a>
@@ -1884,12 +1967,24 @@ Possible values are 'symbol', 'numeral' and 'number'</p>
1884
1967
  ## INDETERMINATE : <code>string</code>
1885
1968
  <p>Used to mark a paragraph as containing lines with both verse and chorus type</p>
1886
1969
 
1970
+ **Kind**: global constant
1971
+ <a name="NONE"></a>
1972
+
1973
+ ## NONE : <code>string</code>
1974
+ <p>Used to mark a paragraph as not containing a line marked with a type</p>
1975
+
1887
1976
  **Kind**: global constant
1888
1977
  <a name="TAB"></a>
1889
1978
 
1890
1979
  ## TAB : <code>string</code>
1891
1980
  <p>Used to mark a paragraph as tab</p>
1892
1981
 
1982
+ **Kind**: global constant
1983
+ <a name="VERSE"></a>
1984
+
1985
+ ## VERSE : <code>string</code>
1986
+ <p>Used to mark a paragraph as verse</p>
1987
+
1893
1988
  **Kind**: global constant
1894
1989
  <a name="scopedCss"></a>
1895
1990