chordsheetjs 15.4.0 → 15.5.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/lib/bundle.js +686 -626
- package/lib/bundle.min.js +69 -69
- package/lib/index.js +687 -632
- package/lib/index.js.map +1 -1
- package/lib/main.d.ts +30 -9
- package/lib/main.d.ts.map +1 -1
- package/lib/module.js +687 -632
- package/lib/module.js.map +1 -1
- package/lib/pdf/index.js +598 -543
- 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 +598 -543
- package/lib/pdf/module.js.map +1 -1
- package/package.json +2 -2
package/lib/module.js
CHANGED
|
@@ -332,588 +332,97 @@ const $72b24102c7d826fd$export$ba1aa2356c5f40b7 = 0;
|
|
|
332
332
|
const $72b24102c7d826fd$export$dfea9b8ecbbb8623 = 'start_tag';
|
|
333
333
|
const $72b24102c7d826fd$export$3d329a2c209fbc28 = 'end_tag';
|
|
334
334
|
const $72b24102c7d826fd$export$97c0a36af1d48540 = 'auto';
|
|
335
|
+
const $72b24102c7d826fd$export$34df5089b632c747 = 'german';
|
|
335
336
|
|
|
336
337
|
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
},
|
|
424
|
-
[(0, $72b24102c7d826fd$export$1ea14522906630af)]: {
|
|
425
|
-
Re: 1,
|
|
426
|
-
Mi: 3,
|
|
427
|
-
Fa: 4,
|
|
428
|
-
Sol: 6,
|
|
429
|
-
La: 8,
|
|
430
|
-
Si: 10,
|
|
431
|
-
Do: 11
|
|
432
|
-
}
|
|
433
|
-
},
|
|
434
|
-
[(0, $72b24102c7d826fd$export$f23edc19d247fd25)]: {
|
|
435
|
-
[(0, $72b24102c7d826fd$export$f0f7b592ea674eb2)]: {
|
|
436
|
-
Do: 0,
|
|
437
|
-
Re: 2,
|
|
438
|
-
Mi: 4,
|
|
439
|
-
Fa: 5,
|
|
440
|
-
Sol: 7,
|
|
441
|
-
La: 9,
|
|
442
|
-
Si: 11
|
|
443
|
-
},
|
|
444
|
-
[(0, $72b24102c7d826fd$export$f5b1d6b4244c9536)]: {
|
|
445
|
-
Si: 0,
|
|
446
|
-
Do: 1,
|
|
447
|
-
Re: 3,
|
|
448
|
-
Mi: 5,
|
|
449
|
-
Fa: 6,
|
|
450
|
-
Sol: 8,
|
|
451
|
-
La: 10
|
|
452
|
-
},
|
|
453
|
-
[(0, $72b24102c7d826fd$export$1ea14522906630af)]: {
|
|
454
|
-
Re: 1,
|
|
455
|
-
Mi: 3,
|
|
456
|
-
Fa: 4,
|
|
457
|
-
Sol: 6,
|
|
458
|
-
La: 8,
|
|
459
|
-
Si: 10,
|
|
460
|
-
Do: 11
|
|
461
|
-
}
|
|
462
|
-
}
|
|
463
|
-
},
|
|
464
|
-
[(0, $72b24102c7d826fd$export$4d318981b5a83836)]: {
|
|
465
|
-
[(0, $72b24102c7d826fd$export$39615881bb0d21f6)]: {
|
|
466
|
-
[(0, $72b24102c7d826fd$export$f0f7b592ea674eb2)]: {
|
|
467
|
-
1: 0,
|
|
468
|
-
2: 2,
|
|
469
|
-
3: 4,
|
|
470
|
-
4: 5,
|
|
471
|
-
5: 7,
|
|
472
|
-
6: 9,
|
|
473
|
-
7: 11
|
|
474
|
-
},
|
|
475
|
-
[(0, $72b24102c7d826fd$export$f5b1d6b4244c9536)]: {
|
|
476
|
-
7: 0,
|
|
477
|
-
1: 1,
|
|
478
|
-
2: 3,
|
|
479
|
-
3: 5,
|
|
480
|
-
4: 6,
|
|
481
|
-
5: 8,
|
|
482
|
-
6: 10
|
|
483
|
-
},
|
|
484
|
-
[(0, $72b24102c7d826fd$export$1ea14522906630af)]: {
|
|
485
|
-
2: 1,
|
|
486
|
-
3: 3,
|
|
487
|
-
4: 4,
|
|
488
|
-
5: 6,
|
|
489
|
-
6: 8,
|
|
490
|
-
7: 10,
|
|
491
|
-
1: 11
|
|
492
|
-
}
|
|
493
|
-
},
|
|
494
|
-
[(0, $72b24102c7d826fd$export$f23edc19d247fd25)]: {
|
|
495
|
-
[(0, $72b24102c7d826fd$export$f0f7b592ea674eb2)]: {
|
|
496
|
-
1: 0,
|
|
497
|
-
2: 2,
|
|
498
|
-
3: 3,
|
|
499
|
-
4: 5,
|
|
500
|
-
5: 7,
|
|
501
|
-
6: 8,
|
|
502
|
-
7: 10
|
|
503
|
-
},
|
|
504
|
-
[(0, $72b24102c7d826fd$export$f5b1d6b4244c9536)]: {
|
|
505
|
-
1: 1,
|
|
506
|
-
2: 3,
|
|
507
|
-
3: 4,
|
|
508
|
-
4: 6,
|
|
509
|
-
5: 8,
|
|
510
|
-
6: 9,
|
|
511
|
-
7: 11
|
|
512
|
-
},
|
|
513
|
-
[(0, $72b24102c7d826fd$export$1ea14522906630af)]: {
|
|
514
|
-
2: 1,
|
|
515
|
-
3: 2,
|
|
516
|
-
4: 4,
|
|
517
|
-
5: 6,
|
|
518
|
-
6: 7,
|
|
519
|
-
7: 9,
|
|
520
|
-
1: 11
|
|
521
|
-
}
|
|
522
|
-
}
|
|
523
|
-
},
|
|
524
|
-
[(0, $72b24102c7d826fd$export$1321df9b16c30c6a)]: {
|
|
525
|
-
[(0, $72b24102c7d826fd$export$39615881bb0d21f6)]: {
|
|
526
|
-
[(0, $72b24102c7d826fd$export$f0f7b592ea674eb2)]: {
|
|
527
|
-
I: 0,
|
|
528
|
-
II: 2,
|
|
529
|
-
III: 4,
|
|
530
|
-
IV: 5,
|
|
531
|
-
V: 7,
|
|
532
|
-
VI: 9,
|
|
533
|
-
VII: 11
|
|
534
|
-
},
|
|
535
|
-
[(0, $72b24102c7d826fd$export$f5b1d6b4244c9536)]: {
|
|
536
|
-
VII: 0,
|
|
537
|
-
I: 1,
|
|
538
|
-
II: 3,
|
|
539
|
-
III: 5,
|
|
540
|
-
IV: 6,
|
|
541
|
-
V: 8,
|
|
542
|
-
VI: 10
|
|
543
|
-
},
|
|
544
|
-
[(0, $72b24102c7d826fd$export$1ea14522906630af)]: {
|
|
545
|
-
II: 1,
|
|
546
|
-
III: 3,
|
|
547
|
-
IV: 4,
|
|
548
|
-
V: 6,
|
|
549
|
-
VI: 8,
|
|
550
|
-
VII: 10,
|
|
551
|
-
I: 11
|
|
552
|
-
}
|
|
553
|
-
},
|
|
554
|
-
[(0, $72b24102c7d826fd$export$f23edc19d247fd25)]: {
|
|
555
|
-
[(0, $72b24102c7d826fd$export$f0f7b592ea674eb2)]: {
|
|
556
|
-
I: 0,
|
|
557
|
-
II: 2,
|
|
558
|
-
III: 3,
|
|
559
|
-
IV: 5,
|
|
560
|
-
V: 7,
|
|
561
|
-
VI: 8,
|
|
562
|
-
VII: 10
|
|
563
|
-
},
|
|
564
|
-
[(0, $72b24102c7d826fd$export$f5b1d6b4244c9536)]: {
|
|
565
|
-
I: 1,
|
|
566
|
-
II: 3,
|
|
567
|
-
III: 4,
|
|
568
|
-
IV: 6,
|
|
569
|
-
V: 8,
|
|
570
|
-
VI: 9,
|
|
571
|
-
VII: 11
|
|
572
|
-
},
|
|
573
|
-
[(0, $72b24102c7d826fd$export$1ea14522906630af)]: {
|
|
574
|
-
II: 1,
|
|
575
|
-
III: 2,
|
|
576
|
-
IV: 4,
|
|
577
|
-
V: 6,
|
|
578
|
-
VI: 7,
|
|
579
|
-
VII: 9,
|
|
580
|
-
I: 11
|
|
581
|
-
}
|
|
338
|
+
|
|
339
|
+
|
|
340
|
+
/**
|
|
341
|
+
* Represents a chord with the corresponding (partial) lyrics
|
|
342
|
+
*/ class $0d04ced54ebef610$var$ChordLyricsPair {
|
|
343
|
+
/**
|
|
344
|
+
* Initialises a ChordLyricsPair
|
|
345
|
+
* @param {string} chords The chords
|
|
346
|
+
* @param {string | null} lyrics The lyrics
|
|
347
|
+
* @param {string | null} annotation The annotation
|
|
348
|
+
* @param {Chord | null} chordObj Optional pre-parsed Chord object
|
|
349
|
+
* @param {boolean} isRhythmSymbol Whether this pair represents a rhythm symbol
|
|
350
|
+
*/ constructor(chords = '', lyrics = null, annotation = null, chordObj = null, isRhythmSymbol = false){
|
|
351
|
+
this.parentLine = null;
|
|
352
|
+
this._chordObj = null;
|
|
353
|
+
this.chords = chords || '';
|
|
354
|
+
this.lyrics = lyrics || '';
|
|
355
|
+
this.annotation = annotation || '';
|
|
356
|
+
this._chordObj = chordObj;
|
|
357
|
+
this.isRhythmSymbol = isRhythmSymbol;
|
|
358
|
+
}
|
|
359
|
+
/** Returns the Chord object if available, otherwise parses from string */ get chord() {
|
|
360
|
+
return this._chordObj || (0, $f0449e2486cb2372$export$2e2bcd8739ae039).parse(this.chords.trim());
|
|
361
|
+
}
|
|
362
|
+
/**
|
|
363
|
+
* Indicates whether a ChordLyricsPair should be visible in a formatted chord sheet (except for ChordPro sheets)
|
|
364
|
+
* @returns {boolean}
|
|
365
|
+
*/ isRenderable() {
|
|
366
|
+
return true;
|
|
367
|
+
}
|
|
368
|
+
/**
|
|
369
|
+
* Indicates whether the ChordLyricsPair has non-empty lyrics.
|
|
370
|
+
*/ hasLyrics() {
|
|
371
|
+
return !!(this.lyrics && this.lyrics.trim().length > 0);
|
|
372
|
+
}
|
|
373
|
+
/**
|
|
374
|
+
* Returns a deep copy of the ChordLyricsPair, useful when programmatically transforming a song
|
|
375
|
+
* @returns {ChordLyricsPair}
|
|
376
|
+
*/ clone() {
|
|
377
|
+
const chordObj = this._chordObj?.clone() || null;
|
|
378
|
+
return new $0d04ced54ebef610$var$ChordLyricsPair(this.chords, this.lyrics, this.annotation, chordObj, this.isRhythmSymbol);
|
|
379
|
+
}
|
|
380
|
+
toString() {
|
|
381
|
+
return `ChordLyricsPair(chords=${this.chords}, lyrics=${this.lyrics})`;
|
|
382
|
+
}
|
|
383
|
+
set({ chords: chords, lyrics: lyrics, annotation: annotation, chordObj: chordObj, isRhythmSymbol: isRhythmSymbol }) {
|
|
384
|
+
return new $0d04ced54ebef610$var$ChordLyricsPair(chords ?? this.chords, lyrics ?? this.lyrics, annotation ?? this.annotation, chordObj ?? null, isRhythmSymbol ?? this.isRhythmSymbol);
|
|
385
|
+
}
|
|
386
|
+
setLyrics(lyrics) {
|
|
387
|
+
return this.set({
|
|
388
|
+
lyrics: lyrics
|
|
389
|
+
});
|
|
390
|
+
}
|
|
391
|
+
setAnnotation(annotation) {
|
|
392
|
+
return this.set({
|
|
393
|
+
annotation: annotation
|
|
394
|
+
});
|
|
395
|
+
}
|
|
396
|
+
transpose(delta, key = null, { normalizeChordSuffix: normalizeChordSuffix } = {
|
|
397
|
+
normalizeChordSuffix: false
|
|
398
|
+
}) {
|
|
399
|
+
return this.changeChord((chord)=>{
|
|
400
|
+
const transposedChord = chord.transpose(delta);
|
|
401
|
+
if (key) return transposedChord.normalize(key, {
|
|
402
|
+
normalizeSuffix: normalizeChordSuffix
|
|
403
|
+
});
|
|
404
|
+
return transposedChord;
|
|
405
|
+
});
|
|
406
|
+
}
|
|
407
|
+
useAccidental(accidental) {
|
|
408
|
+
return this.changeChord((chord)=>chord.useAccidental(accidental));
|
|
409
|
+
}
|
|
410
|
+
/**
|
|
411
|
+
* @deprecated Use useAccidental instead
|
|
412
|
+
*/ useModifier(accidental) {
|
|
413
|
+
(0, $f52913d8767c6236$export$b680e6b2c82f8c2f)('useModifier is deprecated, use useAccidental instead');
|
|
414
|
+
return this.useAccidental(accidental);
|
|
415
|
+
}
|
|
416
|
+
changeChord(func) {
|
|
417
|
+
const chordObj = this.chord;
|
|
418
|
+
if (chordObj) {
|
|
419
|
+
const changedChord = func(chordObj);
|
|
420
|
+
return this.set({
|
|
421
|
+
chords: changedChord.toString(),
|
|
422
|
+
chordObj: changedChord
|
|
423
|
+
});
|
|
582
424
|
}
|
|
583
|
-
|
|
584
|
-
};
|
|
585
|
-
const $0cb401ed3f1d0550$export$40141681ebb03523 = {
|
|
586
|
-
[(0, $72b24102c7d826fd$export$27c95a7104c1f7aa)]: {
|
|
587
|
-
[(0, $72b24102c7d826fd$export$39615881bb0d21f6)]: {
|
|
588
|
-
[(0, $72b24102c7d826fd$export$f0f7b592ea674eb2)]: {
|
|
589
|
-
0: 'C',
|
|
590
|
-
2: 'D',
|
|
591
|
-
4: 'E',
|
|
592
|
-
5: 'F',
|
|
593
|
-
7: 'G',
|
|
594
|
-
9: 'A',
|
|
595
|
-
11: 'B'
|
|
596
|
-
},
|
|
597
|
-
[(0, $72b24102c7d826fd$export$f5b1d6b4244c9536)]: {
|
|
598
|
-
0: 'B#',
|
|
599
|
-
1: 'C#',
|
|
600
|
-
3: 'D#',
|
|
601
|
-
5: 'E#',
|
|
602
|
-
6: 'F#',
|
|
603
|
-
8: 'G#',
|
|
604
|
-
10: 'A#'
|
|
605
|
-
},
|
|
606
|
-
[(0, $72b24102c7d826fd$export$1ea14522906630af)]: {
|
|
607
|
-
1: 'Db',
|
|
608
|
-
3: 'Eb',
|
|
609
|
-
4: 'Fb',
|
|
610
|
-
6: 'Gb',
|
|
611
|
-
8: 'Ab',
|
|
612
|
-
10: 'Bb',
|
|
613
|
-
11: 'Cb'
|
|
614
|
-
}
|
|
615
|
-
},
|
|
616
|
-
[(0, $72b24102c7d826fd$export$f23edc19d247fd25)]: {
|
|
617
|
-
[(0, $72b24102c7d826fd$export$f0f7b592ea674eb2)]: {
|
|
618
|
-
0: 'C',
|
|
619
|
-
2: 'D',
|
|
620
|
-
4: 'E',
|
|
621
|
-
5: 'F',
|
|
622
|
-
7: 'G',
|
|
623
|
-
9: 'A',
|
|
624
|
-
11: 'B'
|
|
625
|
-
},
|
|
626
|
-
[(0, $72b24102c7d826fd$export$f5b1d6b4244c9536)]: {
|
|
627
|
-
0: 'B#',
|
|
628
|
-
1: 'C#',
|
|
629
|
-
3: 'D#',
|
|
630
|
-
5: 'E#',
|
|
631
|
-
6: 'F#',
|
|
632
|
-
8: 'G#',
|
|
633
|
-
10: 'A#'
|
|
634
|
-
},
|
|
635
|
-
[(0, $72b24102c7d826fd$export$1ea14522906630af)]: {
|
|
636
|
-
1: 'Db',
|
|
637
|
-
3: 'Eb',
|
|
638
|
-
4: 'Fb',
|
|
639
|
-
6: 'Gb',
|
|
640
|
-
8: 'Ab',
|
|
641
|
-
10: 'Bb',
|
|
642
|
-
11: 'Cb'
|
|
643
|
-
}
|
|
644
|
-
}
|
|
645
|
-
},
|
|
646
|
-
[(0, $72b24102c7d826fd$export$539a6499f4711c57)]: {
|
|
647
|
-
[(0, $72b24102c7d826fd$export$39615881bb0d21f6)]: {
|
|
648
|
-
[(0, $72b24102c7d826fd$export$f0f7b592ea674eb2)]: {
|
|
649
|
-
0: 'Do',
|
|
650
|
-
2: 'Re',
|
|
651
|
-
4: 'Mi',
|
|
652
|
-
5: 'Fa',
|
|
653
|
-
7: 'Sol',
|
|
654
|
-
9: 'La',
|
|
655
|
-
11: 'Si'
|
|
656
|
-
},
|
|
657
|
-
[(0, $72b24102c7d826fd$export$f5b1d6b4244c9536)]: {
|
|
658
|
-
0: 'Si#',
|
|
659
|
-
1: 'Do#',
|
|
660
|
-
3: 'Re#',
|
|
661
|
-
5: 'Mi#',
|
|
662
|
-
6: 'Fa#',
|
|
663
|
-
8: 'Sol#',
|
|
664
|
-
10: 'La#'
|
|
665
|
-
},
|
|
666
|
-
[(0, $72b24102c7d826fd$export$1ea14522906630af)]: {
|
|
667
|
-
1: 'Reb',
|
|
668
|
-
3: 'Mib',
|
|
669
|
-
4: 'Fab',
|
|
670
|
-
6: 'Solb',
|
|
671
|
-
8: 'Lab',
|
|
672
|
-
10: 'Sib',
|
|
673
|
-
11: 'Dob'
|
|
674
|
-
}
|
|
675
|
-
},
|
|
676
|
-
[(0, $72b24102c7d826fd$export$f23edc19d247fd25)]: {
|
|
677
|
-
[(0, $72b24102c7d826fd$export$f0f7b592ea674eb2)]: {
|
|
678
|
-
0: 'Do',
|
|
679
|
-
2: 'Re',
|
|
680
|
-
4: 'Mi',
|
|
681
|
-
5: 'Fa',
|
|
682
|
-
7: 'Sol',
|
|
683
|
-
9: 'La',
|
|
684
|
-
11: 'Si'
|
|
685
|
-
},
|
|
686
|
-
[(0, $72b24102c7d826fd$export$f5b1d6b4244c9536)]: {
|
|
687
|
-
0: 'Si#',
|
|
688
|
-
1: 'Do#',
|
|
689
|
-
3: 'Re#',
|
|
690
|
-
5: 'Mi#',
|
|
691
|
-
6: 'Fa#',
|
|
692
|
-
8: 'Sol#',
|
|
693
|
-
10: 'La#'
|
|
694
|
-
},
|
|
695
|
-
[(0, $72b24102c7d826fd$export$1ea14522906630af)]: {
|
|
696
|
-
1: 'Reb',
|
|
697
|
-
3: 'Mib',
|
|
698
|
-
4: 'Fab',
|
|
699
|
-
6: 'Solb',
|
|
700
|
-
8: 'Lab',
|
|
701
|
-
10: 'Sib',
|
|
702
|
-
11: 'Dob'
|
|
703
|
-
}
|
|
704
|
-
}
|
|
705
|
-
},
|
|
706
|
-
[(0, $72b24102c7d826fd$export$4d318981b5a83836)]: {
|
|
707
|
-
[(0, $72b24102c7d826fd$export$39615881bb0d21f6)]: {
|
|
708
|
-
[(0, $72b24102c7d826fd$export$f0f7b592ea674eb2)]: {
|
|
709
|
-
0: '1',
|
|
710
|
-
2: '2',
|
|
711
|
-
4: '3',
|
|
712
|
-
5: '4',
|
|
713
|
-
7: '5',
|
|
714
|
-
9: '6',
|
|
715
|
-
11: '7'
|
|
716
|
-
},
|
|
717
|
-
[(0, $72b24102c7d826fd$export$f5b1d6b4244c9536)]: {
|
|
718
|
-
0: '#7',
|
|
719
|
-
1: '#1',
|
|
720
|
-
3: '#2',
|
|
721
|
-
5: '#3',
|
|
722
|
-
6: '#4',
|
|
723
|
-
8: '#5',
|
|
724
|
-
10: '#6'
|
|
725
|
-
},
|
|
726
|
-
[(0, $72b24102c7d826fd$export$1ea14522906630af)]: {
|
|
727
|
-
1: 'b2',
|
|
728
|
-
3: 'b3',
|
|
729
|
-
4: 'b4',
|
|
730
|
-
6: 'b5',
|
|
731
|
-
8: 'b6',
|
|
732
|
-
10: 'b7',
|
|
733
|
-
11: 'b1'
|
|
734
|
-
}
|
|
735
|
-
},
|
|
736
|
-
[(0, $72b24102c7d826fd$export$f23edc19d247fd25)]: {
|
|
737
|
-
[(0, $72b24102c7d826fd$export$f0f7b592ea674eb2)]: {
|
|
738
|
-
0: '1',
|
|
739
|
-
2: '2',
|
|
740
|
-
3: '3',
|
|
741
|
-
5: '4',
|
|
742
|
-
7: '5',
|
|
743
|
-
8: '6',
|
|
744
|
-
10: '7'
|
|
745
|
-
},
|
|
746
|
-
[(0, $72b24102c7d826fd$export$f5b1d6b4244c9536)]: {
|
|
747
|
-
1: '#1',
|
|
748
|
-
3: '#2',
|
|
749
|
-
4: '#3',
|
|
750
|
-
6: '#4',
|
|
751
|
-
8: '#5',
|
|
752
|
-
9: '#6',
|
|
753
|
-
11: '#7'
|
|
754
|
-
},
|
|
755
|
-
[(0, $72b24102c7d826fd$export$1ea14522906630af)]: {
|
|
756
|
-
1: 'b2',
|
|
757
|
-
2: 'b3',
|
|
758
|
-
4: 'b4',
|
|
759
|
-
6: 'b5',
|
|
760
|
-
7: 'b6',
|
|
761
|
-
9: 'b7',
|
|
762
|
-
11: 'b1'
|
|
763
|
-
}
|
|
764
|
-
}
|
|
765
|
-
},
|
|
766
|
-
[(0, $72b24102c7d826fd$export$1321df9b16c30c6a)]: {
|
|
767
|
-
[(0, $72b24102c7d826fd$export$39615881bb0d21f6)]: {
|
|
768
|
-
[(0, $72b24102c7d826fd$export$f0f7b592ea674eb2)]: {
|
|
769
|
-
0: 'I',
|
|
770
|
-
2: 'II',
|
|
771
|
-
4: 'III',
|
|
772
|
-
5: 'IV',
|
|
773
|
-
7: 'V',
|
|
774
|
-
9: 'VI',
|
|
775
|
-
11: 'VII'
|
|
776
|
-
},
|
|
777
|
-
[(0, $72b24102c7d826fd$export$f5b1d6b4244c9536)]: {
|
|
778
|
-
0: '#VII',
|
|
779
|
-
1: '#I',
|
|
780
|
-
3: '#II',
|
|
781
|
-
5: '#III',
|
|
782
|
-
6: '#IV',
|
|
783
|
-
8: '#V',
|
|
784
|
-
10: '#VI'
|
|
785
|
-
},
|
|
786
|
-
[(0, $72b24102c7d826fd$export$1ea14522906630af)]: {
|
|
787
|
-
1: 'bII',
|
|
788
|
-
3: 'bIII',
|
|
789
|
-
4: 'bIV',
|
|
790
|
-
6: 'bV',
|
|
791
|
-
8: 'bVI',
|
|
792
|
-
10: 'bVII',
|
|
793
|
-
11: 'bI'
|
|
794
|
-
}
|
|
795
|
-
},
|
|
796
|
-
[(0, $72b24102c7d826fd$export$f23edc19d247fd25)]: {
|
|
797
|
-
[(0, $72b24102c7d826fd$export$f0f7b592ea674eb2)]: {
|
|
798
|
-
0: 'I',
|
|
799
|
-
2: 'II',
|
|
800
|
-
3: 'III',
|
|
801
|
-
5: 'IV',
|
|
802
|
-
7: 'V',
|
|
803
|
-
8: 'VI',
|
|
804
|
-
10: 'VII'
|
|
805
|
-
},
|
|
806
|
-
[(0, $72b24102c7d826fd$export$f5b1d6b4244c9536)]: {
|
|
807
|
-
1: '#I',
|
|
808
|
-
3: '#II',
|
|
809
|
-
4: '#III',
|
|
810
|
-
6: '#IV',
|
|
811
|
-
8: '#V',
|
|
812
|
-
9: '#VI',
|
|
813
|
-
11: '#VII'
|
|
814
|
-
},
|
|
815
|
-
[(0, $72b24102c7d826fd$export$1ea14522906630af)]: {
|
|
816
|
-
1: 'bII',
|
|
817
|
-
2: 'bIII',
|
|
818
|
-
4: 'bIV',
|
|
819
|
-
6: 'bV',
|
|
820
|
-
7: 'bVI',
|
|
821
|
-
9: 'bVII',
|
|
822
|
-
11: 'bI'
|
|
823
|
-
}
|
|
824
|
-
}
|
|
825
|
-
}
|
|
826
|
-
};
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
/**
|
|
832
|
-
* Represents a chord with the corresponding (partial) lyrics
|
|
833
|
-
*/ class $0d04ced54ebef610$var$ChordLyricsPair {
|
|
834
|
-
/**
|
|
835
|
-
* Initialises a ChordLyricsPair
|
|
836
|
-
* @param {string} chords The chords
|
|
837
|
-
* @param {string | null} lyrics The lyrics
|
|
838
|
-
* @param {string | null} annotation The annotation
|
|
839
|
-
* @param {Chord | null} chordObj Optional pre-parsed Chord object
|
|
840
|
-
* @param {boolean} isRhythmSymbol Whether this pair represents a rhythm symbol
|
|
841
|
-
*/ constructor(chords = '', lyrics = null, annotation = null, chordObj = null, isRhythmSymbol = false){
|
|
842
|
-
this.parentLine = null;
|
|
843
|
-
this._chordObj = null;
|
|
844
|
-
this.chords = chords || '';
|
|
845
|
-
this.lyrics = lyrics || '';
|
|
846
|
-
this.annotation = annotation || '';
|
|
847
|
-
this._chordObj = chordObj;
|
|
848
|
-
this.isRhythmSymbol = isRhythmSymbol;
|
|
849
|
-
}
|
|
850
|
-
/** Returns the Chord object if available, otherwise parses from string */ get chord() {
|
|
851
|
-
return this._chordObj || (0, $f0449e2486cb2372$export$2e2bcd8739ae039).parse(this.chords.trim());
|
|
852
|
-
}
|
|
853
|
-
/**
|
|
854
|
-
* Indicates whether a ChordLyricsPair should be visible in a formatted chord sheet (except for ChordPro sheets)
|
|
855
|
-
* @returns {boolean}
|
|
856
|
-
*/ isRenderable() {
|
|
857
|
-
return true;
|
|
858
|
-
}
|
|
859
|
-
/**
|
|
860
|
-
* Indicates whether the ChordLyricsPair has non-empty lyrics.
|
|
861
|
-
*/ hasLyrics() {
|
|
862
|
-
return !!(this.lyrics && this.lyrics.trim().length > 0);
|
|
863
|
-
}
|
|
864
|
-
/**
|
|
865
|
-
* Returns a deep copy of the ChordLyricsPair, useful when programmatically transforming a song
|
|
866
|
-
* @returns {ChordLyricsPair}
|
|
867
|
-
*/ clone() {
|
|
868
|
-
const chordObj = this._chordObj?.clone() || null;
|
|
869
|
-
return new $0d04ced54ebef610$var$ChordLyricsPair(this.chords, this.lyrics, this.annotation, chordObj, this.isRhythmSymbol);
|
|
870
|
-
}
|
|
871
|
-
toString() {
|
|
872
|
-
return `ChordLyricsPair(chords=${this.chords}, lyrics=${this.lyrics})`;
|
|
873
|
-
}
|
|
874
|
-
set({ chords: chords, lyrics: lyrics, annotation: annotation, chordObj: chordObj, isRhythmSymbol: isRhythmSymbol }) {
|
|
875
|
-
return new $0d04ced54ebef610$var$ChordLyricsPair(chords ?? this.chords, lyrics ?? this.lyrics, annotation ?? this.annotation, chordObj ?? null, isRhythmSymbol ?? this.isRhythmSymbol);
|
|
876
|
-
}
|
|
877
|
-
setLyrics(lyrics) {
|
|
878
|
-
return this.set({
|
|
879
|
-
lyrics: lyrics
|
|
880
|
-
});
|
|
881
|
-
}
|
|
882
|
-
setAnnotation(annotation) {
|
|
883
|
-
return this.set({
|
|
884
|
-
annotation: annotation
|
|
885
|
-
});
|
|
886
|
-
}
|
|
887
|
-
transpose(delta, key = null, { normalizeChordSuffix: normalizeChordSuffix } = {
|
|
888
|
-
normalizeChordSuffix: false
|
|
889
|
-
}) {
|
|
890
|
-
return this.changeChord((chord)=>{
|
|
891
|
-
const transposedChord = chord.transpose(delta);
|
|
892
|
-
if (key) return transposedChord.normalize(key, {
|
|
893
|
-
normalizeSuffix: normalizeChordSuffix
|
|
894
|
-
});
|
|
895
|
-
return transposedChord;
|
|
896
|
-
});
|
|
897
|
-
}
|
|
898
|
-
useAccidental(accidental) {
|
|
899
|
-
return this.changeChord((chord)=>chord.useAccidental(accidental));
|
|
900
|
-
}
|
|
901
|
-
/**
|
|
902
|
-
* @deprecated Use useAccidental instead
|
|
903
|
-
*/ useModifier(accidental) {
|
|
904
|
-
(0, $f52913d8767c6236$export$b680e6b2c82f8c2f)('useModifier is deprecated, use useAccidental instead');
|
|
905
|
-
return this.useAccidental(accidental);
|
|
906
|
-
}
|
|
907
|
-
changeChord(func) {
|
|
908
|
-
const chordObj = this.chord;
|
|
909
|
-
if (chordObj) {
|
|
910
|
-
const changedChord = func(chordObj);
|
|
911
|
-
return this.set({
|
|
912
|
-
chords: changedChord.toString(),
|
|
913
|
-
chordObj: changedChord
|
|
914
|
-
});
|
|
915
|
-
}
|
|
916
|
-
return this.clone();
|
|
425
|
+
return this.clone();
|
|
917
426
|
}
|
|
918
427
|
}
|
|
919
428
|
var $0d04ced54ebef610$export$2e2bcd8739ae039 = $0d04ced54ebef610$var$ChordLyricsPair;
|
|
@@ -1823,14 +1332,532 @@ const $d643910899695a08$var$mapping = {
|
|
|
1823
1332
|
"sus#42": "sus#42",
|
|
1824
1333
|
"": ""
|
|
1825
1334
|
};
|
|
1826
|
-
var $d643910899695a08$export$2e2bcd8739ae039 = $d643910899695a08$var$mapping;
|
|
1827
|
-
|
|
1335
|
+
var $d643910899695a08$export$2e2bcd8739ae039 = $d643910899695a08$var$mapping;
|
|
1336
|
+
|
|
1337
|
+
|
|
1338
|
+
/*
|
|
1339
|
+
⚠️⚠️⚠️ NOTE: this file has been generated automatically.
|
|
1340
|
+
Please do NOT edit this file directly, but instead:
|
|
1341
|
+
- edit the data source, located in `data/scales.ts`
|
|
1342
|
+
- run `yarn build:code-generate` to re-generate this file.
|
|
1343
|
+
*/
|
|
1344
|
+
const $0cb401ed3f1d0550$export$7e1516eaf3ebe01f = {
|
|
1345
|
+
[(0, $72b24102c7d826fd$export$27c95a7104c1f7aa)]: {
|
|
1346
|
+
[(0, $72b24102c7d826fd$export$39615881bb0d21f6)]: {
|
|
1347
|
+
[(0, $72b24102c7d826fd$export$f0f7b592ea674eb2)]: {
|
|
1348
|
+
C: 0,
|
|
1349
|
+
D: 2,
|
|
1350
|
+
E: 4,
|
|
1351
|
+
F: 5,
|
|
1352
|
+
G: 7,
|
|
1353
|
+
A: 9,
|
|
1354
|
+
B: 11
|
|
1355
|
+
},
|
|
1356
|
+
[(0, $72b24102c7d826fd$export$f5b1d6b4244c9536)]: {
|
|
1357
|
+
B: 0,
|
|
1358
|
+
C: 1,
|
|
1359
|
+
D: 3,
|
|
1360
|
+
E: 5,
|
|
1361
|
+
F: 6,
|
|
1362
|
+
G: 8,
|
|
1363
|
+
A: 10
|
|
1364
|
+
},
|
|
1365
|
+
[(0, $72b24102c7d826fd$export$1ea14522906630af)]: {
|
|
1366
|
+
D: 1,
|
|
1367
|
+
E: 3,
|
|
1368
|
+
F: 4,
|
|
1369
|
+
G: 6,
|
|
1370
|
+
A: 8,
|
|
1371
|
+
B: 10,
|
|
1372
|
+
C: 11
|
|
1373
|
+
}
|
|
1374
|
+
},
|
|
1375
|
+
[(0, $72b24102c7d826fd$export$f23edc19d247fd25)]: {
|
|
1376
|
+
[(0, $72b24102c7d826fd$export$f0f7b592ea674eb2)]: {
|
|
1377
|
+
C: 0,
|
|
1378
|
+
D: 2,
|
|
1379
|
+
E: 4,
|
|
1380
|
+
F: 5,
|
|
1381
|
+
G: 7,
|
|
1382
|
+
A: 9,
|
|
1383
|
+
B: 11
|
|
1384
|
+
},
|
|
1385
|
+
[(0, $72b24102c7d826fd$export$f5b1d6b4244c9536)]: {
|
|
1386
|
+
B: 0,
|
|
1387
|
+
C: 1,
|
|
1388
|
+
D: 3,
|
|
1389
|
+
E: 5,
|
|
1390
|
+
F: 6,
|
|
1391
|
+
G: 8,
|
|
1392
|
+
A: 10
|
|
1393
|
+
},
|
|
1394
|
+
[(0, $72b24102c7d826fd$export$1ea14522906630af)]: {
|
|
1395
|
+
D: 1,
|
|
1396
|
+
E: 3,
|
|
1397
|
+
F: 4,
|
|
1398
|
+
G: 6,
|
|
1399
|
+
A: 8,
|
|
1400
|
+
B: 10,
|
|
1401
|
+
C: 11
|
|
1402
|
+
}
|
|
1403
|
+
}
|
|
1404
|
+
},
|
|
1405
|
+
[(0, $72b24102c7d826fd$export$539a6499f4711c57)]: {
|
|
1406
|
+
[(0, $72b24102c7d826fd$export$39615881bb0d21f6)]: {
|
|
1407
|
+
[(0, $72b24102c7d826fd$export$f0f7b592ea674eb2)]: {
|
|
1408
|
+
Do: 0,
|
|
1409
|
+
Re: 2,
|
|
1410
|
+
Mi: 4,
|
|
1411
|
+
Fa: 5,
|
|
1412
|
+
Sol: 7,
|
|
1413
|
+
La: 9,
|
|
1414
|
+
Si: 11
|
|
1415
|
+
},
|
|
1416
|
+
[(0, $72b24102c7d826fd$export$f5b1d6b4244c9536)]: {
|
|
1417
|
+
Si: 0,
|
|
1418
|
+
Do: 1,
|
|
1419
|
+
Re: 3,
|
|
1420
|
+
Mi: 5,
|
|
1421
|
+
Fa: 6,
|
|
1422
|
+
Sol: 8,
|
|
1423
|
+
La: 10
|
|
1424
|
+
},
|
|
1425
|
+
[(0, $72b24102c7d826fd$export$1ea14522906630af)]: {
|
|
1426
|
+
Re: 1,
|
|
1427
|
+
Mi: 3,
|
|
1428
|
+
Fa: 4,
|
|
1429
|
+
Sol: 6,
|
|
1430
|
+
La: 8,
|
|
1431
|
+
Si: 10,
|
|
1432
|
+
Do: 11
|
|
1433
|
+
}
|
|
1434
|
+
},
|
|
1435
|
+
[(0, $72b24102c7d826fd$export$f23edc19d247fd25)]: {
|
|
1436
|
+
[(0, $72b24102c7d826fd$export$f0f7b592ea674eb2)]: {
|
|
1437
|
+
Do: 0,
|
|
1438
|
+
Re: 2,
|
|
1439
|
+
Mi: 4,
|
|
1440
|
+
Fa: 5,
|
|
1441
|
+
Sol: 7,
|
|
1442
|
+
La: 9,
|
|
1443
|
+
Si: 11
|
|
1444
|
+
},
|
|
1445
|
+
[(0, $72b24102c7d826fd$export$f5b1d6b4244c9536)]: {
|
|
1446
|
+
Si: 0,
|
|
1447
|
+
Do: 1,
|
|
1448
|
+
Re: 3,
|
|
1449
|
+
Mi: 5,
|
|
1450
|
+
Fa: 6,
|
|
1451
|
+
Sol: 8,
|
|
1452
|
+
La: 10
|
|
1453
|
+
},
|
|
1454
|
+
[(0, $72b24102c7d826fd$export$1ea14522906630af)]: {
|
|
1455
|
+
Re: 1,
|
|
1456
|
+
Mi: 3,
|
|
1457
|
+
Fa: 4,
|
|
1458
|
+
Sol: 6,
|
|
1459
|
+
La: 8,
|
|
1460
|
+
Si: 10,
|
|
1461
|
+
Do: 11
|
|
1462
|
+
}
|
|
1463
|
+
}
|
|
1464
|
+
},
|
|
1465
|
+
[(0, $72b24102c7d826fd$export$4d318981b5a83836)]: {
|
|
1466
|
+
[(0, $72b24102c7d826fd$export$39615881bb0d21f6)]: {
|
|
1467
|
+
[(0, $72b24102c7d826fd$export$f0f7b592ea674eb2)]: {
|
|
1468
|
+
1: 0,
|
|
1469
|
+
2: 2,
|
|
1470
|
+
3: 4,
|
|
1471
|
+
4: 5,
|
|
1472
|
+
5: 7,
|
|
1473
|
+
6: 9,
|
|
1474
|
+
7: 11
|
|
1475
|
+
},
|
|
1476
|
+
[(0, $72b24102c7d826fd$export$f5b1d6b4244c9536)]: {
|
|
1477
|
+
7: 0,
|
|
1478
|
+
1: 1,
|
|
1479
|
+
2: 3,
|
|
1480
|
+
3: 5,
|
|
1481
|
+
4: 6,
|
|
1482
|
+
5: 8,
|
|
1483
|
+
6: 10
|
|
1484
|
+
},
|
|
1485
|
+
[(0, $72b24102c7d826fd$export$1ea14522906630af)]: {
|
|
1486
|
+
2: 1,
|
|
1487
|
+
3: 3,
|
|
1488
|
+
4: 4,
|
|
1489
|
+
5: 6,
|
|
1490
|
+
6: 8,
|
|
1491
|
+
7: 10,
|
|
1492
|
+
1: 11
|
|
1493
|
+
}
|
|
1494
|
+
},
|
|
1495
|
+
[(0, $72b24102c7d826fd$export$f23edc19d247fd25)]: {
|
|
1496
|
+
[(0, $72b24102c7d826fd$export$f0f7b592ea674eb2)]: {
|
|
1497
|
+
1: 0,
|
|
1498
|
+
2: 2,
|
|
1499
|
+
3: 3,
|
|
1500
|
+
4: 5,
|
|
1501
|
+
5: 7,
|
|
1502
|
+
6: 8,
|
|
1503
|
+
7: 10
|
|
1504
|
+
},
|
|
1505
|
+
[(0, $72b24102c7d826fd$export$f5b1d6b4244c9536)]: {
|
|
1506
|
+
1: 1,
|
|
1507
|
+
2: 3,
|
|
1508
|
+
3: 4,
|
|
1509
|
+
4: 6,
|
|
1510
|
+
5: 8,
|
|
1511
|
+
6: 9,
|
|
1512
|
+
7: 11
|
|
1513
|
+
},
|
|
1514
|
+
[(0, $72b24102c7d826fd$export$1ea14522906630af)]: {
|
|
1515
|
+
2: 1,
|
|
1516
|
+
3: 2,
|
|
1517
|
+
4: 4,
|
|
1518
|
+
5: 6,
|
|
1519
|
+
6: 7,
|
|
1520
|
+
7: 9,
|
|
1521
|
+
1: 11
|
|
1522
|
+
}
|
|
1523
|
+
}
|
|
1524
|
+
},
|
|
1525
|
+
[(0, $72b24102c7d826fd$export$1321df9b16c30c6a)]: {
|
|
1526
|
+
[(0, $72b24102c7d826fd$export$39615881bb0d21f6)]: {
|
|
1527
|
+
[(0, $72b24102c7d826fd$export$f0f7b592ea674eb2)]: {
|
|
1528
|
+
I: 0,
|
|
1529
|
+
II: 2,
|
|
1530
|
+
III: 4,
|
|
1531
|
+
IV: 5,
|
|
1532
|
+
V: 7,
|
|
1533
|
+
VI: 9,
|
|
1534
|
+
VII: 11
|
|
1535
|
+
},
|
|
1536
|
+
[(0, $72b24102c7d826fd$export$f5b1d6b4244c9536)]: {
|
|
1537
|
+
VII: 0,
|
|
1538
|
+
I: 1,
|
|
1539
|
+
II: 3,
|
|
1540
|
+
III: 5,
|
|
1541
|
+
IV: 6,
|
|
1542
|
+
V: 8,
|
|
1543
|
+
VI: 10
|
|
1544
|
+
},
|
|
1545
|
+
[(0, $72b24102c7d826fd$export$1ea14522906630af)]: {
|
|
1546
|
+
II: 1,
|
|
1547
|
+
III: 3,
|
|
1548
|
+
IV: 4,
|
|
1549
|
+
V: 6,
|
|
1550
|
+
VI: 8,
|
|
1551
|
+
VII: 10,
|
|
1552
|
+
I: 11
|
|
1553
|
+
}
|
|
1554
|
+
},
|
|
1555
|
+
[(0, $72b24102c7d826fd$export$f23edc19d247fd25)]: {
|
|
1556
|
+
[(0, $72b24102c7d826fd$export$f0f7b592ea674eb2)]: {
|
|
1557
|
+
I: 0,
|
|
1558
|
+
II: 2,
|
|
1559
|
+
III: 3,
|
|
1560
|
+
IV: 5,
|
|
1561
|
+
V: 7,
|
|
1562
|
+
VI: 8,
|
|
1563
|
+
VII: 10
|
|
1564
|
+
},
|
|
1565
|
+
[(0, $72b24102c7d826fd$export$f5b1d6b4244c9536)]: {
|
|
1566
|
+
I: 1,
|
|
1567
|
+
II: 3,
|
|
1568
|
+
III: 4,
|
|
1569
|
+
IV: 6,
|
|
1570
|
+
V: 8,
|
|
1571
|
+
VI: 9,
|
|
1572
|
+
VII: 11
|
|
1573
|
+
},
|
|
1574
|
+
[(0, $72b24102c7d826fd$export$1ea14522906630af)]: {
|
|
1575
|
+
II: 1,
|
|
1576
|
+
III: 2,
|
|
1577
|
+
IV: 4,
|
|
1578
|
+
V: 6,
|
|
1579
|
+
VI: 7,
|
|
1580
|
+
VII: 9,
|
|
1581
|
+
I: 11
|
|
1582
|
+
}
|
|
1583
|
+
}
|
|
1584
|
+
}
|
|
1585
|
+
};
|
|
1586
|
+
const $0cb401ed3f1d0550$export$40141681ebb03523 = {
|
|
1587
|
+
[(0, $72b24102c7d826fd$export$27c95a7104c1f7aa)]: {
|
|
1588
|
+
[(0, $72b24102c7d826fd$export$39615881bb0d21f6)]: {
|
|
1589
|
+
[(0, $72b24102c7d826fd$export$f0f7b592ea674eb2)]: {
|
|
1590
|
+
0: 'C',
|
|
1591
|
+
2: 'D',
|
|
1592
|
+
4: 'E',
|
|
1593
|
+
5: 'F',
|
|
1594
|
+
7: 'G',
|
|
1595
|
+
9: 'A',
|
|
1596
|
+
11: 'B'
|
|
1597
|
+
},
|
|
1598
|
+
[(0, $72b24102c7d826fd$export$f5b1d6b4244c9536)]: {
|
|
1599
|
+
0: 'B#',
|
|
1600
|
+
1: 'C#',
|
|
1601
|
+
3: 'D#',
|
|
1602
|
+
5: 'E#',
|
|
1603
|
+
6: 'F#',
|
|
1604
|
+
8: 'G#',
|
|
1605
|
+
10: 'A#'
|
|
1606
|
+
},
|
|
1607
|
+
[(0, $72b24102c7d826fd$export$1ea14522906630af)]: {
|
|
1608
|
+
1: 'Db',
|
|
1609
|
+
3: 'Eb',
|
|
1610
|
+
4: 'Fb',
|
|
1611
|
+
6: 'Gb',
|
|
1612
|
+
8: 'Ab',
|
|
1613
|
+
10: 'Bb',
|
|
1614
|
+
11: 'Cb'
|
|
1615
|
+
}
|
|
1616
|
+
},
|
|
1617
|
+
[(0, $72b24102c7d826fd$export$f23edc19d247fd25)]: {
|
|
1618
|
+
[(0, $72b24102c7d826fd$export$f0f7b592ea674eb2)]: {
|
|
1619
|
+
0: 'C',
|
|
1620
|
+
2: 'D',
|
|
1621
|
+
4: 'E',
|
|
1622
|
+
5: 'F',
|
|
1623
|
+
7: 'G',
|
|
1624
|
+
9: 'A',
|
|
1625
|
+
11: 'B'
|
|
1626
|
+
},
|
|
1627
|
+
[(0, $72b24102c7d826fd$export$f5b1d6b4244c9536)]: {
|
|
1628
|
+
0: 'B#',
|
|
1629
|
+
1: 'C#',
|
|
1630
|
+
3: 'D#',
|
|
1631
|
+
5: 'E#',
|
|
1632
|
+
6: 'F#',
|
|
1633
|
+
8: 'G#',
|
|
1634
|
+
10: 'A#'
|
|
1635
|
+
},
|
|
1636
|
+
[(0, $72b24102c7d826fd$export$1ea14522906630af)]: {
|
|
1637
|
+
1: 'Db',
|
|
1638
|
+
3: 'Eb',
|
|
1639
|
+
4: 'Fb',
|
|
1640
|
+
6: 'Gb',
|
|
1641
|
+
8: 'Ab',
|
|
1642
|
+
10: 'Bb',
|
|
1643
|
+
11: 'Cb'
|
|
1644
|
+
}
|
|
1645
|
+
}
|
|
1646
|
+
},
|
|
1647
|
+
[(0, $72b24102c7d826fd$export$539a6499f4711c57)]: {
|
|
1648
|
+
[(0, $72b24102c7d826fd$export$39615881bb0d21f6)]: {
|
|
1649
|
+
[(0, $72b24102c7d826fd$export$f0f7b592ea674eb2)]: {
|
|
1650
|
+
0: 'Do',
|
|
1651
|
+
2: 'Re',
|
|
1652
|
+
4: 'Mi',
|
|
1653
|
+
5: 'Fa',
|
|
1654
|
+
7: 'Sol',
|
|
1655
|
+
9: 'La',
|
|
1656
|
+
11: 'Si'
|
|
1657
|
+
},
|
|
1658
|
+
[(0, $72b24102c7d826fd$export$f5b1d6b4244c9536)]: {
|
|
1659
|
+
0: 'Si#',
|
|
1660
|
+
1: 'Do#',
|
|
1661
|
+
3: 'Re#',
|
|
1662
|
+
5: 'Mi#',
|
|
1663
|
+
6: 'Fa#',
|
|
1664
|
+
8: 'Sol#',
|
|
1665
|
+
10: 'La#'
|
|
1666
|
+
},
|
|
1667
|
+
[(0, $72b24102c7d826fd$export$1ea14522906630af)]: {
|
|
1668
|
+
1: 'Reb',
|
|
1669
|
+
3: 'Mib',
|
|
1670
|
+
4: 'Fab',
|
|
1671
|
+
6: 'Solb',
|
|
1672
|
+
8: 'Lab',
|
|
1673
|
+
10: 'Sib',
|
|
1674
|
+
11: 'Dob'
|
|
1675
|
+
}
|
|
1676
|
+
},
|
|
1677
|
+
[(0, $72b24102c7d826fd$export$f23edc19d247fd25)]: {
|
|
1678
|
+
[(0, $72b24102c7d826fd$export$f0f7b592ea674eb2)]: {
|
|
1679
|
+
0: 'Do',
|
|
1680
|
+
2: 'Re',
|
|
1681
|
+
4: 'Mi',
|
|
1682
|
+
5: 'Fa',
|
|
1683
|
+
7: 'Sol',
|
|
1684
|
+
9: 'La',
|
|
1685
|
+
11: 'Si'
|
|
1686
|
+
},
|
|
1687
|
+
[(0, $72b24102c7d826fd$export$f5b1d6b4244c9536)]: {
|
|
1688
|
+
0: 'Si#',
|
|
1689
|
+
1: 'Do#',
|
|
1690
|
+
3: 'Re#',
|
|
1691
|
+
5: 'Mi#',
|
|
1692
|
+
6: 'Fa#',
|
|
1693
|
+
8: 'Sol#',
|
|
1694
|
+
10: 'La#'
|
|
1695
|
+
},
|
|
1696
|
+
[(0, $72b24102c7d826fd$export$1ea14522906630af)]: {
|
|
1697
|
+
1: 'Reb',
|
|
1698
|
+
3: 'Mib',
|
|
1699
|
+
4: 'Fab',
|
|
1700
|
+
6: 'Solb',
|
|
1701
|
+
8: 'Lab',
|
|
1702
|
+
10: 'Sib',
|
|
1703
|
+
11: 'Dob'
|
|
1704
|
+
}
|
|
1705
|
+
}
|
|
1706
|
+
},
|
|
1707
|
+
[(0, $72b24102c7d826fd$export$4d318981b5a83836)]: {
|
|
1708
|
+
[(0, $72b24102c7d826fd$export$39615881bb0d21f6)]: {
|
|
1709
|
+
[(0, $72b24102c7d826fd$export$f0f7b592ea674eb2)]: {
|
|
1710
|
+
0: '1',
|
|
1711
|
+
2: '2',
|
|
1712
|
+
4: '3',
|
|
1713
|
+
5: '4',
|
|
1714
|
+
7: '5',
|
|
1715
|
+
9: '6',
|
|
1716
|
+
11: '7'
|
|
1717
|
+
},
|
|
1718
|
+
[(0, $72b24102c7d826fd$export$f5b1d6b4244c9536)]: {
|
|
1719
|
+
0: '#7',
|
|
1720
|
+
1: '#1',
|
|
1721
|
+
3: '#2',
|
|
1722
|
+
5: '#3',
|
|
1723
|
+
6: '#4',
|
|
1724
|
+
8: '#5',
|
|
1725
|
+
10: '#6'
|
|
1726
|
+
},
|
|
1727
|
+
[(0, $72b24102c7d826fd$export$1ea14522906630af)]: {
|
|
1728
|
+
1: 'b2',
|
|
1729
|
+
3: 'b3',
|
|
1730
|
+
4: 'b4',
|
|
1731
|
+
6: 'b5',
|
|
1732
|
+
8: 'b6',
|
|
1733
|
+
10: 'b7',
|
|
1734
|
+
11: 'b1'
|
|
1735
|
+
}
|
|
1736
|
+
},
|
|
1737
|
+
[(0, $72b24102c7d826fd$export$f23edc19d247fd25)]: {
|
|
1738
|
+
[(0, $72b24102c7d826fd$export$f0f7b592ea674eb2)]: {
|
|
1739
|
+
0: '1',
|
|
1740
|
+
2: '2',
|
|
1741
|
+
3: '3',
|
|
1742
|
+
5: '4',
|
|
1743
|
+
7: '5',
|
|
1744
|
+
8: '6',
|
|
1745
|
+
10: '7'
|
|
1746
|
+
},
|
|
1747
|
+
[(0, $72b24102c7d826fd$export$f5b1d6b4244c9536)]: {
|
|
1748
|
+
1: '#1',
|
|
1749
|
+
3: '#2',
|
|
1750
|
+
4: '#3',
|
|
1751
|
+
6: '#4',
|
|
1752
|
+
8: '#5',
|
|
1753
|
+
9: '#6',
|
|
1754
|
+
11: '#7'
|
|
1755
|
+
},
|
|
1756
|
+
[(0, $72b24102c7d826fd$export$1ea14522906630af)]: {
|
|
1757
|
+
1: 'b2',
|
|
1758
|
+
2: 'b3',
|
|
1759
|
+
4: 'b4',
|
|
1760
|
+
6: 'b5',
|
|
1761
|
+
7: 'b6',
|
|
1762
|
+
9: 'b7',
|
|
1763
|
+
11: 'b1'
|
|
1764
|
+
}
|
|
1765
|
+
}
|
|
1766
|
+
},
|
|
1767
|
+
[(0, $72b24102c7d826fd$export$1321df9b16c30c6a)]: {
|
|
1768
|
+
[(0, $72b24102c7d826fd$export$39615881bb0d21f6)]: {
|
|
1769
|
+
[(0, $72b24102c7d826fd$export$f0f7b592ea674eb2)]: {
|
|
1770
|
+
0: 'I',
|
|
1771
|
+
2: 'II',
|
|
1772
|
+
4: 'III',
|
|
1773
|
+
5: 'IV',
|
|
1774
|
+
7: 'V',
|
|
1775
|
+
9: 'VI',
|
|
1776
|
+
11: 'VII'
|
|
1777
|
+
},
|
|
1778
|
+
[(0, $72b24102c7d826fd$export$f5b1d6b4244c9536)]: {
|
|
1779
|
+
0: '#VII',
|
|
1780
|
+
1: '#I',
|
|
1781
|
+
3: '#II',
|
|
1782
|
+
5: '#III',
|
|
1783
|
+
6: '#IV',
|
|
1784
|
+
8: '#V',
|
|
1785
|
+
10: '#VI'
|
|
1786
|
+
},
|
|
1787
|
+
[(0, $72b24102c7d826fd$export$1ea14522906630af)]: {
|
|
1788
|
+
1: 'bII',
|
|
1789
|
+
3: 'bIII',
|
|
1790
|
+
4: 'bIV',
|
|
1791
|
+
6: 'bV',
|
|
1792
|
+
8: 'bVI',
|
|
1793
|
+
10: 'bVII',
|
|
1794
|
+
11: 'bI'
|
|
1795
|
+
}
|
|
1796
|
+
},
|
|
1797
|
+
[(0, $72b24102c7d826fd$export$f23edc19d247fd25)]: {
|
|
1798
|
+
[(0, $72b24102c7d826fd$export$f0f7b592ea674eb2)]: {
|
|
1799
|
+
0: 'I',
|
|
1800
|
+
2: 'II',
|
|
1801
|
+
3: 'III',
|
|
1802
|
+
5: 'IV',
|
|
1803
|
+
7: 'V',
|
|
1804
|
+
8: 'VI',
|
|
1805
|
+
10: 'VII'
|
|
1806
|
+
},
|
|
1807
|
+
[(0, $72b24102c7d826fd$export$f5b1d6b4244c9536)]: {
|
|
1808
|
+
1: '#I',
|
|
1809
|
+
3: '#II',
|
|
1810
|
+
4: '#III',
|
|
1811
|
+
6: '#IV',
|
|
1812
|
+
8: '#V',
|
|
1813
|
+
9: '#VI',
|
|
1814
|
+
11: '#VII'
|
|
1815
|
+
},
|
|
1816
|
+
[(0, $72b24102c7d826fd$export$1ea14522906630af)]: {
|
|
1817
|
+
1: 'bII',
|
|
1818
|
+
2: 'bIII',
|
|
1819
|
+
4: 'bIV',
|
|
1820
|
+
6: 'bV',
|
|
1821
|
+
7: 'bVI',
|
|
1822
|
+
9: 'bVII',
|
|
1823
|
+
11: 'bI'
|
|
1824
|
+
}
|
|
1825
|
+
}
|
|
1826
|
+
}
|
|
1827
|
+
};
|
|
1828
1828
|
|
|
1829
1829
|
|
|
1830
1830
|
|
|
1831
1831
|
function $f52913d8767c6236$export$79570e60478bce41(value, functions) {
|
|
1832
1832
|
return functions.reduce((acc, fn)=>fn(acc), value);
|
|
1833
1833
|
}
|
|
1834
|
+
function $f52913d8767c6236$export$4da2456f0a9c9a18(key) {
|
|
1835
|
+
return key === 'H' || key === 'h';
|
|
1836
|
+
}
|
|
1837
|
+
function $f52913d8767c6236$export$59c434f66823d8be(key) {
|
|
1838
|
+
if (key === 'H') return 'B';
|
|
1839
|
+
if (key === 'h') return 'b';
|
|
1840
|
+
return key;
|
|
1841
|
+
}
|
|
1842
|
+
function $f52913d8767c6236$export$4f126a839166f96d(keyString) {
|
|
1843
|
+
return keyString.startsWith('H') ? `B${keyString.slice(1)}` : keyString;
|
|
1844
|
+
}
|
|
1845
|
+
function $f52913d8767c6236$export$7d9735233c5272d2(key, accidental, notation) {
|
|
1846
|
+
if (notation === (0, $72b24102c7d826fd$export$34df5089b632c747) && accidental === null && (key === 'B' || key === 'b')) return 0, $72b24102c7d826fd$export$1ea14522906630af;
|
|
1847
|
+
return null;
|
|
1848
|
+
}
|
|
1849
|
+
function $f52913d8767c6236$export$9bc1c71527523e02(keyString, explicit) {
|
|
1850
|
+
if (explicit) return explicit;
|
|
1851
|
+
return $f52913d8767c6236$export$4da2456f0a9c9a18(keyString) ? (0, $72b24102c7d826fd$export$34df5089b632c747) : null;
|
|
1852
|
+
}
|
|
1853
|
+
function $f52913d8767c6236$export$f524439d316753cc(key, accidental, type, minor) {
|
|
1854
|
+
const grades = (0, $0cb401ed3f1d0550$export$7e1516eaf3ebe01f)[type][minor ? (0, $72b24102c7d826fd$export$f23edc19d247fd25) : (0, $72b24102c7d826fd$export$39615881bb0d21f6)][accidental];
|
|
1855
|
+
const lookupKey = type === (0, $72b24102c7d826fd$export$27c95a7104c1f7aa) ? $f52913d8767c6236$export$59c434f66823d8be(key) : key;
|
|
1856
|
+
if (lookupKey in grades) return grades[lookupKey];
|
|
1857
|
+
const upperCaseKey = lookupKey.toUpperCase();
|
|
1858
|
+
if (upperCaseKey in grades) return grades[upperCaseKey];
|
|
1859
|
+
return null;
|
|
1860
|
+
}
|
|
1834
1861
|
function $f52913d8767c6236$export$d332d76d125f0cbe(line) {
|
|
1835
1862
|
return line.items.some((item)=>item instanceof (0, $0d04ced54ebef610$export$2e2bcd8739ae039) && !!item.chords);
|
|
1836
1863
|
}
|
|
@@ -1976,7 +2003,7 @@ function $f52913d8767c6236$export$1039dc7987464938(object, predicate) {
|
|
|
1976
2003
|
|
|
1977
2004
|
|
|
1978
2005
|
const $4d72f408c2526a1c$var$regexes = {
|
|
1979
|
-
symbol: /^(?<key>((?<note>[A-
|
|
2006
|
+
symbol: /^(?<key>((?<note>[A-Ha-h])(?<accidental>#|b)?))(?<minor>m)?$/,
|
|
1980
2007
|
solfege: /^(?<key>((?<note>Do|Re|Mi|Fa|Sol|La|Si|do|re|mi|fa|sol|la|si)(?<accidental>#|b)?))(?<minor>m)?$/,
|
|
1981
2008
|
numeric: /^(?<key>(?<accidental>#|b)?(?<note>[1-7]))(?<minor>m)?$/,
|
|
1982
2009
|
numeral: /^(?<key>(?<accidental>#|b)?(?<note>I{1,3}|IV|VI{0,2}|i{1,3}|iv|vi{0,2}))$/
|
|
@@ -2063,27 +2090,28 @@ const $4d72f408c2526a1c$var$PREFERS_FLAT_NUMBERS = [
|
|
|
2063
2090
|
key: note,
|
|
2064
2091
|
keyType: keyType,
|
|
2065
2092
|
minor: minor || false,
|
|
2066
|
-
accidental: accidental || null
|
|
2093
|
+
accidental: accidental || null,
|
|
2094
|
+
preferredNotation: keyType === (0, $72b24102c7d826fd$export$27c95a7104c1f7aa) && (0, $f52913d8767c6236$export$4da2456f0a9c9a18)(note) ? (0, $72b24102c7d826fd$export$34df5089b632c747) : null
|
|
2067
2095
|
});
|
|
2068
2096
|
}
|
|
2069
|
-
/* eslint-disable-next-line max-lines-per-function */ static resolve({ key: key, keyType: keyType, minor: minor, accidental: accidental }) {
|
|
2097
|
+
/* eslint-disable-next-line max-lines-per-function */ static resolve({ key: key, keyType: keyType, minor: minor, accidental: accidental, preferredNotation: preferredNotation }) {
|
|
2070
2098
|
const keyString = `${key}`;
|
|
2071
2099
|
const isMinor = this.isMinor(keyString, keyType, minor);
|
|
2072
|
-
|
|
2073
|
-
|
|
2074
|
-
|
|
2075
|
-
|
|
2076
|
-
|
|
2077
|
-
|
|
2078
|
-
|
|
2079
|
-
|
|
2080
|
-
|
|
2081
|
-
|
|
2082
|
-
|
|
2083
|
-
|
|
2084
|
-
|
|
2100
|
+
const notation = (0, $f52913d8767c6236$export$9bc1c71527523e02)(keyString, preferredNotation);
|
|
2101
|
+
const lookupAccidental = (0, $f52913d8767c6236$export$7d9735233c5272d2)(keyString, accidental, notation) ?? accidental;
|
|
2102
|
+
const grade = keyType === (0, $72b24102c7d826fd$export$27c95a7104c1f7aa) || keyType === (0, $72b24102c7d826fd$export$539a6499f4711c57) ? (0, $f52913d8767c6236$export$f524439d316753cc)(keyString, lookupAccidental || (0, $72b24102c7d826fd$export$3fdd332fe3104970), keyType, isMinor) : null;
|
|
2103
|
+
if (grade !== null) return new $4d72f408c2526a1c$var$Key({
|
|
2104
|
+
grade: 0,
|
|
2105
|
+
minor: isMinor,
|
|
2106
|
+
type: keyType,
|
|
2107
|
+
accidental: accidental || null,
|
|
2108
|
+
preferredAccidental: accidental || null,
|
|
2109
|
+
referenceKeyGrade: grade,
|
|
2110
|
+
originalKeyString: keyString,
|
|
2111
|
+
preferredNotation: notation
|
|
2112
|
+
});
|
|
2085
2113
|
return new $4d72f408c2526a1c$var$Key({
|
|
2086
|
-
number:
|
|
2114
|
+
number: this.getNumberFromKey(keyString, keyType),
|
|
2087
2115
|
minor: isMinor,
|
|
2088
2116
|
type: keyType,
|
|
2089
2117
|
accidental: accidental || null,
|
|
@@ -2107,14 +2135,6 @@ const $4d72f408c2526a1c$var$PREFERS_FLAT_NUMBERS = [
|
|
|
2107
2135
|
(0, $f52913d8767c6236$export$b680e6b2c82f8c2f)('keyWithModifier is deprecated, use keyWithAccidental instead');
|
|
2108
2136
|
return this.keyWithAccidental(key, accidental, type);
|
|
2109
2137
|
}
|
|
2110
|
-
static toGrade(key, accidental, type, isMinor) {
|
|
2111
|
-
const mode = isMinor ? (0, $72b24102c7d826fd$export$f23edc19d247fd25) : (0, $72b24102c7d826fd$export$39615881bb0d21f6);
|
|
2112
|
-
const grades = (0, $0cb401ed3f1d0550$export$7e1516eaf3ebe01f)[type][mode][accidental];
|
|
2113
|
-
if (key in grades) return grades[key];
|
|
2114
|
-
const upperCaseKey = key.toUpperCase();
|
|
2115
|
-
if (upperCaseKey in grades) return grades[upperCaseKey];
|
|
2116
|
-
return null;
|
|
2117
|
-
}
|
|
2118
2138
|
static isMinor(key, keyType, minor) {
|
|
2119
2139
|
switch(keyType){
|
|
2120
2140
|
case 'numeral':
|
|
@@ -2157,13 +2177,14 @@ const $4d72f408c2526a1c$var$PREFERS_FLAT_NUMBERS = [
|
|
|
2157
2177
|
*/ static distance(oneKey, otherKey) {
|
|
2158
2178
|
return this.wrapOrFail(oneKey).distanceTo(otherKey);
|
|
2159
2179
|
}
|
|
2160
|
-
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 }){
|
|
2180
|
+
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 }){
|
|
2161
2181
|
this.number = null;
|
|
2162
2182
|
this.minor = false;
|
|
2163
2183
|
this.referenceKeyGrade = null;
|
|
2164
2184
|
this.referenceKeyMode = null;
|
|
2165
2185
|
this.originalKeyString = null;
|
|
2166
2186
|
this.explicitAccidental = false;
|
|
2187
|
+
this.preferredNotation = null;
|
|
2167
2188
|
this.grade = grade;
|
|
2168
2189
|
this.number = number;
|
|
2169
2190
|
this.minor = minor;
|
|
@@ -2174,6 +2195,7 @@ const $4d72f408c2526a1c$var$PREFERS_FLAT_NUMBERS = [
|
|
|
2174
2195
|
this.referenceKeyMode = referenceKeyMode;
|
|
2175
2196
|
this.originalKeyString = originalKeyString;
|
|
2176
2197
|
this.explicitAccidental = explicitAccidental;
|
|
2198
|
+
this.preferredNotation = preferredNotation;
|
|
2177
2199
|
}
|
|
2178
2200
|
distanceTo(otherKey) {
|
|
2179
2201
|
const otherKeyObj = $4d72f408c2526a1c$var$Key.wrapOrFail(otherKey);
|
|
@@ -2215,7 +2237,7 @@ const $4d72f408c2526a1c$var$PREFERS_FLAT_NUMBERS = [
|
|
|
2215
2237
|
}
|
|
2216
2238
|
calculateGradeFromNumber() {
|
|
2217
2239
|
if (this.number === null) throw new Error('Cannot calculate grade, number is null');
|
|
2218
|
-
this.grade = $
|
|
2240
|
+
this.grade = (0, $f52913d8767c6236$export$f524439d316753cc)(this.number.toString(), this.accidental || (0, $72b24102c7d826fd$export$3fdd332fe3104970), (0, $72b24102c7d826fd$export$4d318981b5a83836), this.isMinor());
|
|
2219
2241
|
this.number = null;
|
|
2220
2242
|
}
|
|
2221
2243
|
toChordSymbol(key, referenceKeyWasMinor = false) {
|
|
@@ -2338,13 +2360,20 @@ const $4d72f408c2526a1c$var$PREFERS_FLAT_NUMBERS = [
|
|
|
2338
2360
|
if ((this.isChordSymbol() || this.isChordSolfege()) && this.referenceKeyGrade === null) throw new Error('Not possible, reference key grade is null');
|
|
2339
2361
|
let { minor: minor } = this;
|
|
2340
2362
|
if (this.referenceKeyMode) minor = this.referenceKeyMode === (0, $72b24102c7d826fd$export$f23edc19d247fd25);
|
|
2341
|
-
|
|
2363
|
+
const rendered = (0, $f52913d8767c6236$export$65f5b958d546bb3f)({
|
|
2342
2364
|
type: this.type,
|
|
2343
2365
|
accidental: this.accidental,
|
|
2344
2366
|
preferredAccidental: this.preferredAccidental,
|
|
2345
2367
|
grade: this.effectiveGrade,
|
|
2346
2368
|
minor: minor
|
|
2347
2369
|
});
|
|
2370
|
+
return this.applyGermanRendering(rendered);
|
|
2371
|
+
}
|
|
2372
|
+
applyGermanRendering(rendered) {
|
|
2373
|
+
if (this.preferredNotation !== (0, $72b24102c7d826fd$export$34df5089b632c747) || !this.isChordSymbol()) return rendered;
|
|
2374
|
+
if (this.accidental === null && this.effectiveGrade === 10) return 'B';
|
|
2375
|
+
if (rendered === 'B') return 'H';
|
|
2376
|
+
return rendered;
|
|
2348
2377
|
}
|
|
2349
2378
|
getNoteForNumber() {
|
|
2350
2379
|
if (this.number === null) throw new Error('Not possible, grade and number are null');
|
|
@@ -2449,15 +2478,16 @@ const $4d72f408c2526a1c$var$PREFERS_FLAT_NUMBERS = [
|
|
|
2449
2478
|
if (key) {
|
|
2450
2479
|
// Preserve explicit accidental choices made via useAccidental()
|
|
2451
2480
|
if (this.explicitAccidental) return this.clone();
|
|
2452
|
-
const rootKeyString = $4d72f408c2526a1c$var$Key.wrapOrFail(key).toString({
|
|
2481
|
+
const rootKeyString = (0, $f52913d8767c6236$export$4f126a839166f96d)($4d72f408c2526a1c$var$Key.wrapOrFail(key).toString({
|
|
2453
2482
|
showMinor: true
|
|
2454
|
-
});
|
|
2483
|
+
}));
|
|
2455
2484
|
const enharmonics = (0, $23642067c1e64fd7$export$2e2bcd8739ae039)[rootKeyString];
|
|
2456
|
-
const thisKeyString = this.toString({
|
|
2485
|
+
const thisKeyString = (0, $f52913d8767c6236$export$4f126a839166f96d)(this.toString({
|
|
2457
2486
|
showMinor: false
|
|
2458
|
-
});
|
|
2487
|
+
}));
|
|
2459
2488
|
if (enharmonics && enharmonics[thisKeyString]) return $4d72f408c2526a1c$var$Key.parseOrFail(enharmonics[thisKeyString]).set({
|
|
2460
|
-
minor: this.minor
|
|
2489
|
+
minor: this.minor,
|
|
2490
|
+
preferredNotation: this.preferredNotation
|
|
2461
2491
|
});
|
|
2462
2492
|
}
|
|
2463
2493
|
return this.clone();
|
|
@@ -2474,6 +2504,7 @@ const $4d72f408c2526a1c$var$PREFERS_FLAT_NUMBERS = [
|
|
|
2474
2504
|
originalKeyString: this.originalKeyString,
|
|
2475
2505
|
preferredAccidental: this.preferredAccidental,
|
|
2476
2506
|
explicitAccidental: this.explicitAccidental,
|
|
2507
|
+
preferredNotation: this.preferredNotation,
|
|
2477
2508
|
...overwrite ? attributes : {}
|
|
2478
2509
|
});
|
|
2479
2510
|
}
|
|
@@ -2635,15 +2666,15 @@ function $33f7017b34767c5f$var$peg$parse(input, options) {
|
|
|
2635
2666
|
chordType: "symbol"
|
|
2636
2667
|
};
|
|
2637
2668
|
};
|
|
2638
|
-
const peg$c10 = /^[A-
|
|
2669
|
+
const peg$c10 = /^[A-Ha-h]/;
|
|
2639
2670
|
const peg$c11 = peg$classExpectation([
|
|
2640
2671
|
[
|
|
2641
2672
|
"A",
|
|
2642
|
-
"
|
|
2673
|
+
"H"
|
|
2643
2674
|
],
|
|
2644
2675
|
[
|
|
2645
2676
|
"a",
|
|
2646
|
-
"
|
|
2677
|
+
"h"
|
|
2647
2678
|
]
|
|
2648
2679
|
], false, false);
|
|
2649
2680
|
const peg$c12 = "/";
|
|
@@ -3781,19 +3812,26 @@ const $33f7017b34767c5f$export$98e6a39c04603d36 = $33f7017b34767c5f$var$peg$pars
|
|
|
3781
3812
|
* Tries to parse a chord string into a chord
|
|
3782
3813
|
* Any leading or trailing whitespace is removed first, so a chord like ` \n E/G# \r ` is valid.
|
|
3783
3814
|
* @param chordString the chord string, eg `Esus4/G#` or `1sus4/#3`.
|
|
3815
|
+
* @param {ChordParseOptions} [options] parse options
|
|
3816
|
+
* @param {Notation|null} [options.notation] when `'german'`, `B` is interpreted as B-flat (grade 10)
|
|
3817
|
+
* and `H` as B natural (grade 11), and output renders accordingly. Defaults to English semantics where
|
|
3818
|
+
* `B` is B natural and `H` is accepted as an alias for it.
|
|
3784
3819
|
* @returns {Chord|null}
|
|
3785
|
-
*/ static parse(chordString) {
|
|
3820
|
+
*/ static parse(chordString, options = {}) {
|
|
3786
3821
|
try {
|
|
3787
|
-
return this.parseOrFail(chordString);
|
|
3822
|
+
return this.parseOrFail(chordString, options);
|
|
3788
3823
|
} catch (_error) {
|
|
3789
3824
|
return null;
|
|
3790
3825
|
}
|
|
3791
3826
|
}
|
|
3792
|
-
static parseOrFail(chordString) {
|
|
3827
|
+
static parseOrFail(chordString, options = {}) {
|
|
3793
3828
|
const trimmedChord = chordString.trim();
|
|
3794
3829
|
try {
|
|
3795
3830
|
const ast = (0, $33f7017b34767c5f$export$98e6a39c04603d36)(trimmedChord);
|
|
3796
|
-
return new $f0449e2486cb2372$var$Chord(
|
|
3831
|
+
return new $f0449e2486cb2372$var$Chord({
|
|
3832
|
+
...ast,
|
|
3833
|
+
notation: options.notation ?? null
|
|
3834
|
+
});
|
|
3797
3835
|
} catch (error) {
|
|
3798
3836
|
const errorObj = error;
|
|
3799
3837
|
throw new (0, $4fe61140afd91ab4$export$2e2bcd8739ae039)(`Failed parsing '${trimmedChord}': ${errorObj.message}`);
|
|
@@ -4050,7 +4088,7 @@ const $33f7017b34767c5f$export$98e6a39c04603d36 = $33f7017b34767c5f$var$peg$pars
|
|
|
4050
4088
|
return this.suffix === otherChord.suffix && this.optional === otherChord.optional && (0, $4d72f408c2526a1c$export$2e2bcd8739ae039).equals(this.root, otherChord.root) && (0, $4d72f408c2526a1c$export$2e2bcd8739ae039).equals(this.bass, otherChord.bass);
|
|
4051
4089
|
}
|
|
4052
4090
|
static determineRoot(options) {
|
|
4053
|
-
const { root: root, base: base, accidental: accidental, suffix: suffix, chordType: chordType } = options;
|
|
4091
|
+
const { root: root, base: base, accidental: accidental, suffix: suffix, chordType: chordType, notation: notation } = options;
|
|
4054
4092
|
if (root) return root;
|
|
4055
4093
|
if (!base) return null;
|
|
4056
4094
|
if (!chordType) throw new Error('Can\'t resolve at this point without a chord type');
|
|
@@ -4058,11 +4096,12 @@ const $33f7017b34767c5f$export$98e6a39c04603d36 = $33f7017b34767c5f$var$peg$pars
|
|
|
4058
4096
|
key: base,
|
|
4059
4097
|
keyType: chordType,
|
|
4060
4098
|
minor: (0, $f52913d8767c6236$export$51fabfbeed747719)(base, chordType, suffix ?? null),
|
|
4061
|
-
accidental: accidental ?? null
|
|
4099
|
+
accidental: accidental ?? null,
|
|
4100
|
+
preferredNotation: notation ?? null
|
|
4062
4101
|
});
|
|
4063
4102
|
}
|
|
4064
4103
|
static determineBass(options) {
|
|
4065
|
-
const { bass: bass, bassBase: bassBase, bassAccidental: bassAccidental, chordType: chordType } = options;
|
|
4104
|
+
const { bass: bass, bassBase: bassBase, bassAccidental: bassAccidental, chordType: chordType, notation: notation } = options;
|
|
4066
4105
|
if (bass) return bass;
|
|
4067
4106
|
if (!bassBase) return null;
|
|
4068
4107
|
if (!chordType) throw new Error('Can\'t resolve at this point without a chord type');
|
|
@@ -4070,7 +4109,8 @@ const $33f7017b34767c5f$export$98e6a39c04603d36 = $33f7017b34767c5f$var$peg$pars
|
|
|
4070
4109
|
key: bassBase,
|
|
4071
4110
|
accidental: bassAccidental ?? null,
|
|
4072
4111
|
minor: false,
|
|
4073
|
-
keyType: chordType
|
|
4112
|
+
keyType: chordType,
|
|
4113
|
+
preferredNotation: notation ?? null
|
|
4074
4114
|
});
|
|
4075
4115
|
}
|
|
4076
4116
|
isMinor() {
|
|
@@ -8692,8 +8732,13 @@ const $6f86ed99ed3b8cb9$var$TERNARY = 'ternary';
|
|
|
8692
8732
|
/**
|
|
8693
8733
|
* Deserializes a song that has been serialized using {@link serialize}
|
|
8694
8734
|
* @param {object} serializedSong The serialized song
|
|
8735
|
+
* @param {object} [options] Deserialization options
|
|
8736
|
+
* @param {Notation|null} [options.notation] When `'german'`, chord strings on the song are eagerly
|
|
8737
|
+
* parsed with German notation (`B` = B-flat, `H` = B natural) so the preference survives transpose
|
|
8738
|
+
* and re-serialization. Defaults to English semantics.
|
|
8695
8739
|
* @returns {Song} The deserialized song
|
|
8696
|
-
*/ deserialize(serializedSong) {
|
|
8740
|
+
*/ deserialize(serializedSong, options = {}) {
|
|
8741
|
+
this.notation = options.notation ?? null;
|
|
8697
8742
|
this.parseAstComponent(serializedSong);
|
|
8698
8743
|
return this.song;
|
|
8699
8744
|
}
|
|
@@ -8737,7 +8782,11 @@ const $6f86ed99ed3b8cb9$var$TERNARY = 'ternary';
|
|
|
8737
8782
|
}
|
|
8738
8783
|
parseChordLyricsPair(astComponent) {
|
|
8739
8784
|
const { chord: chord, chords: chords, lyrics: lyrics, annotation: annotation, isRhythmSymbol: isRhythmSymbol } = astComponent;
|
|
8740
|
-
|
|
8785
|
+
const chordString = chord ? new (0, $f0449e2486cb2372$export$2e2bcd8739ae039)(chord).toString() : chords;
|
|
8786
|
+
const eagerChord = this.notation && chordString ? (0, $f0449e2486cb2372$export$2e2bcd8739ae039).parse(chordString, {
|
|
8787
|
+
notation: this.notation
|
|
8788
|
+
}) : null;
|
|
8789
|
+
return new (0, $0d04ced54ebef610$export$2e2bcd8739ae039)(eagerChord ? eagerChord.toString() : chordString, lyrics, annotation, eagerChord, isRhythmSymbol || false);
|
|
8741
8790
|
}
|
|
8742
8791
|
parseTag(astComponent) {
|
|
8743
8792
|
const { name: name, value: value, location: { offset: offset = null, line: line = null, column: column = null } = {}, chordDefinition: chordDefinition, attributes: attributes, selector: selector, isNegated: isNegated } = astComponent;
|
|
@@ -8773,6 +8822,7 @@ const $6f86ed99ed3b8cb9$var$TERNARY = 'ternary';
|
|
|
8773
8822
|
constructor(){
|
|
8774
8823
|
this.song = new (0, $962eb86a322c5cfb$export$2e2bcd8739ae039)();
|
|
8775
8824
|
this.songBuilder = new (0, $4132ae2381aed81f$export$2e2bcd8739ae039)(this.song);
|
|
8825
|
+
this.notation = null;
|
|
8776
8826
|
}
|
|
8777
8827
|
}
|
|
8778
8828
|
var $6f86ed99ed3b8cb9$export$2e2bcd8739ae039 = $6f86ed99ed3b8cb9$var$ChordSheetSerializer;
|
|
@@ -13280,6 +13330,9 @@ const $d19fa9f128cdbd26$export$98e6a39c04603d36 = $d19fa9f128cdbd26$var$peg$pars
|
|
|
13280
13330
|
* followed by * a space is treated as a soft line break
|
|
13281
13331
|
* @param {ChordProParserOptions.chopFirstWord} options.chopFirstWord=true If true, only the first lyric
|
|
13282
13332
|
* word is paired with the chord, the rest of the lyric is put in a separate chord lyric pair
|
|
13333
|
+
* @param {Notation|null} [options.notation] When `'german'`, every chord in the song is parsed using
|
|
13334
|
+
* German notation (`B` = B-flat, `H` = B natural) and rendered accordingly. Defaults to English
|
|
13335
|
+
* semantics where `B` is B natural and `H` is accepted as an alias for it.
|
|
13283
13336
|
* @see https://peggyjs.org/documentation.html#using-the-parser
|
|
13284
13337
|
* @returns {Song} The parsed song
|
|
13285
13338
|
*/ parse(chordSheet, options) {
|
|
@@ -13287,7 +13340,9 @@ const $d19fa9f128cdbd26$export$98e6a39c04603d36 = $d19fa9f128cdbd26$var$peg$pars
|
|
|
13287
13340
|
tracer: new (0, $a68b1ca180ade890$export$2e2bcd8739ae039)(),
|
|
13288
13341
|
...options
|
|
13289
13342
|
});
|
|
13290
|
-
this.song = new (0, $6f86ed99ed3b8cb9$export$2e2bcd8739ae039)().deserialize(ast
|
|
13343
|
+
this.song = new (0, $6f86ed99ed3b8cb9$export$2e2bcd8739ae039)().deserialize(ast, {
|
|
13344
|
+
notation: options?.notation ?? null
|
|
13345
|
+
});
|
|
13291
13346
|
return this.song;
|
|
13292
13347
|
}
|
|
13293
13348
|
}
|
|
@@ -14524,15 +14579,15 @@ function $f22c8d9a47c38bea$var$peg$parse(input, options) {
|
|
|
14524
14579
|
chordType: "symbol"
|
|
14525
14580
|
};
|
|
14526
14581
|
};
|
|
14527
|
-
const peg$c71 = /^[A-
|
|
14582
|
+
const peg$c71 = /^[A-Ha-h]/;
|
|
14528
14583
|
const peg$c72 = peg$classExpectation([
|
|
14529
14584
|
[
|
|
14530
14585
|
"A",
|
|
14531
|
-
"
|
|
14586
|
+
"H"
|
|
14532
14587
|
],
|
|
14533
14588
|
[
|
|
14534
14589
|
"a",
|
|
14535
|
-
"
|
|
14590
|
+
"h"
|
|
14536
14591
|
]
|
|
14537
14592
|
], false, false);
|
|
14538
14593
|
const peg$c73 = "/";
|
|
@@ -30096,7 +30151,7 @@ const $ecd3f348894bfbde$var$endSectionTags = {
|
|
|
30096
30151
|
var $ecd3f348894bfbde$export$2e2bcd8739ae039 = $ecd3f348894bfbde$var$UltimateGuitarParser;
|
|
30097
30152
|
|
|
30098
30153
|
|
|
30099
|
-
var $a91afe1497b28cb4$export$2e2bcd8739ae039 = '15.
|
|
30154
|
+
var $a91afe1497b28cb4$export$2e2bcd8739ae039 = '15.5.0';
|
|
30100
30155
|
|
|
30101
30156
|
|
|
30102
30157
|
|