chordsheetjs 7.1.0 → 7.3.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 +49 -5
- package/lib/bundle.js +880 -10011
- package/lib/index.js +162 -1164
- package/lib/index.js.map +1 -1
- package/lib/main.d.ts +32 -7
- package/lib/main.d.ts.map +1 -1
- package/package.json +2 -5
package/README.md
CHANGED
|
@@ -639,6 +639,9 @@ If not, it returns [INDETERMINATE](#INDETERMINATE)</p>
|
|
|
639
639
|
* [.clone()](#Song+clone) ⇒ [<code>Song</code>](#Song)
|
|
640
640
|
* [.setKey(key)](#Song+setKey) ⇒ [<code>Song</code>](#Song)
|
|
641
641
|
* [.setCapo(capo)](#Song+setCapo) ⇒ [<code>Song</code>](#Song)
|
|
642
|
+
* [.transpose(delta)](#Song+transpose) ⇒ [<code>Song</code>](#Song)
|
|
643
|
+
* [.transposeUp()](#Song+transposeUp) ⇒ [<code>Song</code>](#Song)
|
|
644
|
+
* [.transposeDown()](#Song+transposeDown) ⇒ [<code>Song</code>](#Song)
|
|
642
645
|
* [.changeKey(newKey)](#Song+changeKey) ⇒ [<code>Song</code>](#Song)
|
|
643
646
|
* [.changeMetadata(name, value)](#Song+changeMetadata)
|
|
644
647
|
* [.mapItems(func)](#Song+mapItems) ⇒ [<code>Song</code>](#Song)
|
|
@@ -697,7 +700,7 @@ if you want to skip the "header lines": the lines that only contain me
|
|
|
697
700
|
### song.setKey(key) ⇒ [<code>Song</code>](#Song)
|
|
698
701
|
<p>Returns a copy of the song with the key value set to the specified key. It changes:</p>
|
|
699
702
|
<ul>
|
|
700
|
-
<li>the value for <code>key</code> in the
|
|
703
|
+
<li>the value for <code>key</code> in the [metadata](metadata) set</li>
|
|
701
704
|
<li>any existing <code>key</code> directive</li>
|
|
702
705
|
</ul>
|
|
703
706
|
|
|
@@ -706,14 +709,14 @@ if you want to skip the "header lines": the lines that only contain me
|
|
|
706
709
|
|
|
707
710
|
| Param | Type | Description |
|
|
708
711
|
| --- | --- | --- |
|
|
709
|
-
| key | <code>number</code> \| <code>null</code> | <p>the key. Passing <code>null</code> will:</p> <ul> <li>remove the current key from
|
|
712
|
+
| key | <code>number</code> \| <code>null</code> | <p>the key. Passing <code>null</code> will:</p> <ul> <li>remove the current key from [metadata](metadata)</li> <li>remove any <code>key</code> directive</li> </ul> |
|
|
710
713
|
|
|
711
714
|
<a name="Song+setCapo"></a>
|
|
712
715
|
|
|
713
716
|
### song.setCapo(capo) ⇒ [<code>Song</code>](#Song)
|
|
714
717
|
<p>Returns a copy of the song with the key value set to the specified capo. It changes:</p>
|
|
715
718
|
<ul>
|
|
716
|
-
<li>the value for <code>capo</code> in the
|
|
719
|
+
<li>the value for <code>capo</code> in the [metadata](metadata) set</li>
|
|
717
720
|
<li>any existing <code>capo</code> directive</li>
|
|
718
721
|
</ul>
|
|
719
722
|
|
|
@@ -722,14 +725,55 @@ if you want to skip the "header lines": the lines that only contain me
|
|
|
722
725
|
|
|
723
726
|
| Param | Type | Description |
|
|
724
727
|
| --- | --- | --- |
|
|
725
|
-
| capo | <code>number</code> \| <code>null</code> | <p>the capo. Passing <code>null</code> will:</p> <ul> <li>remove the current key from
|
|
728
|
+
| capo | <code>number</code> \| <code>null</code> | <p>the capo. Passing <code>null</code> will:</p> <ul> <li>remove the current key from [metadata](metadata)</li> <li>remove any <code>capo</code> directive</li> </ul> |
|
|
726
729
|
|
|
730
|
+
<a name="Song+transpose"></a>
|
|
731
|
+
|
|
732
|
+
### song.transpose(delta) ⇒ [<code>Song</code>](#Song)
|
|
733
|
+
<p>Transposes the song by the specified delta. It will:</p>
|
|
734
|
+
<ul>
|
|
735
|
+
<li>transpose all chords, see: [transpose](#Chord+transpose)</li>
|
|
736
|
+
<li>transpose the song key in [metadata](metadata)</li>
|
|
737
|
+
<li>update any existing <code>key</code> directive</li>
|
|
738
|
+
</ul>
|
|
739
|
+
|
|
740
|
+
**Kind**: instance method of [<code>Song</code>](#Song)
|
|
741
|
+
**Returns**: [<code>Song</code>](#Song) - <p>The transposed song</p>
|
|
742
|
+
|
|
743
|
+
| Param | Type | Description |
|
|
744
|
+
| --- | --- | --- |
|
|
745
|
+
| delta | <code>number</code> | <p>The number of semitones (positive or negative) to transpose with</p> |
|
|
746
|
+
|
|
747
|
+
<a name="Song+transposeUp"></a>
|
|
748
|
+
|
|
749
|
+
### song.transposeUp() ⇒ [<code>Song</code>](#Song)
|
|
750
|
+
<p>Transposes the song up by one semitone. It will:</p>
|
|
751
|
+
<ul>
|
|
752
|
+
<li>transpose all chords, see: [transpose](#Chord+transpose)</li>
|
|
753
|
+
<li>transpose the song key in [metadata](metadata)</li>
|
|
754
|
+
<li>update any existing <code>key</code> directive</li>
|
|
755
|
+
</ul>
|
|
756
|
+
|
|
757
|
+
**Kind**: instance method of [<code>Song</code>](#Song)
|
|
758
|
+
**Returns**: [<code>Song</code>](#Song) - <p>The transposed song</p>
|
|
759
|
+
<a name="Song+transposeDown"></a>
|
|
760
|
+
|
|
761
|
+
### song.transposeDown() ⇒ [<code>Song</code>](#Song)
|
|
762
|
+
<p>Transposes the song down by one semitone. It will:</p>
|
|
763
|
+
<ul>
|
|
764
|
+
<li>transpose all chords, see: [transpose](#Chord+transpose)</li>
|
|
765
|
+
<li>transpose the song key in [metadata](metadata)</li>
|
|
766
|
+
<li>update any existing <code>key</code> directive</li>
|
|
767
|
+
</ul>
|
|
768
|
+
|
|
769
|
+
**Kind**: instance method of [<code>Song</code>](#Song)
|
|
770
|
+
**Returns**: [<code>Song</code>](#Song) - <p>The transposed song</p>
|
|
727
771
|
<a name="Song+changeKey"></a>
|
|
728
772
|
|
|
729
773
|
### song.changeKey(newKey) ⇒ [<code>Song</code>](#Song)
|
|
730
774
|
<p>Returns a copy of the song with the key set to the specified key. It changes:</p>
|
|
731
775
|
<ul>
|
|
732
|
-
<li>the value for <code>key</code> in the
|
|
776
|
+
<li>the value for <code>key</code> in the [metadata](metadata) set</li>
|
|
733
777
|
<li>any existing <code>key</code> directive</li>
|
|
734
778
|
<li>all chords, those are transposed according to the distance between the current and the new key</li>
|
|
735
779
|
</ul>
|