chordsheetjs 15.4.0 → 15.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/lib/bundle.js +698 -635
- package/lib/bundle.min.js +79 -79
- package/lib/index.js +701 -642
- package/lib/index.js.map +1 -1
- package/lib/main.d.ts +31 -10
- package/lib/main.d.ts.map +1 -1
- package/lib/module.js +701 -642
- package/lib/module.js.map +1 -1
- package/lib/pdf/index.js +612 -553
- package/lib/pdf/index.js.map +1 -1
- package/lib/pdf/main.d.ts +17 -7
- package/lib/pdf/main.d.ts.map +1 -1
- package/lib/pdf/module.js +612 -553
- package/lib/pdf/module.js.map +1 -1
- package/package.json +2 -2
package/lib/index.js
CHANGED
|
@@ -414,588 +414,97 @@ const $dce48cb70c4120bb$export$ba1aa2356c5f40b7 = 0;
|
|
|
414
414
|
const $dce48cb70c4120bb$export$dfea9b8ecbbb8623 = 'start_tag';
|
|
415
415
|
const $dce48cb70c4120bb$export$3d329a2c209fbc28 = 'end_tag';
|
|
416
416
|
const $dce48cb70c4120bb$export$97c0a36af1d48540 = 'auto';
|
|
417
|
+
const $dce48cb70c4120bb$export$34df5089b632c747 = 'german';
|
|
417
418
|
|
|
418
419
|
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
},
|
|
506
|
-
[(0, $dce48cb70c4120bb$export$1ea14522906630af)]: {
|
|
507
|
-
Re: 1,
|
|
508
|
-
Mi: 3,
|
|
509
|
-
Fa: 4,
|
|
510
|
-
Sol: 6,
|
|
511
|
-
La: 8,
|
|
512
|
-
Si: 10,
|
|
513
|
-
Do: 11
|
|
514
|
-
}
|
|
515
|
-
},
|
|
516
|
-
[(0, $dce48cb70c4120bb$export$f23edc19d247fd25)]: {
|
|
517
|
-
[(0, $dce48cb70c4120bb$export$f0f7b592ea674eb2)]: {
|
|
518
|
-
Do: 0,
|
|
519
|
-
Re: 2,
|
|
520
|
-
Mi: 4,
|
|
521
|
-
Fa: 5,
|
|
522
|
-
Sol: 7,
|
|
523
|
-
La: 9,
|
|
524
|
-
Si: 11
|
|
525
|
-
},
|
|
526
|
-
[(0, $dce48cb70c4120bb$export$f5b1d6b4244c9536)]: {
|
|
527
|
-
Si: 0,
|
|
528
|
-
Do: 1,
|
|
529
|
-
Re: 3,
|
|
530
|
-
Mi: 5,
|
|
531
|
-
Fa: 6,
|
|
532
|
-
Sol: 8,
|
|
533
|
-
La: 10
|
|
534
|
-
},
|
|
535
|
-
[(0, $dce48cb70c4120bb$export$1ea14522906630af)]: {
|
|
536
|
-
Re: 1,
|
|
537
|
-
Mi: 3,
|
|
538
|
-
Fa: 4,
|
|
539
|
-
Sol: 6,
|
|
540
|
-
La: 8,
|
|
541
|
-
Si: 10,
|
|
542
|
-
Do: 11
|
|
543
|
-
}
|
|
544
|
-
}
|
|
545
|
-
},
|
|
546
|
-
[(0, $dce48cb70c4120bb$export$4d318981b5a83836)]: {
|
|
547
|
-
[(0, $dce48cb70c4120bb$export$39615881bb0d21f6)]: {
|
|
548
|
-
[(0, $dce48cb70c4120bb$export$f0f7b592ea674eb2)]: {
|
|
549
|
-
1: 0,
|
|
550
|
-
2: 2,
|
|
551
|
-
3: 4,
|
|
552
|
-
4: 5,
|
|
553
|
-
5: 7,
|
|
554
|
-
6: 9,
|
|
555
|
-
7: 11
|
|
556
|
-
},
|
|
557
|
-
[(0, $dce48cb70c4120bb$export$f5b1d6b4244c9536)]: {
|
|
558
|
-
7: 0,
|
|
559
|
-
1: 1,
|
|
560
|
-
2: 3,
|
|
561
|
-
3: 5,
|
|
562
|
-
4: 6,
|
|
563
|
-
5: 8,
|
|
564
|
-
6: 10
|
|
565
|
-
},
|
|
566
|
-
[(0, $dce48cb70c4120bb$export$1ea14522906630af)]: {
|
|
567
|
-
2: 1,
|
|
568
|
-
3: 3,
|
|
569
|
-
4: 4,
|
|
570
|
-
5: 6,
|
|
571
|
-
6: 8,
|
|
572
|
-
7: 10,
|
|
573
|
-
1: 11
|
|
574
|
-
}
|
|
575
|
-
},
|
|
576
|
-
[(0, $dce48cb70c4120bb$export$f23edc19d247fd25)]: {
|
|
577
|
-
[(0, $dce48cb70c4120bb$export$f0f7b592ea674eb2)]: {
|
|
578
|
-
1: 0,
|
|
579
|
-
2: 2,
|
|
580
|
-
3: 3,
|
|
581
|
-
4: 5,
|
|
582
|
-
5: 7,
|
|
583
|
-
6: 8,
|
|
584
|
-
7: 10
|
|
585
|
-
},
|
|
586
|
-
[(0, $dce48cb70c4120bb$export$f5b1d6b4244c9536)]: {
|
|
587
|
-
1: 1,
|
|
588
|
-
2: 3,
|
|
589
|
-
3: 4,
|
|
590
|
-
4: 6,
|
|
591
|
-
5: 8,
|
|
592
|
-
6: 9,
|
|
593
|
-
7: 11
|
|
594
|
-
},
|
|
595
|
-
[(0, $dce48cb70c4120bb$export$1ea14522906630af)]: {
|
|
596
|
-
2: 1,
|
|
597
|
-
3: 2,
|
|
598
|
-
4: 4,
|
|
599
|
-
5: 6,
|
|
600
|
-
6: 7,
|
|
601
|
-
7: 9,
|
|
602
|
-
1: 11
|
|
603
|
-
}
|
|
604
|
-
}
|
|
605
|
-
},
|
|
606
|
-
[(0, $dce48cb70c4120bb$export$1321df9b16c30c6a)]: {
|
|
607
|
-
[(0, $dce48cb70c4120bb$export$39615881bb0d21f6)]: {
|
|
608
|
-
[(0, $dce48cb70c4120bb$export$f0f7b592ea674eb2)]: {
|
|
609
|
-
I: 0,
|
|
610
|
-
II: 2,
|
|
611
|
-
III: 4,
|
|
612
|
-
IV: 5,
|
|
613
|
-
V: 7,
|
|
614
|
-
VI: 9,
|
|
615
|
-
VII: 11
|
|
616
|
-
},
|
|
617
|
-
[(0, $dce48cb70c4120bb$export$f5b1d6b4244c9536)]: {
|
|
618
|
-
VII: 0,
|
|
619
|
-
I: 1,
|
|
620
|
-
II: 3,
|
|
621
|
-
III: 5,
|
|
622
|
-
IV: 6,
|
|
623
|
-
V: 8,
|
|
624
|
-
VI: 10
|
|
625
|
-
},
|
|
626
|
-
[(0, $dce48cb70c4120bb$export$1ea14522906630af)]: {
|
|
627
|
-
II: 1,
|
|
628
|
-
III: 3,
|
|
629
|
-
IV: 4,
|
|
630
|
-
V: 6,
|
|
631
|
-
VI: 8,
|
|
632
|
-
VII: 10,
|
|
633
|
-
I: 11
|
|
634
|
-
}
|
|
635
|
-
},
|
|
636
|
-
[(0, $dce48cb70c4120bb$export$f23edc19d247fd25)]: {
|
|
637
|
-
[(0, $dce48cb70c4120bb$export$f0f7b592ea674eb2)]: {
|
|
638
|
-
I: 0,
|
|
639
|
-
II: 2,
|
|
640
|
-
III: 3,
|
|
641
|
-
IV: 5,
|
|
642
|
-
V: 7,
|
|
643
|
-
VI: 8,
|
|
644
|
-
VII: 10
|
|
645
|
-
},
|
|
646
|
-
[(0, $dce48cb70c4120bb$export$f5b1d6b4244c9536)]: {
|
|
647
|
-
I: 1,
|
|
648
|
-
II: 3,
|
|
649
|
-
III: 4,
|
|
650
|
-
IV: 6,
|
|
651
|
-
V: 8,
|
|
652
|
-
VI: 9,
|
|
653
|
-
VII: 11
|
|
654
|
-
},
|
|
655
|
-
[(0, $dce48cb70c4120bb$export$1ea14522906630af)]: {
|
|
656
|
-
II: 1,
|
|
657
|
-
III: 2,
|
|
658
|
-
IV: 4,
|
|
659
|
-
V: 6,
|
|
660
|
-
VI: 7,
|
|
661
|
-
VII: 9,
|
|
662
|
-
I: 11
|
|
663
|
-
}
|
|
420
|
+
|
|
421
|
+
|
|
422
|
+
/**
|
|
423
|
+
* Represents a chord with the corresponding (partial) lyrics
|
|
424
|
+
*/ class $551a223fc13b5c10$var$ChordLyricsPair {
|
|
425
|
+
/**
|
|
426
|
+
* Initialises a ChordLyricsPair
|
|
427
|
+
* @param {string} chords The chords
|
|
428
|
+
* @param {string | null} lyrics The lyrics
|
|
429
|
+
* @param {string | null} annotation The annotation
|
|
430
|
+
* @param {Chord | null} chordObj Optional pre-parsed Chord object
|
|
431
|
+
* @param {boolean} isRhythmSymbol Whether this pair represents a rhythm symbol
|
|
432
|
+
*/ constructor(chords = '', lyrics = null, annotation = null, chordObj = null, isRhythmSymbol = false){
|
|
433
|
+
this.parentLine = null;
|
|
434
|
+
this._chordObj = null;
|
|
435
|
+
this.chords = chords || '';
|
|
436
|
+
this.lyrics = lyrics || '';
|
|
437
|
+
this.annotation = annotation || '';
|
|
438
|
+
this._chordObj = chordObj;
|
|
439
|
+
this.isRhythmSymbol = isRhythmSymbol;
|
|
440
|
+
}
|
|
441
|
+
/** Returns the Chord object if available, otherwise parses from string */ get chord() {
|
|
442
|
+
return this._chordObj || (0, $177a605b8569b31c$export$2e2bcd8739ae039).parse(this.chords.trim());
|
|
443
|
+
}
|
|
444
|
+
/**
|
|
445
|
+
* Indicates whether a ChordLyricsPair should be visible in a formatted chord sheet (except for ChordPro sheets)
|
|
446
|
+
* @returns {boolean}
|
|
447
|
+
*/ isRenderable() {
|
|
448
|
+
return true;
|
|
449
|
+
}
|
|
450
|
+
/**
|
|
451
|
+
* Indicates whether the ChordLyricsPair has non-empty lyrics.
|
|
452
|
+
*/ hasLyrics() {
|
|
453
|
+
return !!(this.lyrics && this.lyrics.trim().length > 0);
|
|
454
|
+
}
|
|
455
|
+
/**
|
|
456
|
+
* Returns a deep copy of the ChordLyricsPair, useful when programmatically transforming a song
|
|
457
|
+
* @returns {ChordLyricsPair}
|
|
458
|
+
*/ clone() {
|
|
459
|
+
const chordObj = this._chordObj?.clone() || null;
|
|
460
|
+
return new $551a223fc13b5c10$var$ChordLyricsPair(this.chords, this.lyrics, this.annotation, chordObj, this.isRhythmSymbol);
|
|
461
|
+
}
|
|
462
|
+
toString() {
|
|
463
|
+
return `ChordLyricsPair(chords=${this.chords}, lyrics=${this.lyrics})`;
|
|
464
|
+
}
|
|
465
|
+
set({ chords: chords, lyrics: lyrics, annotation: annotation, chordObj: chordObj, isRhythmSymbol: isRhythmSymbol }) {
|
|
466
|
+
return new $551a223fc13b5c10$var$ChordLyricsPair(chords ?? this.chords, lyrics ?? this.lyrics, annotation ?? this.annotation, chordObj ?? null, isRhythmSymbol ?? this.isRhythmSymbol);
|
|
467
|
+
}
|
|
468
|
+
setLyrics(lyrics) {
|
|
469
|
+
return this.set({
|
|
470
|
+
lyrics: lyrics
|
|
471
|
+
});
|
|
472
|
+
}
|
|
473
|
+
setAnnotation(annotation) {
|
|
474
|
+
return this.set({
|
|
475
|
+
annotation: annotation
|
|
476
|
+
});
|
|
477
|
+
}
|
|
478
|
+
transpose(delta, key = null, { normalizeChordSuffix: normalizeChordSuffix } = {
|
|
479
|
+
normalizeChordSuffix: false
|
|
480
|
+
}) {
|
|
481
|
+
return this.changeChord((chord)=>{
|
|
482
|
+
const transposedChord = chord.transpose(delta);
|
|
483
|
+
if (key) return transposedChord.normalize(key, {
|
|
484
|
+
normalizeSuffix: normalizeChordSuffix
|
|
485
|
+
});
|
|
486
|
+
return transposedChord;
|
|
487
|
+
});
|
|
488
|
+
}
|
|
489
|
+
useAccidental(accidental) {
|
|
490
|
+
return this.changeChord((chord)=>chord.useAccidental(accidental));
|
|
491
|
+
}
|
|
492
|
+
/**
|
|
493
|
+
* @deprecated Use useAccidental instead
|
|
494
|
+
*/ useModifier(accidental) {
|
|
495
|
+
(0, $28a2fcb6fb95a147$export$b680e6b2c82f8c2f)('useModifier is deprecated, use useAccidental instead');
|
|
496
|
+
return this.useAccidental(accidental);
|
|
497
|
+
}
|
|
498
|
+
changeChord(func) {
|
|
499
|
+
const chordObj = this.chord;
|
|
500
|
+
if (chordObj) {
|
|
501
|
+
const changedChord = func(chordObj);
|
|
502
|
+
return this.set({
|
|
503
|
+
chords: changedChord.toString(),
|
|
504
|
+
chordObj: changedChord
|
|
505
|
+
});
|
|
664
506
|
}
|
|
665
|
-
|
|
666
|
-
};
|
|
667
|
-
const $3d106a0ee348cfa8$export$40141681ebb03523 = {
|
|
668
|
-
[(0, $dce48cb70c4120bb$export$27c95a7104c1f7aa)]: {
|
|
669
|
-
[(0, $dce48cb70c4120bb$export$39615881bb0d21f6)]: {
|
|
670
|
-
[(0, $dce48cb70c4120bb$export$f0f7b592ea674eb2)]: {
|
|
671
|
-
0: 'C',
|
|
672
|
-
2: 'D',
|
|
673
|
-
4: 'E',
|
|
674
|
-
5: 'F',
|
|
675
|
-
7: 'G',
|
|
676
|
-
9: 'A',
|
|
677
|
-
11: 'B'
|
|
678
|
-
},
|
|
679
|
-
[(0, $dce48cb70c4120bb$export$f5b1d6b4244c9536)]: {
|
|
680
|
-
0: 'B#',
|
|
681
|
-
1: 'C#',
|
|
682
|
-
3: 'D#',
|
|
683
|
-
5: 'E#',
|
|
684
|
-
6: 'F#',
|
|
685
|
-
8: 'G#',
|
|
686
|
-
10: 'A#'
|
|
687
|
-
},
|
|
688
|
-
[(0, $dce48cb70c4120bb$export$1ea14522906630af)]: {
|
|
689
|
-
1: 'Db',
|
|
690
|
-
3: 'Eb',
|
|
691
|
-
4: 'Fb',
|
|
692
|
-
6: 'Gb',
|
|
693
|
-
8: 'Ab',
|
|
694
|
-
10: 'Bb',
|
|
695
|
-
11: 'Cb'
|
|
696
|
-
}
|
|
697
|
-
},
|
|
698
|
-
[(0, $dce48cb70c4120bb$export$f23edc19d247fd25)]: {
|
|
699
|
-
[(0, $dce48cb70c4120bb$export$f0f7b592ea674eb2)]: {
|
|
700
|
-
0: 'C',
|
|
701
|
-
2: 'D',
|
|
702
|
-
4: 'E',
|
|
703
|
-
5: 'F',
|
|
704
|
-
7: 'G',
|
|
705
|
-
9: 'A',
|
|
706
|
-
11: 'B'
|
|
707
|
-
},
|
|
708
|
-
[(0, $dce48cb70c4120bb$export$f5b1d6b4244c9536)]: {
|
|
709
|
-
0: 'B#',
|
|
710
|
-
1: 'C#',
|
|
711
|
-
3: 'D#',
|
|
712
|
-
5: 'E#',
|
|
713
|
-
6: 'F#',
|
|
714
|
-
8: 'G#',
|
|
715
|
-
10: 'A#'
|
|
716
|
-
},
|
|
717
|
-
[(0, $dce48cb70c4120bb$export$1ea14522906630af)]: {
|
|
718
|
-
1: 'Db',
|
|
719
|
-
3: 'Eb',
|
|
720
|
-
4: 'Fb',
|
|
721
|
-
6: 'Gb',
|
|
722
|
-
8: 'Ab',
|
|
723
|
-
10: 'Bb',
|
|
724
|
-
11: 'Cb'
|
|
725
|
-
}
|
|
726
|
-
}
|
|
727
|
-
},
|
|
728
|
-
[(0, $dce48cb70c4120bb$export$539a6499f4711c57)]: {
|
|
729
|
-
[(0, $dce48cb70c4120bb$export$39615881bb0d21f6)]: {
|
|
730
|
-
[(0, $dce48cb70c4120bb$export$f0f7b592ea674eb2)]: {
|
|
731
|
-
0: 'Do',
|
|
732
|
-
2: 'Re',
|
|
733
|
-
4: 'Mi',
|
|
734
|
-
5: 'Fa',
|
|
735
|
-
7: 'Sol',
|
|
736
|
-
9: 'La',
|
|
737
|
-
11: 'Si'
|
|
738
|
-
},
|
|
739
|
-
[(0, $dce48cb70c4120bb$export$f5b1d6b4244c9536)]: {
|
|
740
|
-
0: 'Si#',
|
|
741
|
-
1: 'Do#',
|
|
742
|
-
3: 'Re#',
|
|
743
|
-
5: 'Mi#',
|
|
744
|
-
6: 'Fa#',
|
|
745
|
-
8: 'Sol#',
|
|
746
|
-
10: 'La#'
|
|
747
|
-
},
|
|
748
|
-
[(0, $dce48cb70c4120bb$export$1ea14522906630af)]: {
|
|
749
|
-
1: 'Reb',
|
|
750
|
-
3: 'Mib',
|
|
751
|
-
4: 'Fab',
|
|
752
|
-
6: 'Solb',
|
|
753
|
-
8: 'Lab',
|
|
754
|
-
10: 'Sib',
|
|
755
|
-
11: 'Dob'
|
|
756
|
-
}
|
|
757
|
-
},
|
|
758
|
-
[(0, $dce48cb70c4120bb$export$f23edc19d247fd25)]: {
|
|
759
|
-
[(0, $dce48cb70c4120bb$export$f0f7b592ea674eb2)]: {
|
|
760
|
-
0: 'Do',
|
|
761
|
-
2: 'Re',
|
|
762
|
-
4: 'Mi',
|
|
763
|
-
5: 'Fa',
|
|
764
|
-
7: 'Sol',
|
|
765
|
-
9: 'La',
|
|
766
|
-
11: 'Si'
|
|
767
|
-
},
|
|
768
|
-
[(0, $dce48cb70c4120bb$export$f5b1d6b4244c9536)]: {
|
|
769
|
-
0: 'Si#',
|
|
770
|
-
1: 'Do#',
|
|
771
|
-
3: 'Re#',
|
|
772
|
-
5: 'Mi#',
|
|
773
|
-
6: 'Fa#',
|
|
774
|
-
8: 'Sol#',
|
|
775
|
-
10: 'La#'
|
|
776
|
-
},
|
|
777
|
-
[(0, $dce48cb70c4120bb$export$1ea14522906630af)]: {
|
|
778
|
-
1: 'Reb',
|
|
779
|
-
3: 'Mib',
|
|
780
|
-
4: 'Fab',
|
|
781
|
-
6: 'Solb',
|
|
782
|
-
8: 'Lab',
|
|
783
|
-
10: 'Sib',
|
|
784
|
-
11: 'Dob'
|
|
785
|
-
}
|
|
786
|
-
}
|
|
787
|
-
},
|
|
788
|
-
[(0, $dce48cb70c4120bb$export$4d318981b5a83836)]: {
|
|
789
|
-
[(0, $dce48cb70c4120bb$export$39615881bb0d21f6)]: {
|
|
790
|
-
[(0, $dce48cb70c4120bb$export$f0f7b592ea674eb2)]: {
|
|
791
|
-
0: '1',
|
|
792
|
-
2: '2',
|
|
793
|
-
4: '3',
|
|
794
|
-
5: '4',
|
|
795
|
-
7: '5',
|
|
796
|
-
9: '6',
|
|
797
|
-
11: '7'
|
|
798
|
-
},
|
|
799
|
-
[(0, $dce48cb70c4120bb$export$f5b1d6b4244c9536)]: {
|
|
800
|
-
0: '#7',
|
|
801
|
-
1: '#1',
|
|
802
|
-
3: '#2',
|
|
803
|
-
5: '#3',
|
|
804
|
-
6: '#4',
|
|
805
|
-
8: '#5',
|
|
806
|
-
10: '#6'
|
|
807
|
-
},
|
|
808
|
-
[(0, $dce48cb70c4120bb$export$1ea14522906630af)]: {
|
|
809
|
-
1: 'b2',
|
|
810
|
-
3: 'b3',
|
|
811
|
-
4: 'b4',
|
|
812
|
-
6: 'b5',
|
|
813
|
-
8: 'b6',
|
|
814
|
-
10: 'b7',
|
|
815
|
-
11: 'b1'
|
|
816
|
-
}
|
|
817
|
-
},
|
|
818
|
-
[(0, $dce48cb70c4120bb$export$f23edc19d247fd25)]: {
|
|
819
|
-
[(0, $dce48cb70c4120bb$export$f0f7b592ea674eb2)]: {
|
|
820
|
-
0: '1',
|
|
821
|
-
2: '2',
|
|
822
|
-
3: '3',
|
|
823
|
-
5: '4',
|
|
824
|
-
7: '5',
|
|
825
|
-
8: '6',
|
|
826
|
-
10: '7'
|
|
827
|
-
},
|
|
828
|
-
[(0, $dce48cb70c4120bb$export$f5b1d6b4244c9536)]: {
|
|
829
|
-
1: '#1',
|
|
830
|
-
3: '#2',
|
|
831
|
-
4: '#3',
|
|
832
|
-
6: '#4',
|
|
833
|
-
8: '#5',
|
|
834
|
-
9: '#6',
|
|
835
|
-
11: '#7'
|
|
836
|
-
},
|
|
837
|
-
[(0, $dce48cb70c4120bb$export$1ea14522906630af)]: {
|
|
838
|
-
1: 'b2',
|
|
839
|
-
2: 'b3',
|
|
840
|
-
4: 'b4',
|
|
841
|
-
6: 'b5',
|
|
842
|
-
7: 'b6',
|
|
843
|
-
9: 'b7',
|
|
844
|
-
11: 'b1'
|
|
845
|
-
}
|
|
846
|
-
}
|
|
847
|
-
},
|
|
848
|
-
[(0, $dce48cb70c4120bb$export$1321df9b16c30c6a)]: {
|
|
849
|
-
[(0, $dce48cb70c4120bb$export$39615881bb0d21f6)]: {
|
|
850
|
-
[(0, $dce48cb70c4120bb$export$f0f7b592ea674eb2)]: {
|
|
851
|
-
0: 'I',
|
|
852
|
-
2: 'II',
|
|
853
|
-
4: 'III',
|
|
854
|
-
5: 'IV',
|
|
855
|
-
7: 'V',
|
|
856
|
-
9: 'VI',
|
|
857
|
-
11: 'VII'
|
|
858
|
-
},
|
|
859
|
-
[(0, $dce48cb70c4120bb$export$f5b1d6b4244c9536)]: {
|
|
860
|
-
0: '#VII',
|
|
861
|
-
1: '#I',
|
|
862
|
-
3: '#II',
|
|
863
|
-
5: '#III',
|
|
864
|
-
6: '#IV',
|
|
865
|
-
8: '#V',
|
|
866
|
-
10: '#VI'
|
|
867
|
-
},
|
|
868
|
-
[(0, $dce48cb70c4120bb$export$1ea14522906630af)]: {
|
|
869
|
-
1: 'bII',
|
|
870
|
-
3: 'bIII',
|
|
871
|
-
4: 'bIV',
|
|
872
|
-
6: 'bV',
|
|
873
|
-
8: 'bVI',
|
|
874
|
-
10: 'bVII',
|
|
875
|
-
11: 'bI'
|
|
876
|
-
}
|
|
877
|
-
},
|
|
878
|
-
[(0, $dce48cb70c4120bb$export$f23edc19d247fd25)]: {
|
|
879
|
-
[(0, $dce48cb70c4120bb$export$f0f7b592ea674eb2)]: {
|
|
880
|
-
0: 'I',
|
|
881
|
-
2: 'II',
|
|
882
|
-
3: 'III',
|
|
883
|
-
5: 'IV',
|
|
884
|
-
7: 'V',
|
|
885
|
-
8: 'VI',
|
|
886
|
-
10: 'VII'
|
|
887
|
-
},
|
|
888
|
-
[(0, $dce48cb70c4120bb$export$f5b1d6b4244c9536)]: {
|
|
889
|
-
1: '#I',
|
|
890
|
-
3: '#II',
|
|
891
|
-
4: '#III',
|
|
892
|
-
6: '#IV',
|
|
893
|
-
8: '#V',
|
|
894
|
-
9: '#VI',
|
|
895
|
-
11: '#VII'
|
|
896
|
-
},
|
|
897
|
-
[(0, $dce48cb70c4120bb$export$1ea14522906630af)]: {
|
|
898
|
-
1: 'bII',
|
|
899
|
-
2: 'bIII',
|
|
900
|
-
4: 'bIV',
|
|
901
|
-
6: 'bV',
|
|
902
|
-
7: 'bVI',
|
|
903
|
-
9: 'bVII',
|
|
904
|
-
11: 'bI'
|
|
905
|
-
}
|
|
906
|
-
}
|
|
907
|
-
}
|
|
908
|
-
};
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
/**
|
|
914
|
-
* Represents a chord with the corresponding (partial) lyrics
|
|
915
|
-
*/ class $551a223fc13b5c10$var$ChordLyricsPair {
|
|
916
|
-
/**
|
|
917
|
-
* Initialises a ChordLyricsPair
|
|
918
|
-
* @param {string} chords The chords
|
|
919
|
-
* @param {string | null} lyrics The lyrics
|
|
920
|
-
* @param {string | null} annotation The annotation
|
|
921
|
-
* @param {Chord | null} chordObj Optional pre-parsed Chord object
|
|
922
|
-
* @param {boolean} isRhythmSymbol Whether this pair represents a rhythm symbol
|
|
923
|
-
*/ constructor(chords = '', lyrics = null, annotation = null, chordObj = null, isRhythmSymbol = false){
|
|
924
|
-
this.parentLine = null;
|
|
925
|
-
this._chordObj = null;
|
|
926
|
-
this.chords = chords || '';
|
|
927
|
-
this.lyrics = lyrics || '';
|
|
928
|
-
this.annotation = annotation || '';
|
|
929
|
-
this._chordObj = chordObj;
|
|
930
|
-
this.isRhythmSymbol = isRhythmSymbol;
|
|
931
|
-
}
|
|
932
|
-
/** Returns the Chord object if available, otherwise parses from string */ get chord() {
|
|
933
|
-
return this._chordObj || (0, $177a605b8569b31c$export$2e2bcd8739ae039).parse(this.chords.trim());
|
|
934
|
-
}
|
|
935
|
-
/**
|
|
936
|
-
* Indicates whether a ChordLyricsPair should be visible in a formatted chord sheet (except for ChordPro sheets)
|
|
937
|
-
* @returns {boolean}
|
|
938
|
-
*/ isRenderable() {
|
|
939
|
-
return true;
|
|
940
|
-
}
|
|
941
|
-
/**
|
|
942
|
-
* Indicates whether the ChordLyricsPair has non-empty lyrics.
|
|
943
|
-
*/ hasLyrics() {
|
|
944
|
-
return !!(this.lyrics && this.lyrics.trim().length > 0);
|
|
945
|
-
}
|
|
946
|
-
/**
|
|
947
|
-
* Returns a deep copy of the ChordLyricsPair, useful when programmatically transforming a song
|
|
948
|
-
* @returns {ChordLyricsPair}
|
|
949
|
-
*/ clone() {
|
|
950
|
-
const chordObj = this._chordObj?.clone() || null;
|
|
951
|
-
return new $551a223fc13b5c10$var$ChordLyricsPair(this.chords, this.lyrics, this.annotation, chordObj, this.isRhythmSymbol);
|
|
952
|
-
}
|
|
953
|
-
toString() {
|
|
954
|
-
return `ChordLyricsPair(chords=${this.chords}, lyrics=${this.lyrics})`;
|
|
955
|
-
}
|
|
956
|
-
set({ chords: chords, lyrics: lyrics, annotation: annotation, chordObj: chordObj, isRhythmSymbol: isRhythmSymbol }) {
|
|
957
|
-
return new $551a223fc13b5c10$var$ChordLyricsPair(chords ?? this.chords, lyrics ?? this.lyrics, annotation ?? this.annotation, chordObj ?? null, isRhythmSymbol ?? this.isRhythmSymbol);
|
|
958
|
-
}
|
|
959
|
-
setLyrics(lyrics) {
|
|
960
|
-
return this.set({
|
|
961
|
-
lyrics: lyrics
|
|
962
|
-
});
|
|
963
|
-
}
|
|
964
|
-
setAnnotation(annotation) {
|
|
965
|
-
return this.set({
|
|
966
|
-
annotation: annotation
|
|
967
|
-
});
|
|
968
|
-
}
|
|
969
|
-
transpose(delta, key = null, { normalizeChordSuffix: normalizeChordSuffix } = {
|
|
970
|
-
normalizeChordSuffix: false
|
|
971
|
-
}) {
|
|
972
|
-
return this.changeChord((chord)=>{
|
|
973
|
-
const transposedChord = chord.transpose(delta);
|
|
974
|
-
if (key) return transposedChord.normalize(key, {
|
|
975
|
-
normalizeSuffix: normalizeChordSuffix
|
|
976
|
-
});
|
|
977
|
-
return transposedChord;
|
|
978
|
-
});
|
|
979
|
-
}
|
|
980
|
-
useAccidental(accidental) {
|
|
981
|
-
return this.changeChord((chord)=>chord.useAccidental(accidental));
|
|
982
|
-
}
|
|
983
|
-
/**
|
|
984
|
-
* @deprecated Use useAccidental instead
|
|
985
|
-
*/ useModifier(accidental) {
|
|
986
|
-
(0, $28a2fcb6fb95a147$export$b680e6b2c82f8c2f)('useModifier is deprecated, use useAccidental instead');
|
|
987
|
-
return this.useAccidental(accidental);
|
|
988
|
-
}
|
|
989
|
-
changeChord(func) {
|
|
990
|
-
const chordObj = this.chord;
|
|
991
|
-
if (chordObj) {
|
|
992
|
-
const changedChord = func(chordObj);
|
|
993
|
-
return this.set({
|
|
994
|
-
chords: changedChord.toString(),
|
|
995
|
-
chordObj: changedChord
|
|
996
|
-
});
|
|
997
|
-
}
|
|
998
|
-
return this.clone();
|
|
507
|
+
return this.clone();
|
|
999
508
|
}
|
|
1000
509
|
}
|
|
1001
510
|
var $551a223fc13b5c10$export$2e2bcd8739ae039 = $551a223fc13b5c10$var$ChordLyricsPair;
|
|
@@ -1905,14 +1414,532 @@ const $5f19a6aa6bc347f1$var$mapping = {
|
|
|
1905
1414
|
"sus#42": "sus#42",
|
|
1906
1415
|
"": ""
|
|
1907
1416
|
};
|
|
1908
|
-
var $5f19a6aa6bc347f1$export$2e2bcd8739ae039 = $5f19a6aa6bc347f1$var$mapping;
|
|
1909
|
-
|
|
1417
|
+
var $5f19a6aa6bc347f1$export$2e2bcd8739ae039 = $5f19a6aa6bc347f1$var$mapping;
|
|
1418
|
+
|
|
1419
|
+
|
|
1420
|
+
/*
|
|
1421
|
+
⚠️⚠️⚠️ NOTE: this file has been generated automatically.
|
|
1422
|
+
Please do NOT edit this file directly, but instead:
|
|
1423
|
+
- edit the data source, located in `data/scales.ts`
|
|
1424
|
+
- run `yarn build:code-generate` to re-generate this file.
|
|
1425
|
+
*/
|
|
1426
|
+
const $3d106a0ee348cfa8$export$7e1516eaf3ebe01f = {
|
|
1427
|
+
[(0, $dce48cb70c4120bb$export$27c95a7104c1f7aa)]: {
|
|
1428
|
+
[(0, $dce48cb70c4120bb$export$39615881bb0d21f6)]: {
|
|
1429
|
+
[(0, $dce48cb70c4120bb$export$f0f7b592ea674eb2)]: {
|
|
1430
|
+
C: 0,
|
|
1431
|
+
D: 2,
|
|
1432
|
+
E: 4,
|
|
1433
|
+
F: 5,
|
|
1434
|
+
G: 7,
|
|
1435
|
+
A: 9,
|
|
1436
|
+
B: 11
|
|
1437
|
+
},
|
|
1438
|
+
[(0, $dce48cb70c4120bb$export$f5b1d6b4244c9536)]: {
|
|
1439
|
+
B: 0,
|
|
1440
|
+
C: 1,
|
|
1441
|
+
D: 3,
|
|
1442
|
+
E: 5,
|
|
1443
|
+
F: 6,
|
|
1444
|
+
G: 8,
|
|
1445
|
+
A: 10
|
|
1446
|
+
},
|
|
1447
|
+
[(0, $dce48cb70c4120bb$export$1ea14522906630af)]: {
|
|
1448
|
+
D: 1,
|
|
1449
|
+
E: 3,
|
|
1450
|
+
F: 4,
|
|
1451
|
+
G: 6,
|
|
1452
|
+
A: 8,
|
|
1453
|
+
B: 10,
|
|
1454
|
+
C: 11
|
|
1455
|
+
}
|
|
1456
|
+
},
|
|
1457
|
+
[(0, $dce48cb70c4120bb$export$f23edc19d247fd25)]: {
|
|
1458
|
+
[(0, $dce48cb70c4120bb$export$f0f7b592ea674eb2)]: {
|
|
1459
|
+
C: 0,
|
|
1460
|
+
D: 2,
|
|
1461
|
+
E: 4,
|
|
1462
|
+
F: 5,
|
|
1463
|
+
G: 7,
|
|
1464
|
+
A: 9,
|
|
1465
|
+
B: 11
|
|
1466
|
+
},
|
|
1467
|
+
[(0, $dce48cb70c4120bb$export$f5b1d6b4244c9536)]: {
|
|
1468
|
+
B: 0,
|
|
1469
|
+
C: 1,
|
|
1470
|
+
D: 3,
|
|
1471
|
+
E: 5,
|
|
1472
|
+
F: 6,
|
|
1473
|
+
G: 8,
|
|
1474
|
+
A: 10
|
|
1475
|
+
},
|
|
1476
|
+
[(0, $dce48cb70c4120bb$export$1ea14522906630af)]: {
|
|
1477
|
+
D: 1,
|
|
1478
|
+
E: 3,
|
|
1479
|
+
F: 4,
|
|
1480
|
+
G: 6,
|
|
1481
|
+
A: 8,
|
|
1482
|
+
B: 10,
|
|
1483
|
+
C: 11
|
|
1484
|
+
}
|
|
1485
|
+
}
|
|
1486
|
+
},
|
|
1487
|
+
[(0, $dce48cb70c4120bb$export$539a6499f4711c57)]: {
|
|
1488
|
+
[(0, $dce48cb70c4120bb$export$39615881bb0d21f6)]: {
|
|
1489
|
+
[(0, $dce48cb70c4120bb$export$f0f7b592ea674eb2)]: {
|
|
1490
|
+
Do: 0,
|
|
1491
|
+
Re: 2,
|
|
1492
|
+
Mi: 4,
|
|
1493
|
+
Fa: 5,
|
|
1494
|
+
Sol: 7,
|
|
1495
|
+
La: 9,
|
|
1496
|
+
Si: 11
|
|
1497
|
+
},
|
|
1498
|
+
[(0, $dce48cb70c4120bb$export$f5b1d6b4244c9536)]: {
|
|
1499
|
+
Si: 0,
|
|
1500
|
+
Do: 1,
|
|
1501
|
+
Re: 3,
|
|
1502
|
+
Mi: 5,
|
|
1503
|
+
Fa: 6,
|
|
1504
|
+
Sol: 8,
|
|
1505
|
+
La: 10
|
|
1506
|
+
},
|
|
1507
|
+
[(0, $dce48cb70c4120bb$export$1ea14522906630af)]: {
|
|
1508
|
+
Re: 1,
|
|
1509
|
+
Mi: 3,
|
|
1510
|
+
Fa: 4,
|
|
1511
|
+
Sol: 6,
|
|
1512
|
+
La: 8,
|
|
1513
|
+
Si: 10,
|
|
1514
|
+
Do: 11
|
|
1515
|
+
}
|
|
1516
|
+
},
|
|
1517
|
+
[(0, $dce48cb70c4120bb$export$f23edc19d247fd25)]: {
|
|
1518
|
+
[(0, $dce48cb70c4120bb$export$f0f7b592ea674eb2)]: {
|
|
1519
|
+
Do: 0,
|
|
1520
|
+
Re: 2,
|
|
1521
|
+
Mi: 4,
|
|
1522
|
+
Fa: 5,
|
|
1523
|
+
Sol: 7,
|
|
1524
|
+
La: 9,
|
|
1525
|
+
Si: 11
|
|
1526
|
+
},
|
|
1527
|
+
[(0, $dce48cb70c4120bb$export$f5b1d6b4244c9536)]: {
|
|
1528
|
+
Si: 0,
|
|
1529
|
+
Do: 1,
|
|
1530
|
+
Re: 3,
|
|
1531
|
+
Mi: 5,
|
|
1532
|
+
Fa: 6,
|
|
1533
|
+
Sol: 8,
|
|
1534
|
+
La: 10
|
|
1535
|
+
},
|
|
1536
|
+
[(0, $dce48cb70c4120bb$export$1ea14522906630af)]: {
|
|
1537
|
+
Re: 1,
|
|
1538
|
+
Mi: 3,
|
|
1539
|
+
Fa: 4,
|
|
1540
|
+
Sol: 6,
|
|
1541
|
+
La: 8,
|
|
1542
|
+
Si: 10,
|
|
1543
|
+
Do: 11
|
|
1544
|
+
}
|
|
1545
|
+
}
|
|
1546
|
+
},
|
|
1547
|
+
[(0, $dce48cb70c4120bb$export$4d318981b5a83836)]: {
|
|
1548
|
+
[(0, $dce48cb70c4120bb$export$39615881bb0d21f6)]: {
|
|
1549
|
+
[(0, $dce48cb70c4120bb$export$f0f7b592ea674eb2)]: {
|
|
1550
|
+
1: 0,
|
|
1551
|
+
2: 2,
|
|
1552
|
+
3: 4,
|
|
1553
|
+
4: 5,
|
|
1554
|
+
5: 7,
|
|
1555
|
+
6: 9,
|
|
1556
|
+
7: 11
|
|
1557
|
+
},
|
|
1558
|
+
[(0, $dce48cb70c4120bb$export$f5b1d6b4244c9536)]: {
|
|
1559
|
+
7: 0,
|
|
1560
|
+
1: 1,
|
|
1561
|
+
2: 3,
|
|
1562
|
+
3: 5,
|
|
1563
|
+
4: 6,
|
|
1564
|
+
5: 8,
|
|
1565
|
+
6: 10
|
|
1566
|
+
},
|
|
1567
|
+
[(0, $dce48cb70c4120bb$export$1ea14522906630af)]: {
|
|
1568
|
+
2: 1,
|
|
1569
|
+
3: 3,
|
|
1570
|
+
4: 4,
|
|
1571
|
+
5: 6,
|
|
1572
|
+
6: 8,
|
|
1573
|
+
7: 10,
|
|
1574
|
+
1: 11
|
|
1575
|
+
}
|
|
1576
|
+
},
|
|
1577
|
+
[(0, $dce48cb70c4120bb$export$f23edc19d247fd25)]: {
|
|
1578
|
+
[(0, $dce48cb70c4120bb$export$f0f7b592ea674eb2)]: {
|
|
1579
|
+
1: 0,
|
|
1580
|
+
2: 2,
|
|
1581
|
+
3: 3,
|
|
1582
|
+
4: 5,
|
|
1583
|
+
5: 7,
|
|
1584
|
+
6: 8,
|
|
1585
|
+
7: 10
|
|
1586
|
+
},
|
|
1587
|
+
[(0, $dce48cb70c4120bb$export$f5b1d6b4244c9536)]: {
|
|
1588
|
+
1: 1,
|
|
1589
|
+
2: 3,
|
|
1590
|
+
3: 4,
|
|
1591
|
+
4: 6,
|
|
1592
|
+
5: 8,
|
|
1593
|
+
6: 9,
|
|
1594
|
+
7: 11
|
|
1595
|
+
},
|
|
1596
|
+
[(0, $dce48cb70c4120bb$export$1ea14522906630af)]: {
|
|
1597
|
+
2: 1,
|
|
1598
|
+
3: 2,
|
|
1599
|
+
4: 4,
|
|
1600
|
+
5: 6,
|
|
1601
|
+
6: 7,
|
|
1602
|
+
7: 9,
|
|
1603
|
+
1: 11
|
|
1604
|
+
}
|
|
1605
|
+
}
|
|
1606
|
+
},
|
|
1607
|
+
[(0, $dce48cb70c4120bb$export$1321df9b16c30c6a)]: {
|
|
1608
|
+
[(0, $dce48cb70c4120bb$export$39615881bb0d21f6)]: {
|
|
1609
|
+
[(0, $dce48cb70c4120bb$export$f0f7b592ea674eb2)]: {
|
|
1610
|
+
I: 0,
|
|
1611
|
+
II: 2,
|
|
1612
|
+
III: 4,
|
|
1613
|
+
IV: 5,
|
|
1614
|
+
V: 7,
|
|
1615
|
+
VI: 9,
|
|
1616
|
+
VII: 11
|
|
1617
|
+
},
|
|
1618
|
+
[(0, $dce48cb70c4120bb$export$f5b1d6b4244c9536)]: {
|
|
1619
|
+
VII: 0,
|
|
1620
|
+
I: 1,
|
|
1621
|
+
II: 3,
|
|
1622
|
+
III: 5,
|
|
1623
|
+
IV: 6,
|
|
1624
|
+
V: 8,
|
|
1625
|
+
VI: 10
|
|
1626
|
+
},
|
|
1627
|
+
[(0, $dce48cb70c4120bb$export$1ea14522906630af)]: {
|
|
1628
|
+
II: 1,
|
|
1629
|
+
III: 3,
|
|
1630
|
+
IV: 4,
|
|
1631
|
+
V: 6,
|
|
1632
|
+
VI: 8,
|
|
1633
|
+
VII: 10,
|
|
1634
|
+
I: 11
|
|
1635
|
+
}
|
|
1636
|
+
},
|
|
1637
|
+
[(0, $dce48cb70c4120bb$export$f23edc19d247fd25)]: {
|
|
1638
|
+
[(0, $dce48cb70c4120bb$export$f0f7b592ea674eb2)]: {
|
|
1639
|
+
I: 0,
|
|
1640
|
+
II: 2,
|
|
1641
|
+
III: 3,
|
|
1642
|
+
IV: 5,
|
|
1643
|
+
V: 7,
|
|
1644
|
+
VI: 8,
|
|
1645
|
+
VII: 10
|
|
1646
|
+
},
|
|
1647
|
+
[(0, $dce48cb70c4120bb$export$f5b1d6b4244c9536)]: {
|
|
1648
|
+
I: 1,
|
|
1649
|
+
II: 3,
|
|
1650
|
+
III: 4,
|
|
1651
|
+
IV: 6,
|
|
1652
|
+
V: 8,
|
|
1653
|
+
VI: 9,
|
|
1654
|
+
VII: 11
|
|
1655
|
+
},
|
|
1656
|
+
[(0, $dce48cb70c4120bb$export$1ea14522906630af)]: {
|
|
1657
|
+
II: 1,
|
|
1658
|
+
III: 2,
|
|
1659
|
+
IV: 4,
|
|
1660
|
+
V: 6,
|
|
1661
|
+
VI: 7,
|
|
1662
|
+
VII: 9,
|
|
1663
|
+
I: 11
|
|
1664
|
+
}
|
|
1665
|
+
}
|
|
1666
|
+
}
|
|
1667
|
+
};
|
|
1668
|
+
const $3d106a0ee348cfa8$export$40141681ebb03523 = {
|
|
1669
|
+
[(0, $dce48cb70c4120bb$export$27c95a7104c1f7aa)]: {
|
|
1670
|
+
[(0, $dce48cb70c4120bb$export$39615881bb0d21f6)]: {
|
|
1671
|
+
[(0, $dce48cb70c4120bb$export$f0f7b592ea674eb2)]: {
|
|
1672
|
+
0: 'C',
|
|
1673
|
+
2: 'D',
|
|
1674
|
+
4: 'E',
|
|
1675
|
+
5: 'F',
|
|
1676
|
+
7: 'G',
|
|
1677
|
+
9: 'A',
|
|
1678
|
+
11: 'B'
|
|
1679
|
+
},
|
|
1680
|
+
[(0, $dce48cb70c4120bb$export$f5b1d6b4244c9536)]: {
|
|
1681
|
+
0: 'B#',
|
|
1682
|
+
1: 'C#',
|
|
1683
|
+
3: 'D#',
|
|
1684
|
+
5: 'E#',
|
|
1685
|
+
6: 'F#',
|
|
1686
|
+
8: 'G#',
|
|
1687
|
+
10: 'A#'
|
|
1688
|
+
},
|
|
1689
|
+
[(0, $dce48cb70c4120bb$export$1ea14522906630af)]: {
|
|
1690
|
+
1: 'Db',
|
|
1691
|
+
3: 'Eb',
|
|
1692
|
+
4: 'Fb',
|
|
1693
|
+
6: 'Gb',
|
|
1694
|
+
8: 'Ab',
|
|
1695
|
+
10: 'Bb',
|
|
1696
|
+
11: 'Cb'
|
|
1697
|
+
}
|
|
1698
|
+
},
|
|
1699
|
+
[(0, $dce48cb70c4120bb$export$f23edc19d247fd25)]: {
|
|
1700
|
+
[(0, $dce48cb70c4120bb$export$f0f7b592ea674eb2)]: {
|
|
1701
|
+
0: 'C',
|
|
1702
|
+
2: 'D',
|
|
1703
|
+
4: 'E',
|
|
1704
|
+
5: 'F',
|
|
1705
|
+
7: 'G',
|
|
1706
|
+
9: 'A',
|
|
1707
|
+
11: 'B'
|
|
1708
|
+
},
|
|
1709
|
+
[(0, $dce48cb70c4120bb$export$f5b1d6b4244c9536)]: {
|
|
1710
|
+
0: 'B#',
|
|
1711
|
+
1: 'C#',
|
|
1712
|
+
3: 'D#',
|
|
1713
|
+
5: 'E#',
|
|
1714
|
+
6: 'F#',
|
|
1715
|
+
8: 'G#',
|
|
1716
|
+
10: 'A#'
|
|
1717
|
+
},
|
|
1718
|
+
[(0, $dce48cb70c4120bb$export$1ea14522906630af)]: {
|
|
1719
|
+
1: 'Db',
|
|
1720
|
+
3: 'Eb',
|
|
1721
|
+
4: 'Fb',
|
|
1722
|
+
6: 'Gb',
|
|
1723
|
+
8: 'Ab',
|
|
1724
|
+
10: 'Bb',
|
|
1725
|
+
11: 'Cb'
|
|
1726
|
+
}
|
|
1727
|
+
}
|
|
1728
|
+
},
|
|
1729
|
+
[(0, $dce48cb70c4120bb$export$539a6499f4711c57)]: {
|
|
1730
|
+
[(0, $dce48cb70c4120bb$export$39615881bb0d21f6)]: {
|
|
1731
|
+
[(0, $dce48cb70c4120bb$export$f0f7b592ea674eb2)]: {
|
|
1732
|
+
0: 'Do',
|
|
1733
|
+
2: 'Re',
|
|
1734
|
+
4: 'Mi',
|
|
1735
|
+
5: 'Fa',
|
|
1736
|
+
7: 'Sol',
|
|
1737
|
+
9: 'La',
|
|
1738
|
+
11: 'Si'
|
|
1739
|
+
},
|
|
1740
|
+
[(0, $dce48cb70c4120bb$export$f5b1d6b4244c9536)]: {
|
|
1741
|
+
0: 'Si#',
|
|
1742
|
+
1: 'Do#',
|
|
1743
|
+
3: 'Re#',
|
|
1744
|
+
5: 'Mi#',
|
|
1745
|
+
6: 'Fa#',
|
|
1746
|
+
8: 'Sol#',
|
|
1747
|
+
10: 'La#'
|
|
1748
|
+
},
|
|
1749
|
+
[(0, $dce48cb70c4120bb$export$1ea14522906630af)]: {
|
|
1750
|
+
1: 'Reb',
|
|
1751
|
+
3: 'Mib',
|
|
1752
|
+
4: 'Fab',
|
|
1753
|
+
6: 'Solb',
|
|
1754
|
+
8: 'Lab',
|
|
1755
|
+
10: 'Sib',
|
|
1756
|
+
11: 'Dob'
|
|
1757
|
+
}
|
|
1758
|
+
},
|
|
1759
|
+
[(0, $dce48cb70c4120bb$export$f23edc19d247fd25)]: {
|
|
1760
|
+
[(0, $dce48cb70c4120bb$export$f0f7b592ea674eb2)]: {
|
|
1761
|
+
0: 'Do',
|
|
1762
|
+
2: 'Re',
|
|
1763
|
+
4: 'Mi',
|
|
1764
|
+
5: 'Fa',
|
|
1765
|
+
7: 'Sol',
|
|
1766
|
+
9: 'La',
|
|
1767
|
+
11: 'Si'
|
|
1768
|
+
},
|
|
1769
|
+
[(0, $dce48cb70c4120bb$export$f5b1d6b4244c9536)]: {
|
|
1770
|
+
0: 'Si#',
|
|
1771
|
+
1: 'Do#',
|
|
1772
|
+
3: 'Re#',
|
|
1773
|
+
5: 'Mi#',
|
|
1774
|
+
6: 'Fa#',
|
|
1775
|
+
8: 'Sol#',
|
|
1776
|
+
10: 'La#'
|
|
1777
|
+
},
|
|
1778
|
+
[(0, $dce48cb70c4120bb$export$1ea14522906630af)]: {
|
|
1779
|
+
1: 'Reb',
|
|
1780
|
+
3: 'Mib',
|
|
1781
|
+
4: 'Fab',
|
|
1782
|
+
6: 'Solb',
|
|
1783
|
+
8: 'Lab',
|
|
1784
|
+
10: 'Sib',
|
|
1785
|
+
11: 'Dob'
|
|
1786
|
+
}
|
|
1787
|
+
}
|
|
1788
|
+
},
|
|
1789
|
+
[(0, $dce48cb70c4120bb$export$4d318981b5a83836)]: {
|
|
1790
|
+
[(0, $dce48cb70c4120bb$export$39615881bb0d21f6)]: {
|
|
1791
|
+
[(0, $dce48cb70c4120bb$export$f0f7b592ea674eb2)]: {
|
|
1792
|
+
0: '1',
|
|
1793
|
+
2: '2',
|
|
1794
|
+
4: '3',
|
|
1795
|
+
5: '4',
|
|
1796
|
+
7: '5',
|
|
1797
|
+
9: '6',
|
|
1798
|
+
11: '7'
|
|
1799
|
+
},
|
|
1800
|
+
[(0, $dce48cb70c4120bb$export$f5b1d6b4244c9536)]: {
|
|
1801
|
+
0: '#7',
|
|
1802
|
+
1: '#1',
|
|
1803
|
+
3: '#2',
|
|
1804
|
+
5: '#3',
|
|
1805
|
+
6: '#4',
|
|
1806
|
+
8: '#5',
|
|
1807
|
+
10: '#6'
|
|
1808
|
+
},
|
|
1809
|
+
[(0, $dce48cb70c4120bb$export$1ea14522906630af)]: {
|
|
1810
|
+
1: 'b2',
|
|
1811
|
+
3: 'b3',
|
|
1812
|
+
4: 'b4',
|
|
1813
|
+
6: 'b5',
|
|
1814
|
+
8: 'b6',
|
|
1815
|
+
10: 'b7',
|
|
1816
|
+
11: 'b1'
|
|
1817
|
+
}
|
|
1818
|
+
},
|
|
1819
|
+
[(0, $dce48cb70c4120bb$export$f23edc19d247fd25)]: {
|
|
1820
|
+
[(0, $dce48cb70c4120bb$export$f0f7b592ea674eb2)]: {
|
|
1821
|
+
0: '1',
|
|
1822
|
+
2: '2',
|
|
1823
|
+
3: '3',
|
|
1824
|
+
5: '4',
|
|
1825
|
+
7: '5',
|
|
1826
|
+
8: '6',
|
|
1827
|
+
10: '7'
|
|
1828
|
+
},
|
|
1829
|
+
[(0, $dce48cb70c4120bb$export$f5b1d6b4244c9536)]: {
|
|
1830
|
+
1: '#1',
|
|
1831
|
+
3: '#2',
|
|
1832
|
+
4: '#3',
|
|
1833
|
+
6: '#4',
|
|
1834
|
+
8: '#5',
|
|
1835
|
+
9: '#6',
|
|
1836
|
+
11: '#7'
|
|
1837
|
+
},
|
|
1838
|
+
[(0, $dce48cb70c4120bb$export$1ea14522906630af)]: {
|
|
1839
|
+
1: 'b2',
|
|
1840
|
+
2: 'b3',
|
|
1841
|
+
4: 'b4',
|
|
1842
|
+
6: 'b5',
|
|
1843
|
+
7: 'b6',
|
|
1844
|
+
9: 'b7',
|
|
1845
|
+
11: 'b1'
|
|
1846
|
+
}
|
|
1847
|
+
}
|
|
1848
|
+
},
|
|
1849
|
+
[(0, $dce48cb70c4120bb$export$1321df9b16c30c6a)]: {
|
|
1850
|
+
[(0, $dce48cb70c4120bb$export$39615881bb0d21f6)]: {
|
|
1851
|
+
[(0, $dce48cb70c4120bb$export$f0f7b592ea674eb2)]: {
|
|
1852
|
+
0: 'I',
|
|
1853
|
+
2: 'II',
|
|
1854
|
+
4: 'III',
|
|
1855
|
+
5: 'IV',
|
|
1856
|
+
7: 'V',
|
|
1857
|
+
9: 'VI',
|
|
1858
|
+
11: 'VII'
|
|
1859
|
+
},
|
|
1860
|
+
[(0, $dce48cb70c4120bb$export$f5b1d6b4244c9536)]: {
|
|
1861
|
+
0: '#VII',
|
|
1862
|
+
1: '#I',
|
|
1863
|
+
3: '#II',
|
|
1864
|
+
5: '#III',
|
|
1865
|
+
6: '#IV',
|
|
1866
|
+
8: '#V',
|
|
1867
|
+
10: '#VI'
|
|
1868
|
+
},
|
|
1869
|
+
[(0, $dce48cb70c4120bb$export$1ea14522906630af)]: {
|
|
1870
|
+
1: 'bII',
|
|
1871
|
+
3: 'bIII',
|
|
1872
|
+
4: 'bIV',
|
|
1873
|
+
6: 'bV',
|
|
1874
|
+
8: 'bVI',
|
|
1875
|
+
10: 'bVII',
|
|
1876
|
+
11: 'bI'
|
|
1877
|
+
}
|
|
1878
|
+
},
|
|
1879
|
+
[(0, $dce48cb70c4120bb$export$f23edc19d247fd25)]: {
|
|
1880
|
+
[(0, $dce48cb70c4120bb$export$f0f7b592ea674eb2)]: {
|
|
1881
|
+
0: 'I',
|
|
1882
|
+
2: 'II',
|
|
1883
|
+
3: 'III',
|
|
1884
|
+
5: 'IV',
|
|
1885
|
+
7: 'V',
|
|
1886
|
+
8: 'VI',
|
|
1887
|
+
10: 'VII'
|
|
1888
|
+
},
|
|
1889
|
+
[(0, $dce48cb70c4120bb$export$f5b1d6b4244c9536)]: {
|
|
1890
|
+
1: '#I',
|
|
1891
|
+
3: '#II',
|
|
1892
|
+
4: '#III',
|
|
1893
|
+
6: '#IV',
|
|
1894
|
+
8: '#V',
|
|
1895
|
+
9: '#VI',
|
|
1896
|
+
11: '#VII'
|
|
1897
|
+
},
|
|
1898
|
+
[(0, $dce48cb70c4120bb$export$1ea14522906630af)]: {
|
|
1899
|
+
1: 'bII',
|
|
1900
|
+
2: 'bIII',
|
|
1901
|
+
4: 'bIV',
|
|
1902
|
+
6: 'bV',
|
|
1903
|
+
7: 'bVI',
|
|
1904
|
+
9: 'bVII',
|
|
1905
|
+
11: 'bI'
|
|
1906
|
+
}
|
|
1907
|
+
}
|
|
1908
|
+
}
|
|
1909
|
+
};
|
|
1910
1910
|
|
|
1911
1911
|
|
|
1912
1912
|
|
|
1913
1913
|
function $28a2fcb6fb95a147$export$79570e60478bce41(value, functions) {
|
|
1914
1914
|
return functions.reduce((acc, fn)=>fn(acc), value);
|
|
1915
1915
|
}
|
|
1916
|
+
function $28a2fcb6fb95a147$export$4da2456f0a9c9a18(key) {
|
|
1917
|
+
return key === 'H' || key === 'h';
|
|
1918
|
+
}
|
|
1919
|
+
function $28a2fcb6fb95a147$export$59c434f66823d8be(key) {
|
|
1920
|
+
if (key === 'H') return 'B';
|
|
1921
|
+
if (key === 'h') return 'b';
|
|
1922
|
+
return key;
|
|
1923
|
+
}
|
|
1924
|
+
function $28a2fcb6fb95a147$export$4f126a839166f96d(keyString) {
|
|
1925
|
+
return keyString.startsWith('H') ? `B${keyString.slice(1)}` : keyString;
|
|
1926
|
+
}
|
|
1927
|
+
function $28a2fcb6fb95a147$export$7d9735233c5272d2(key, accidental, notation) {
|
|
1928
|
+
if (notation === (0, $dce48cb70c4120bb$export$34df5089b632c747) && accidental === null && (key === 'B' || key === 'b')) return 0, $dce48cb70c4120bb$export$1ea14522906630af;
|
|
1929
|
+
return null;
|
|
1930
|
+
}
|
|
1931
|
+
function $28a2fcb6fb95a147$export$9bc1c71527523e02(keyString, explicit) {
|
|
1932
|
+
if (explicit) return explicit;
|
|
1933
|
+
return $28a2fcb6fb95a147$export$4da2456f0a9c9a18(keyString) ? (0, $dce48cb70c4120bb$export$34df5089b632c747) : null;
|
|
1934
|
+
}
|
|
1935
|
+
function $28a2fcb6fb95a147$export$f524439d316753cc(key, accidental, type, minor) {
|
|
1936
|
+
const grades = (0, $3d106a0ee348cfa8$export$7e1516eaf3ebe01f)[type][minor ? (0, $dce48cb70c4120bb$export$f23edc19d247fd25) : (0, $dce48cb70c4120bb$export$39615881bb0d21f6)][accidental];
|
|
1937
|
+
const lookupKey = type === (0, $dce48cb70c4120bb$export$27c95a7104c1f7aa) ? $28a2fcb6fb95a147$export$59c434f66823d8be(key) : key;
|
|
1938
|
+
if (lookupKey in grades) return grades[lookupKey];
|
|
1939
|
+
const upperCaseKey = lookupKey.toUpperCase();
|
|
1940
|
+
if (upperCaseKey in grades) return grades[upperCaseKey];
|
|
1941
|
+
return null;
|
|
1942
|
+
}
|
|
1916
1943
|
function $28a2fcb6fb95a147$export$d332d76d125f0cbe(line) {
|
|
1917
1944
|
return line.items.some((item)=>item instanceof (0, $551a223fc13b5c10$export$2e2bcd8739ae039) && !!item.chords);
|
|
1918
1945
|
}
|
|
@@ -2058,7 +2085,7 @@ function $28a2fcb6fb95a147$export$1039dc7987464938(object, predicate) {
|
|
|
2058
2085
|
|
|
2059
2086
|
|
|
2060
2087
|
const $c2d6ab25ad00308f$var$regexes = {
|
|
2061
|
-
symbol: /^(?<key>((?<note>[A-
|
|
2088
|
+
symbol: /^(?<key>((?<note>[A-Ha-h])(?<accidental>#|b)?))(?<minor>m)?$/,
|
|
2062
2089
|
solfege: /^(?<key>((?<note>Do|Re|Mi|Fa|Sol|La|Si|do|re|mi|fa|sol|la|si)(?<accidental>#|b)?))(?<minor>m)?$/,
|
|
2063
2090
|
numeric: /^(?<key>(?<accidental>#|b)?(?<note>[1-7]))(?<minor>m)?$/,
|
|
2064
2091
|
numeral: /^(?<key>(?<accidental>#|b)?(?<note>I{1,3}|IV|VI{0,2}|i{1,3}|iv|vi{0,2}))$/
|
|
@@ -2145,27 +2172,28 @@ const $c2d6ab25ad00308f$var$PREFERS_FLAT_NUMBERS = [
|
|
|
2145
2172
|
key: note,
|
|
2146
2173
|
keyType: keyType,
|
|
2147
2174
|
minor: minor || false,
|
|
2148
|
-
accidental: accidental || null
|
|
2175
|
+
accidental: accidental || null,
|
|
2176
|
+
preferredNotation: keyType === (0, $dce48cb70c4120bb$export$27c95a7104c1f7aa) && (0, $28a2fcb6fb95a147$export$4da2456f0a9c9a18)(note) ? (0, $dce48cb70c4120bb$export$34df5089b632c747) : null
|
|
2149
2177
|
});
|
|
2150
2178
|
}
|
|
2151
|
-
/* eslint-disable-next-line max-lines-per-function */ static resolve({ key: key, keyType: keyType, minor: minor, accidental: accidental }) {
|
|
2179
|
+
/* eslint-disable-next-line max-lines-per-function */ static resolve({ key: key, keyType: keyType, minor: minor, accidental: accidental, preferredNotation: preferredNotation }) {
|
|
2152
2180
|
const keyString = `${key}`;
|
|
2153
2181
|
const isMinor = this.isMinor(keyString, keyType, minor);
|
|
2154
|
-
|
|
2155
|
-
|
|
2156
|
-
|
|
2157
|
-
|
|
2158
|
-
|
|
2159
|
-
|
|
2160
|
-
|
|
2161
|
-
|
|
2162
|
-
|
|
2163
|
-
|
|
2164
|
-
|
|
2165
|
-
|
|
2166
|
-
|
|
2182
|
+
const notation = (0, $28a2fcb6fb95a147$export$9bc1c71527523e02)(keyString, preferredNotation);
|
|
2183
|
+
const lookupAccidental = (0, $28a2fcb6fb95a147$export$7d9735233c5272d2)(keyString, accidental, notation) ?? accidental;
|
|
2184
|
+
const grade = keyType === (0, $dce48cb70c4120bb$export$27c95a7104c1f7aa) || keyType === (0, $dce48cb70c4120bb$export$539a6499f4711c57) ? (0, $28a2fcb6fb95a147$export$f524439d316753cc)(keyString, lookupAccidental || (0, $dce48cb70c4120bb$export$3fdd332fe3104970), keyType, isMinor) : null;
|
|
2185
|
+
if (grade !== null) return new $c2d6ab25ad00308f$var$Key({
|
|
2186
|
+
grade: 0,
|
|
2187
|
+
minor: isMinor,
|
|
2188
|
+
type: keyType,
|
|
2189
|
+
accidental: accidental || null,
|
|
2190
|
+
preferredAccidental: accidental || null,
|
|
2191
|
+
referenceKeyGrade: grade,
|
|
2192
|
+
originalKeyString: keyString,
|
|
2193
|
+
preferredNotation: notation
|
|
2194
|
+
});
|
|
2167
2195
|
return new $c2d6ab25ad00308f$var$Key({
|
|
2168
|
-
number:
|
|
2196
|
+
number: this.getNumberFromKey(keyString, keyType),
|
|
2169
2197
|
minor: isMinor,
|
|
2170
2198
|
type: keyType,
|
|
2171
2199
|
accidental: accidental || null,
|
|
@@ -2189,14 +2217,6 @@ const $c2d6ab25ad00308f$var$PREFERS_FLAT_NUMBERS = [
|
|
|
2189
2217
|
(0, $28a2fcb6fb95a147$export$b680e6b2c82f8c2f)('keyWithModifier is deprecated, use keyWithAccidental instead');
|
|
2190
2218
|
return this.keyWithAccidental(key, accidental, type);
|
|
2191
2219
|
}
|
|
2192
|
-
static toGrade(key, accidental, type, isMinor) {
|
|
2193
|
-
const mode = isMinor ? (0, $dce48cb70c4120bb$export$f23edc19d247fd25) : (0, $dce48cb70c4120bb$export$39615881bb0d21f6);
|
|
2194
|
-
const grades = (0, $3d106a0ee348cfa8$export$7e1516eaf3ebe01f)[type][mode][accidental];
|
|
2195
|
-
if (key in grades) return grades[key];
|
|
2196
|
-
const upperCaseKey = key.toUpperCase();
|
|
2197
|
-
if (upperCaseKey in grades) return grades[upperCaseKey];
|
|
2198
|
-
return null;
|
|
2199
|
-
}
|
|
2200
2220
|
static isMinor(key, keyType, minor) {
|
|
2201
2221
|
switch(keyType){
|
|
2202
2222
|
case 'numeral':
|
|
@@ -2239,13 +2259,14 @@ const $c2d6ab25ad00308f$var$PREFERS_FLAT_NUMBERS = [
|
|
|
2239
2259
|
*/ static distance(oneKey, otherKey) {
|
|
2240
2260
|
return this.wrapOrFail(oneKey).distanceTo(otherKey);
|
|
2241
2261
|
}
|
|
2242
|
-
constructor({ grade: grade = null, number: number = null, minor: minor, type: type, accidental: accidental, referenceKeyGrade: referenceKeyGrade = null, referenceKeyMode: referenceKeyMode = null, originalKeyString: originalKeyString = null, preferredAccidental: preferredAccidental = null, explicitAccidental: explicitAccidental = false }){
|
|
2262
|
+
constructor({ grade: grade = null, number: number = null, minor: minor, type: type, accidental: accidental, referenceKeyGrade: referenceKeyGrade = null, referenceKeyMode: referenceKeyMode = null, originalKeyString: originalKeyString = null, preferredAccidental: preferredAccidental = null, explicitAccidental: explicitAccidental = false, preferredNotation: preferredNotation = null }){
|
|
2243
2263
|
this.number = null;
|
|
2244
2264
|
this.minor = false;
|
|
2245
2265
|
this.referenceKeyGrade = null;
|
|
2246
2266
|
this.referenceKeyMode = null;
|
|
2247
2267
|
this.originalKeyString = null;
|
|
2248
2268
|
this.explicitAccidental = false;
|
|
2269
|
+
this.preferredNotation = null;
|
|
2249
2270
|
this.grade = grade;
|
|
2250
2271
|
this.number = number;
|
|
2251
2272
|
this.minor = minor;
|
|
@@ -2256,6 +2277,7 @@ const $c2d6ab25ad00308f$var$PREFERS_FLAT_NUMBERS = [
|
|
|
2256
2277
|
this.referenceKeyMode = referenceKeyMode;
|
|
2257
2278
|
this.originalKeyString = originalKeyString;
|
|
2258
2279
|
this.explicitAccidental = explicitAccidental;
|
|
2280
|
+
this.preferredNotation = preferredNotation;
|
|
2259
2281
|
}
|
|
2260
2282
|
distanceTo(otherKey) {
|
|
2261
2283
|
const otherKeyObj = $c2d6ab25ad00308f$var$Key.wrapOrFail(otherKey);
|
|
@@ -2297,7 +2319,7 @@ const $c2d6ab25ad00308f$var$PREFERS_FLAT_NUMBERS = [
|
|
|
2297
2319
|
}
|
|
2298
2320
|
calculateGradeFromNumber() {
|
|
2299
2321
|
if (this.number === null) throw new Error('Cannot calculate grade, number is null');
|
|
2300
|
-
this.grade = $
|
|
2322
|
+
this.grade = (0, $28a2fcb6fb95a147$export$f524439d316753cc)(this.number.toString(), this.accidental || (0, $dce48cb70c4120bb$export$3fdd332fe3104970), (0, $dce48cb70c4120bb$export$4d318981b5a83836), this.isMinor());
|
|
2301
2323
|
this.number = null;
|
|
2302
2324
|
}
|
|
2303
2325
|
toChordSymbol(key, referenceKeyWasMinor = false) {
|
|
@@ -2420,13 +2442,20 @@ const $c2d6ab25ad00308f$var$PREFERS_FLAT_NUMBERS = [
|
|
|
2420
2442
|
if ((this.isChordSymbol() || this.isChordSolfege()) && this.referenceKeyGrade === null) throw new Error('Not possible, reference key grade is null');
|
|
2421
2443
|
let { minor: minor } = this;
|
|
2422
2444
|
if (this.referenceKeyMode) minor = this.referenceKeyMode === (0, $dce48cb70c4120bb$export$f23edc19d247fd25);
|
|
2423
|
-
|
|
2445
|
+
const rendered = (0, $28a2fcb6fb95a147$export$65f5b958d546bb3f)({
|
|
2424
2446
|
type: this.type,
|
|
2425
2447
|
accidental: this.accidental,
|
|
2426
2448
|
preferredAccidental: this.preferredAccidental,
|
|
2427
2449
|
grade: this.effectiveGrade,
|
|
2428
2450
|
minor: minor
|
|
2429
2451
|
});
|
|
2452
|
+
return this.applyGermanRendering(rendered);
|
|
2453
|
+
}
|
|
2454
|
+
applyGermanRendering(rendered) {
|
|
2455
|
+
if (this.preferredNotation !== (0, $dce48cb70c4120bb$export$34df5089b632c747) || !this.isChordSymbol()) return rendered;
|
|
2456
|
+
if (this.accidental === null && this.effectiveGrade === 10) return 'B';
|
|
2457
|
+
if (rendered === 'B') return 'H';
|
|
2458
|
+
return rendered;
|
|
2430
2459
|
}
|
|
2431
2460
|
getNoteForNumber() {
|
|
2432
2461
|
if (this.number === null) throw new Error('Not possible, grade and number are null');
|
|
@@ -2531,15 +2560,16 @@ const $c2d6ab25ad00308f$var$PREFERS_FLAT_NUMBERS = [
|
|
|
2531
2560
|
if (key) {
|
|
2532
2561
|
// Preserve explicit accidental choices made via useAccidental()
|
|
2533
2562
|
if (this.explicitAccidental) return this.clone();
|
|
2534
|
-
const rootKeyString = $c2d6ab25ad00308f$var$Key.wrapOrFail(key).toString({
|
|
2563
|
+
const rootKeyString = (0, $28a2fcb6fb95a147$export$4f126a839166f96d)($c2d6ab25ad00308f$var$Key.wrapOrFail(key).toString({
|
|
2535
2564
|
showMinor: true
|
|
2536
|
-
});
|
|
2565
|
+
}));
|
|
2537
2566
|
const enharmonics = (0, $c6abce5a8855cc55$export$2e2bcd8739ae039)[rootKeyString];
|
|
2538
|
-
const thisKeyString = this.toString({
|
|
2567
|
+
const thisKeyString = (0, $28a2fcb6fb95a147$export$4f126a839166f96d)(this.toString({
|
|
2539
2568
|
showMinor: false
|
|
2540
|
-
});
|
|
2569
|
+
}));
|
|
2541
2570
|
if (enharmonics && enharmonics[thisKeyString]) return $c2d6ab25ad00308f$var$Key.parseOrFail(enharmonics[thisKeyString]).set({
|
|
2542
|
-
minor: this.minor
|
|
2571
|
+
minor: this.minor,
|
|
2572
|
+
preferredNotation: this.preferredNotation
|
|
2543
2573
|
});
|
|
2544
2574
|
}
|
|
2545
2575
|
return this.clone();
|
|
@@ -2556,6 +2586,7 @@ const $c2d6ab25ad00308f$var$PREFERS_FLAT_NUMBERS = [
|
|
|
2556
2586
|
originalKeyString: this.originalKeyString,
|
|
2557
2587
|
preferredAccidental: this.preferredAccidental,
|
|
2558
2588
|
explicitAccidental: this.explicitAccidental,
|
|
2589
|
+
preferredNotation: this.preferredNotation,
|
|
2559
2590
|
...overwrite ? attributes : {}
|
|
2560
2591
|
});
|
|
2561
2592
|
}
|
|
@@ -2717,15 +2748,15 @@ function $b0c0093f9a3a0967$var$peg$parse(input, options) {
|
|
|
2717
2748
|
chordType: "symbol"
|
|
2718
2749
|
};
|
|
2719
2750
|
};
|
|
2720
|
-
const peg$c10 = /^[A-
|
|
2751
|
+
const peg$c10 = /^[A-Ha-h]/;
|
|
2721
2752
|
const peg$c11 = peg$classExpectation([
|
|
2722
2753
|
[
|
|
2723
2754
|
"A",
|
|
2724
|
-
"
|
|
2755
|
+
"H"
|
|
2725
2756
|
],
|
|
2726
2757
|
[
|
|
2727
2758
|
"a",
|
|
2728
|
-
"
|
|
2759
|
+
"h"
|
|
2729
2760
|
]
|
|
2730
2761
|
], false, false);
|
|
2731
2762
|
const peg$c12 = "/";
|
|
@@ -3863,19 +3894,26 @@ const $b0c0093f9a3a0967$export$98e6a39c04603d36 = $b0c0093f9a3a0967$var$peg$pars
|
|
|
3863
3894
|
* Tries to parse a chord string into a chord
|
|
3864
3895
|
* Any leading or trailing whitespace is removed first, so a chord like ` \n E/G# \r ` is valid.
|
|
3865
3896
|
* @param chordString the chord string, eg `Esus4/G#` or `1sus4/#3`.
|
|
3897
|
+
* @param {ChordParseOptions} [options] parse options
|
|
3898
|
+
* @param {Notation|null} [options.notation] when `'german'`, `B` is interpreted as B-flat (grade 10)
|
|
3899
|
+
* and `H` as B natural (grade 11), and output renders accordingly. Defaults to English semantics where
|
|
3900
|
+
* `B` is B natural and `H` is accepted as an alias for it.
|
|
3866
3901
|
* @returns {Chord|null}
|
|
3867
|
-
*/ static parse(chordString) {
|
|
3902
|
+
*/ static parse(chordString, options = {}) {
|
|
3868
3903
|
try {
|
|
3869
|
-
return this.parseOrFail(chordString);
|
|
3904
|
+
return this.parseOrFail(chordString, options);
|
|
3870
3905
|
} catch (_error) {
|
|
3871
3906
|
return null;
|
|
3872
3907
|
}
|
|
3873
3908
|
}
|
|
3874
|
-
static parseOrFail(chordString) {
|
|
3909
|
+
static parseOrFail(chordString, options = {}) {
|
|
3875
3910
|
const trimmedChord = chordString.trim();
|
|
3876
3911
|
try {
|
|
3877
3912
|
const ast = (0, $b0c0093f9a3a0967$export$98e6a39c04603d36)(trimmedChord);
|
|
3878
|
-
return new $177a605b8569b31c$var$Chord(
|
|
3913
|
+
return new $177a605b8569b31c$var$Chord({
|
|
3914
|
+
...ast,
|
|
3915
|
+
notation: options.notation ?? null
|
|
3916
|
+
});
|
|
3879
3917
|
} catch (error) {
|
|
3880
3918
|
const errorObj = error;
|
|
3881
3919
|
throw new (0, $b6f966368871e837$export$2e2bcd8739ae039)(`Failed parsing '${trimmedChord}': ${errorObj.message}`);
|
|
@@ -4132,7 +4170,7 @@ const $b0c0093f9a3a0967$export$98e6a39c04603d36 = $b0c0093f9a3a0967$var$peg$pars
|
|
|
4132
4170
|
return this.suffix === otherChord.suffix && this.optional === otherChord.optional && (0, $c2d6ab25ad00308f$export$2e2bcd8739ae039).equals(this.root, otherChord.root) && (0, $c2d6ab25ad00308f$export$2e2bcd8739ae039).equals(this.bass, otherChord.bass);
|
|
4133
4171
|
}
|
|
4134
4172
|
static determineRoot(options) {
|
|
4135
|
-
const { root: root, base: base, accidental: accidental, suffix: suffix, chordType: chordType } = options;
|
|
4173
|
+
const { root: root, base: base, accidental: accidental, suffix: suffix, chordType: chordType, notation: notation } = options;
|
|
4136
4174
|
if (root) return root;
|
|
4137
4175
|
if (!base) return null;
|
|
4138
4176
|
if (!chordType) throw new Error('Can\'t resolve at this point without a chord type');
|
|
@@ -4140,11 +4178,12 @@ const $b0c0093f9a3a0967$export$98e6a39c04603d36 = $b0c0093f9a3a0967$var$peg$pars
|
|
|
4140
4178
|
key: base,
|
|
4141
4179
|
keyType: chordType,
|
|
4142
4180
|
minor: (0, $28a2fcb6fb95a147$export$51fabfbeed747719)(base, chordType, suffix ?? null),
|
|
4143
|
-
accidental: accidental ?? null
|
|
4181
|
+
accidental: accidental ?? null,
|
|
4182
|
+
preferredNotation: notation ?? null
|
|
4144
4183
|
});
|
|
4145
4184
|
}
|
|
4146
4185
|
static determineBass(options) {
|
|
4147
|
-
const { bass: bass, bassBase: bassBase, bassAccidental: bassAccidental, chordType: chordType } = options;
|
|
4186
|
+
const { bass: bass, bassBase: bassBase, bassAccidental: bassAccidental, chordType: chordType, notation: notation } = options;
|
|
4148
4187
|
if (bass) return bass;
|
|
4149
4188
|
if (!bassBase) return null;
|
|
4150
4189
|
if (!chordType) throw new Error('Can\'t resolve at this point without a chord type');
|
|
@@ -4152,7 +4191,8 @@ const $b0c0093f9a3a0967$export$98e6a39c04603d36 = $b0c0093f9a3a0967$var$peg$pars
|
|
|
4152
4191
|
key: bassBase,
|
|
4153
4192
|
accidental: bassAccidental ?? null,
|
|
4154
4193
|
minor: false,
|
|
4155
|
-
keyType: chordType
|
|
4194
|
+
keyType: chordType,
|
|
4195
|
+
preferredNotation: notation ?? null
|
|
4156
4196
|
});
|
|
4157
4197
|
}
|
|
4158
4198
|
isMinor() {
|
|
@@ -7656,9 +7696,12 @@ class $e02a17f5a26edf19$var$ChordRenderer {
|
|
|
7656
7696
|
this.transposeKey = config.transposeKey;
|
|
7657
7697
|
this.useUnicodeModifier = config.useUnicodeModifier;
|
|
7658
7698
|
}
|
|
7659
|
-
render(
|
|
7660
|
-
|
|
7661
|
-
|
|
7699
|
+
render(chordOrString) {
|
|
7700
|
+
if (chordOrString instanceof (0, $177a605b8569b31c$export$2e2bcd8739ae039)) return this.renderChord(chordOrString);
|
|
7701
|
+
const chord = (0, $177a605b8569b31c$export$2e2bcd8739ae039).parse(chordOrString);
|
|
7702
|
+
return chord ? this.renderChord(chord) : chordOrString;
|
|
7703
|
+
}
|
|
7704
|
+
renderChord(chord) {
|
|
7662
7705
|
return (0, $28a2fcb6fb95a147$export$79570e60478bce41)(chord, [
|
|
7663
7706
|
(c)=>c.transpose(this.effectiveTransposeDistance),
|
|
7664
7707
|
(c)=>this.accidental ? c.useAccidental(this.accidental) : c,
|
|
@@ -8066,7 +8109,8 @@ function $2ce1086ce25c9ac0$export$fd31a53e6281557e(transposeKey, songKey) {
|
|
|
8066
8109
|
}
|
|
8067
8110
|
/**
|
|
8068
8111
|
* Renders a chord in the context of a line and song and taking into account some options
|
|
8069
|
-
* @param
|
|
8112
|
+
* @param chord The chord to render. Accepts either a {@link Chord} object (preferred \u2014 preserves
|
|
8113
|
+
* explicit accidental choices) or a chord string.
|
|
8070
8114
|
* @param line The line the chord is in
|
|
8071
8115
|
* @param song The song the line is in
|
|
8072
8116
|
* @param renderKey The key to render the chord in. If not provided, the line key will be used,
|
|
@@ -8084,7 +8128,7 @@ function $2ce1086ce25c9ac0$export$fd31a53e6281557e(transposeKey, songKey) {
|
|
|
8084
8128
|
normalizeChordSuffix: true,
|
|
8085
8129
|
decapo: false
|
|
8086
8130
|
};
|
|
8087
|
-
function $2ce1086ce25c9ac0$export$596ec52955da9472(
|
|
8131
|
+
function $2ce1086ce25c9ac0$export$596ec52955da9472(chord, line, song, options = {}) {
|
|
8088
8132
|
const { renderKey: renderKey, useUnicodeModifier: useUnicodeModifier, normalizeChords: normalizeChords, normalizeChordSuffix: normalizeChordSuffix, decapo: decapo } = {
|
|
8089
8133
|
...$2ce1086ce25c9ac0$var$renderChordDefaults,
|
|
8090
8134
|
...options
|
|
@@ -8101,7 +8145,7 @@ function $2ce1086ce25c9ac0$export$596ec52955da9472(chordString, line, song, opti
|
|
|
8101
8145
|
style: song.metadata.getSingle((0, $d21c5c7a462f3c34$export$d8cbdf44b1f66df1)),
|
|
8102
8146
|
transposeKey: line.transposeKey,
|
|
8103
8147
|
useUnicodeModifier: useUnicodeModifier
|
|
8104
|
-
}).render(
|
|
8148
|
+
}).render(chord);
|
|
8105
8149
|
}
|
|
8106
8150
|
function $2ce1086ce25c9ac0$export$b07b16221c14aaa(key) {
|
|
8107
8151
|
const keyObj = (0, $c2d6ab25ad00308f$export$2e2bcd8739ae039).wrapOrFail(key);
|
|
@@ -8774,8 +8818,13 @@ const $8b93ef43471b6ed2$var$TERNARY = 'ternary';
|
|
|
8774
8818
|
/**
|
|
8775
8819
|
* Deserializes a song that has been serialized using {@link serialize}
|
|
8776
8820
|
* @param {object} serializedSong The serialized song
|
|
8821
|
+
* @param {object} [options] Deserialization options
|
|
8822
|
+
* @param {Notation|null} [options.notation] When `'german'`, chord strings on the song are eagerly
|
|
8823
|
+
* parsed with German notation (`B` = B-flat, `H` = B natural) so the preference survives transpose
|
|
8824
|
+
* and re-serialization. Defaults to English semantics.
|
|
8777
8825
|
* @returns {Song} The deserialized song
|
|
8778
|
-
*/ deserialize(serializedSong) {
|
|
8826
|
+
*/ deserialize(serializedSong, options = {}) {
|
|
8827
|
+
this.notation = options.notation ?? null;
|
|
8779
8828
|
this.parseAstComponent(serializedSong);
|
|
8780
8829
|
return this.song;
|
|
8781
8830
|
}
|
|
@@ -8819,7 +8868,11 @@ const $8b93ef43471b6ed2$var$TERNARY = 'ternary';
|
|
|
8819
8868
|
}
|
|
8820
8869
|
parseChordLyricsPair(astComponent) {
|
|
8821
8870
|
const { chord: chord, chords: chords, lyrics: lyrics, annotation: annotation, isRhythmSymbol: isRhythmSymbol } = astComponent;
|
|
8822
|
-
|
|
8871
|
+
const chordString = chord ? new (0, $177a605b8569b31c$export$2e2bcd8739ae039)(chord).toString() : chords;
|
|
8872
|
+
const eagerChord = this.notation && chordString ? (0, $177a605b8569b31c$export$2e2bcd8739ae039).parse(chordString, {
|
|
8873
|
+
notation: this.notation
|
|
8874
|
+
}) : null;
|
|
8875
|
+
return new (0, $551a223fc13b5c10$export$2e2bcd8739ae039)(eagerChord ? eagerChord.toString() : chordString, lyrics, annotation, eagerChord, isRhythmSymbol || false);
|
|
8823
8876
|
}
|
|
8824
8877
|
parseTag(astComponent) {
|
|
8825
8878
|
const { name: name, value: value, location: { offset: offset = null, line: line = null, column: column = null } = {}, chordDefinition: chordDefinition, attributes: attributes, selector: selector, isNegated: isNegated } = astComponent;
|
|
@@ -8855,6 +8908,7 @@ const $8b93ef43471b6ed2$var$TERNARY = 'ternary';
|
|
|
8855
8908
|
constructor(){
|
|
8856
8909
|
this.song = new (0, $c53141c05fae8382$export$2e2bcd8739ae039)();
|
|
8857
8910
|
this.songBuilder = new (0, $69c885ea9d252cfd$export$2e2bcd8739ae039)(this.song);
|
|
8911
|
+
this.notation = null;
|
|
8858
8912
|
}
|
|
8859
8913
|
}
|
|
8860
8914
|
var $8b93ef43471b6ed2$export$2e2bcd8739ae039 = $8b93ef43471b6ed2$var$ChordSheetSerializer;
|
|
@@ -13362,6 +13416,9 @@ const $223a4923d98e43eb$export$98e6a39c04603d36 = $223a4923d98e43eb$var$peg$pars
|
|
|
13362
13416
|
* followed by * a space is treated as a soft line break
|
|
13363
13417
|
* @param {ChordProParserOptions.chopFirstWord} options.chopFirstWord=true If true, only the first lyric
|
|
13364
13418
|
* word is paired with the chord, the rest of the lyric is put in a separate chord lyric pair
|
|
13419
|
+
* @param {Notation|null} [options.notation] When `'german'`, every chord in the song is parsed using
|
|
13420
|
+
* German notation (`B` = B-flat, `H` = B natural) and rendered accordingly. Defaults to English
|
|
13421
|
+
* semantics where `B` is B natural and `H` is accepted as an alias for it.
|
|
13365
13422
|
* @see https://peggyjs.org/documentation.html#using-the-parser
|
|
13366
13423
|
* @returns {Song} The parsed song
|
|
13367
13424
|
*/ parse(chordSheet, options) {
|
|
@@ -13369,7 +13426,9 @@ const $223a4923d98e43eb$export$98e6a39c04603d36 = $223a4923d98e43eb$var$peg$pars
|
|
|
13369
13426
|
tracer: new (0, $95c3b35b301e70e4$export$2e2bcd8739ae039)(),
|
|
13370
13427
|
...options
|
|
13371
13428
|
});
|
|
13372
|
-
this.song = new (0, $8b93ef43471b6ed2$export$2e2bcd8739ae039)().deserialize(ast
|
|
13429
|
+
this.song = new (0, $8b93ef43471b6ed2$export$2e2bcd8739ae039)().deserialize(ast, {
|
|
13430
|
+
notation: options?.notation ?? null
|
|
13431
|
+
});
|
|
13373
13432
|
return this.song;
|
|
13374
13433
|
}
|
|
13375
13434
|
}
|
|
@@ -14028,7 +14087,7 @@ var $f9c5006b26957916$export$2e2bcd8739ae039 = {
|
|
|
14028
14087
|
return '';
|
|
14029
14088
|
}
|
|
14030
14089
|
renderChord(item, line) {
|
|
14031
|
-
return (0, $2ce1086ce25c9ac0$export$596ec52955da9472)(item.chords, line, this.song, {
|
|
14090
|
+
return (0, $2ce1086ce25c9ac0$export$596ec52955da9472)(item.chord ?? item.chords, line, this.song, {
|
|
14032
14091
|
renderKey: this.configuration.key,
|
|
14033
14092
|
normalizeChords: this.configuration.normalizeChords,
|
|
14034
14093
|
normalizeChordSuffix: this.configuration.normalizeChordSuffix,
|
|
@@ -14606,15 +14665,15 @@ function $6e190c231198785f$var$peg$parse(input, options) {
|
|
|
14606
14665
|
chordType: "symbol"
|
|
14607
14666
|
};
|
|
14608
14667
|
};
|
|
14609
|
-
const peg$c71 = /^[A-
|
|
14668
|
+
const peg$c71 = /^[A-Ha-h]/;
|
|
14610
14669
|
const peg$c72 = peg$classExpectation([
|
|
14611
14670
|
[
|
|
14612
14671
|
"A",
|
|
14613
|
-
"
|
|
14672
|
+
"H"
|
|
14614
14673
|
],
|
|
14615
14674
|
[
|
|
14616
14675
|
"a",
|
|
14617
|
-
"
|
|
14676
|
+
"h"
|
|
14618
14677
|
]
|
|
14619
14678
|
], false, false);
|
|
14620
14679
|
const peg$c73 = "/";
|
|
@@ -26573,7 +26632,7 @@ var $1408adfd7317f0b6$export$2e2bcd8739ae039 = ({ configuration: configuration,
|
|
|
26573
26632
|
const cls = (0, $f9c5006b26957916$export$986cf1257ba88b40)(item) ? c.rhythmSymbol : c.chord;
|
|
26574
26633
|
return `
|
|
26575
26634
|
<div class="${cls}"${(0, $f9c5006b26957916$export$ca030c9435779e4b)(line.chordFont)}>
|
|
26576
|
-
${(0, $2ce1086ce25c9ac0$export$596ec52955da9472)(item.chords, line, song, {
|
|
26635
|
+
${(0, $2ce1086ce25c9ac0$export$596ec52955da9472)(item.chord ?? item.chords, line, song, {
|
|
26577
26636
|
renderKey: key,
|
|
26578
26637
|
useUnicodeModifier: configuration.useUnicodeModifiers,
|
|
26579
26638
|
normalizeChords: configuration.normalizeChords,
|
|
@@ -26773,7 +26832,7 @@ var $396f7048979e89c9$export$2e2bcd8739ae039 = ({ configuration: configuration,
|
|
|
26773
26832
|
`).else(()=>{
|
|
26774
26833
|
const cls = (0, $f9c5006b26957916$export$986cf1257ba88b40)(item) ? c.rhythmSymbol : c.chord;
|
|
26775
26834
|
return `
|
|
26776
|
-
<td class="${cls}"${(0, $f9c5006b26957916$export$ca030c9435779e4b)(line.chordFont)}>${(0, $2ce1086ce25c9ac0$export$596ec52955da9472)(item.chords, line, song, {
|
|
26835
|
+
<td class="${cls}"${(0, $f9c5006b26957916$export$ca030c9435779e4b)(line.chordFont)}>${(0, $2ce1086ce25c9ac0$export$596ec52955da9472)(item.chord ?? item.chords, line, song, {
|
|
26777
26836
|
renderKey: key,
|
|
26778
26837
|
useUnicodeModifier: configuration.useUnicodeModifiers,
|
|
26779
26838
|
normalizeChords: configuration.normalizeChords,
|
|
@@ -27702,7 +27761,7 @@ var $bdd8c6196670168a$export$2e2bcd8739ae039 = $bdd8c6196670168a$var$Condition;
|
|
|
27702
27761
|
return Math.max(contentLength, lyricsLength);
|
|
27703
27762
|
}
|
|
27704
27763
|
renderChords(chordLyricsPair, line) {
|
|
27705
|
-
const chords = (0, $2ce1086ce25c9ac0$export$596ec52955da9472)(chordLyricsPair.chords, line, this.song, {
|
|
27764
|
+
const chords = (0, $2ce1086ce25c9ac0$export$596ec52955da9472)(chordLyricsPair.chord ?? chordLyricsPair.chords, line, this.song, {
|
|
27706
27765
|
renderKey: this.configuration.key,
|
|
27707
27766
|
useUnicodeModifier: this.configuration.useUnicodeModifiers,
|
|
27708
27767
|
normalizeChords: this.configuration.normalizeChords,
|
|
@@ -30178,7 +30237,7 @@ const $a5a21ced491ea51f$var$endSectionTags = {
|
|
|
30178
30237
|
var $a5a21ced491ea51f$export$2e2bcd8739ae039 = $a5a21ced491ea51f$var$UltimateGuitarParser;
|
|
30179
30238
|
|
|
30180
30239
|
|
|
30181
|
-
var $ae92e002ce14f11a$export$2e2bcd8739ae039 = '15.
|
|
30240
|
+
var $ae92e002ce14f11a$export$2e2bcd8739ae039 = '15.5.1';
|
|
30182
30241
|
|
|
30183
30242
|
|
|
30184
30243
|
|