@coderline/alphatab 1.9.0-alpha.1852 → 1.9.0-alpha.1853

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.
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * alphaTab v1.9.0-alpha.1852 (develop, build 1852)
2
+ * alphaTab v1.9.0-alpha.1853 (develop, build 1853)
3
3
  *
4
4
  * Copyright © 2026, Daniel Kuschny and Contributors, All rights reserved.
5
5
  *
@@ -186,9 +186,9 @@ class AlphaTabError extends Error {
186
186
  * @internal
187
187
  */
188
188
  class VersionInfo {
189
- static version = "1.9.0-alpha.1852";
190
- static date = "2026-07-03T04:02:23.351Z";
191
- static commit = "b053b63f5a438ad410d9b45fc8eca85cf5bc84ae";
189
+ static version = "1.9.0-alpha.1853";
190
+ static date = "2026-07-04T03:56:00.242Z";
191
+ static commit = "770d9e5f9fa71e92e08bdeb8b27a7144b1ef1418";
192
192
  static print(print) {
193
193
  print(`alphaTab ${VersionInfo.version}`);
194
194
  print(`commit: ${VersionInfo.commit}`);
@@ -5765,7 +5765,7 @@ class PercussionMapper {
5765
5765
  for (const a of PercussionMapper.instrumentArticulations.values()) if (!articulationsByOutputNumber.has(a.outputMidiNumber)) articulationsByOutputNumber.set(a.outputMidiNumber, a);
5766
5766
  PercussionMapper._articulationsByOutputNumber = articulationsByOutputNumber;
5767
5767
  }
5768
- return articulationsByOutputNumber.has(articulation.outputMidiNumber) ? articulationsByOutputNumber.get(articulation.outputMidiNumber).id : -1;
5768
+ return articulationsByOutputNumber.has(articulation.outputMidiNumber) ? articulationsByOutputNumber.get(articulation.outputMidiNumber).id : NaN;
5769
5769
  }
5770
5770
  static _instrumentArticulationsByUniqueId;
5771
5771
  static getInstrumentArticulationByUniqueId(uniqueId) {
@@ -5947,36 +5947,36 @@ class Note {
5947
5947
  return this.bendPoints !== null && this.bendType !== BendType.None;
5948
5948
  }
5949
5949
  get isStringed() {
5950
- return this.string >= 0;
5950
+ return !Number.isNaN(this.string) && !Number.isNaN(this.fret);
5951
5951
  }
5952
5952
  /**
5953
5953
  * Gets or sets the fret on which this note is played on the instrument.
5954
5954
  * 0 is the nut.
5955
5955
  */
5956
- fret = -1;
5956
+ fret = NaN;
5957
5957
  /**
5958
5958
  * Gets or sets the string number where the note is placed.
5959
5959
  * 1 is the lowest string on the guitar and the bottom line on the tablature.
5960
5960
  * It then increases the the number of strings on available on the track.
5961
5961
  */
5962
- string = -1;
5962
+ string = NaN;
5963
5963
  /**
5964
5964
  * Gets or sets whether the string number for this note should be shown.
5965
5965
  */
5966
5966
  showStringNumber = false;
5967
5967
  get isPiano() {
5968
- return !this.isStringed && this.octave >= 0 && this.tone >= 0;
5968
+ return !this.isStringed && !Number.isNaN(this.octave) && !Number.isNaN(this.tone);
5969
5969
  }
5970
5970
  /**
5971
5971
  * Gets or sets the octave on which this note is played.
5972
5972
  */
5973
- octave = -1;
5973
+ octave = NaN;
5974
5974
  /**
5975
5975
  * Gets or sets the tone of this note within the octave.
5976
5976
  */
5977
- tone = -1;
5977
+ tone = NaN;
5978
5978
  get isPercussion() {
5979
- return !this.isStringed && this.percussionArticulation >= 0;
5979
+ return !Number.isNaN(this.percussionArticulation);
5980
5980
  }
5981
5981
  /**
5982
5982
  * Gets or sets the percusson element.
@@ -6091,7 +6091,7 @@ class Note {
6091
6091
  * - 126 Ride (middle)
6092
6092
  * - 127 Ride (bell)
6093
6093
  */
6094
- percussionArticulation = -1;
6094
+ percussionArticulation = NaN;
6095
6095
  /**
6096
6096
  * Gets or sets whether this note is visible on the music sheet.
6097
6097
  */
@@ -6316,7 +6316,7 @@ class Note {
6316
6316
  return this.beat.voice.bar.staff.capo + Note.getStringTuning(this.beat.voice.bar.staff, this.string);
6317
6317
  }
6318
6318
  static getStringTuning(staff, noteString) {
6319
- if (staff.tuning.length > 0) return staff.tuning[staff.tuning.length - (noteString - 1) - 1];
6319
+ if (staff.tuning.length > 0 && noteString >= 0) return staff.tuning[staff.tuning.length - (noteString - 1) - 1];
6320
6320
  return 0;
6321
6321
  }
6322
6322
  get realValue() {
@@ -6630,7 +6630,7 @@ class Note {
6630
6630
  if (note.isStringed) {
6631
6631
  const noteOnString = previousBeat.getNoteOnString(note.string);
6632
6632
  if (noteOnString) return noteOnString;
6633
- } else if (note.octave === -1 && note.tone === -1) {
6633
+ } else if (Number.isNaN(note.octave) && Number.isNaN(note.tone)) {
6634
6634
  if (note.index < previousBeat.notes.length) return previousBeat.notes[note.index];
6635
6635
  } else {
6636
6636
  const noteWithValue = previousBeat.getNoteWithRealValue(note.realValue);
@@ -7352,14 +7352,14 @@ class Beat {
7352
7352
  deadSlapped = false;
7353
7353
  /**
7354
7354
  * Gets or sets the chromatic tone value (0–11) of the pitch at which this rest should be displayed.
7355
- * A value of -1 means use the default position formula.
7355
+ * A value of NaN means use the default position formula.
7356
7356
  */
7357
- restDisplayTone = -1;
7357
+ restDisplayTone = NaN;
7358
7358
  /**
7359
7359
  * Gets or sets the octave at which this rest should be displayed.
7360
- * Only relevant when {@link restDisplayTone} is set. -1 means use the default position formula.
7360
+ * Only relevant when {@link restDisplayTone} is set. NaN means use the default position formula.
7361
7361
  */
7362
- restDisplayOctave = -1;
7362
+ restDisplayOctave = NaN;
7363
7363
  /**
7364
7364
  * Gets or sets the brush type applied to the notes of this beat.
7365
7365
  */
@@ -7660,13 +7660,13 @@ class Beat {
7660
7660
  note.beat = this;
7661
7661
  note.index = this.notes.length;
7662
7662
  this.notes.push(note);
7663
- if (note.isStringed) this.noteStringLookup.set(note.string, note);
7663
+ if (note.string >= 0) this.noteStringLookup.set(note.string, note);
7664
7664
  }
7665
7665
  removeNote(note) {
7666
7666
  const index = this.notes.indexOf(note);
7667
7667
  if (index >= 0) {
7668
7668
  this.notes.splice(index, 1);
7669
- if (note.isStringed) this.noteStringLookup.delete(note.string);
7669
+ if (note.string >= 0) this.noteStringLookup.delete(note.string);
7670
7670
  }
7671
7671
  }
7672
7672
  getAutomation(type) {
@@ -8534,10 +8534,10 @@ class AlphaTex1LanguageDefinitions {
8534
8534
  }
8535
8535
  static scoreMetaDataSignatures = AlphaTex1LanguageDefinitions._signatures([
8536
8536
  ["title", [[
8537
- [[17, 10], 0],
8538
- [[17], 1],
8537
+ [[107, 100], 0],
8538
+ [[107], 1],
8539
8539
  [
8540
- [10, 17],
8540
+ [100, 107],
8541
8541
  1,
8542
8542
  [
8543
8543
  "left",
@@ -8547,10 +8547,10 @@ class AlphaTex1LanguageDefinitions {
8547
8547
  ]
8548
8548
  ]]],
8549
8549
  ["subtitle", [[
8550
- [[17, 10], 0],
8551
- [[17], 1],
8550
+ [[107, 100], 0],
8551
+ [[107], 1],
8552
8552
  [
8553
- [10, 17],
8553
+ [100, 107],
8554
8554
  1,
8555
8555
  [
8556
8556
  "left",
@@ -8560,10 +8560,10 @@ class AlphaTex1LanguageDefinitions {
8560
8560
  ]
8561
8561
  ]]],
8562
8562
  ["artist", [[
8563
- [[17, 10], 0],
8564
- [[17], 1],
8563
+ [[107, 100], 0],
8564
+ [[107], 1],
8565
8565
  [
8566
- [10, 17],
8566
+ [100, 107],
8567
8567
  1,
8568
8568
  [
8569
8569
  "left",
@@ -8573,10 +8573,10 @@ class AlphaTex1LanguageDefinitions {
8573
8573
  ]
8574
8574
  ]]],
8575
8575
  ["album", [[
8576
- [[17, 10], 0],
8577
- [[17], 1],
8576
+ [[107, 100], 0],
8577
+ [[107], 1],
8578
8578
  [
8579
- [10, 17],
8579
+ [100, 107],
8580
8580
  1,
8581
8581
  [
8582
8582
  "left",
@@ -8586,10 +8586,10 @@ class AlphaTex1LanguageDefinitions {
8586
8586
  ]
8587
8587
  ]]],
8588
8588
  ["words", [[
8589
- [[17, 10], 0],
8590
- [[17], 1],
8589
+ [[107, 100], 0],
8590
+ [[107], 1],
8591
8591
  [
8592
- [10, 17],
8592
+ [100, 107],
8593
8593
  1,
8594
8594
  [
8595
8595
  "left",
@@ -8599,10 +8599,10 @@ class AlphaTex1LanguageDefinitions {
8599
8599
  ]
8600
8600
  ]]],
8601
8601
  ["music", [[
8602
- [[17, 10], 0],
8603
- [[17], 1],
8602
+ [[107, 100], 0],
8603
+ [[107], 1],
8604
8604
  [
8605
- [10, 17],
8605
+ [100, 107],
8606
8606
  1,
8607
8607
  [
8608
8608
  "left",
@@ -8611,8 +8611,8 @@ class AlphaTex1LanguageDefinitions {
8611
8611
  ]
8612
8612
  ]
8613
8613
  ]]],
8614
- ["wordsandmusic", [[[[17], 0], [
8615
- [10, 17],
8614
+ ["wordsandmusic", [[[[107], 0], [
8615
+ [100, 107],
8616
8616
  1,
8617
8617
  [
8618
8618
  "left",
@@ -8621,10 +8621,10 @@ class AlphaTex1LanguageDefinitions {
8621
8621
  ]
8622
8622
  ]]]],
8623
8623
  ["copyright", [[
8624
- [[17, 10], 0],
8625
- [[17], 1],
8624
+ [[107, 100], 0],
8625
+ [[107], 1],
8626
8626
  [
8627
- [10, 17],
8627
+ [100, 107],
8628
8628
  1,
8629
8629
  [
8630
8630
  "left",
@@ -8633,8 +8633,8 @@ class AlphaTex1LanguageDefinitions {
8633
8633
  ]
8634
8634
  ]
8635
8635
  ]]],
8636
- ["copyright2", [[[[17], 0], [
8637
- [10, 17],
8636
+ ["copyright2", [[[[107], 0], [
8637
+ [100, 107],
8638
8638
  1,
8639
8639
  [
8640
8640
  "left",
@@ -8642,13 +8642,13 @@ class AlphaTex1LanguageDefinitions {
8642
8642
  "right"
8643
8643
  ]
8644
8644
  ]]]],
8645
- ["instructions", [[[[17, 10], 0]]]],
8646
- ["notices", [[[[17, 10], 0]]]],
8645
+ ["instructions", [[[[107, 100], 0]]]],
8646
+ ["notices", [[[[107, 100], 0]]]],
8647
8647
  ["tab", [[
8648
- [[17, 10], 0],
8649
- [[17], 1],
8648
+ [[107, 100], 0],
8649
+ [[107], 1],
8650
8650
  [
8651
- [10, 17],
8651
+ [100, 107],
8652
8652
  1,
8653
8653
  [
8654
8654
  "left",
@@ -8657,19 +8657,19 @@ class AlphaTex1LanguageDefinitions {
8657
8657
  ]
8658
8658
  ]
8659
8659
  ]]],
8660
- ["systemslayout", [[[[16], 5]]]],
8661
- ["defaultsystemslayout", [[[[16], 0]]]],
8660
+ ["systemslayout", [[[[106], 5]]]],
8661
+ ["defaultsystemslayout", [[[[106], 0]]]],
8662
8662
  ["showdynamics", null],
8663
8663
  ["hidedynamics", null],
8664
8664
  ["usesystemsignseparator", null],
8665
8665
  ["tuningdisplaymode", [[[
8666
- [10, 17],
8666
+ [100, 107],
8667
8667
  0,
8668
8668
  ["score", "staff"]
8669
8669
  ]]]],
8670
8670
  ["multibarrest", null],
8671
8671
  ["bracketextendmode", [[[
8672
- [10, 17],
8672
+ [100, 107],
8673
8673
  0,
8674
8674
  [
8675
8675
  "nobrackets",
@@ -8678,7 +8678,7 @@ class AlphaTex1LanguageDefinitions {
8678
8678
  ]
8679
8679
  ]]]],
8680
8680
  ["singletracktracknamepolicy", [[[
8681
- [10, 17],
8681
+ [100, 107],
8682
8682
  0,
8683
8683
  [
8684
8684
  "hidden",
@@ -8687,7 +8687,7 @@ class AlphaTex1LanguageDefinitions {
8687
8687
  ]
8688
8688
  ]]]],
8689
8689
  ["multitracktracknamepolicy", [[[
8690
- [10, 17],
8690
+ [100, 107],
8691
8691
  0,
8692
8692
  [
8693
8693
  "hidden",
@@ -8696,28 +8696,28 @@ class AlphaTex1LanguageDefinitions {
8696
8696
  ]
8697
8697
  ]]]],
8698
8698
  ["firstsystemtracknamemode", [[[
8699
- [10, 17],
8699
+ [100, 107],
8700
8700
  0,
8701
8701
  ["fullname", "shortname"]
8702
8702
  ]]]],
8703
8703
  ["othersystemstracknamemode", [[[
8704
- [10, 17],
8704
+ [100, 107],
8705
8705
  0,
8706
8706
  ["fullname", "shortname"]
8707
8707
  ]]]],
8708
8708
  ["firstsystemtracknameorientation", [[[
8709
- [10, 17],
8709
+ [100, 107],
8710
8710
  0,
8711
8711
  ["horizontal", "vertical"]
8712
8712
  ]]]],
8713
8713
  ["othersystemstracknameorientation", [[[
8714
- [10, 17],
8714
+ [100, 107],
8715
8715
  0,
8716
8716
  ["horizontal", "vertical"]
8717
8717
  ]]]],
8718
8718
  ["extendbarlines", null],
8719
8719
  ["chorddiagramsinscore", [[[
8720
- [10],
8720
+ [100],
8721
8721
  1,
8722
8722
  ["true", "false"]
8723
8723
  ]]]],
@@ -8725,7 +8725,7 @@ class AlphaTex1LanguageDefinitions {
8725
8725
  ["hideemptystavesinfirstsystem", null],
8726
8726
  ["showsinglestaffbrackets", null],
8727
8727
  ["defaultbarnumberdisplay", [[[
8728
- [10, 17],
8728
+ [100, 107],
8729
8729
  0,
8730
8730
  [
8731
8731
  "allbars",
@@ -8736,54 +8736,54 @@ class AlphaTex1LanguageDefinitions {
8736
8736
  ]);
8737
8737
  static staffMetaDataSignatures = AlphaTex1LanguageDefinitions._signatures([
8738
8738
  ["tuning", [[[
8739
- [10, 17],
8739
+ [100, 107],
8740
8740
  0,
8741
8741
  [
8742
8742
  "piano",
8743
8743
  "none",
8744
8744
  "voice"
8745
8745
  ]
8746
- ]], [[[10, 17], 5]]]],
8747
- ["chord", [[[[17, 10], 0], [[
8748
- 10,
8749
- 17,
8750
- 16
8746
+ ]], [[[100, 107], 5]]]],
8747
+ ["chord", [[[[107, 100], 0], [[
8748
+ 100,
8749
+ 107,
8750
+ 106
8751
8751
  ], 5]]]],
8752
- ["capo", [[[[16], 0]]]],
8753
- ["lyrics", [[[[17], 0]], [[[16], 0], [[17], 0]]]],
8752
+ ["capo", [[[[106], 0]]]],
8753
+ ["lyrics", [[[[107], 0]], [[[106], 0], [[107], 0]]]],
8754
8754
  ["articulation", [[[
8755
- [10],
8755
+ [100],
8756
8756
  0,
8757
8757
  ["defaults"]
8758
- ]], [[[17, 10], 0], [[16], 0]]]],
8759
- ["displaytranspose", [[[[16], 0]]]],
8760
- ["transpose", [[[[16], 0]]]],
8758
+ ]], [[[107, 100], 0], [[106], 0]]]],
8759
+ ["displaytranspose", [[[[106], 0]]]],
8760
+ ["transpose", [[[[106], 0]]]],
8761
8761
  ["instrument", [
8762
- [[[16], 0]],
8763
- [[[17, 10], 0]],
8762
+ [[[106], 0]],
8763
+ [[[107, 100], 0]],
8764
8764
  [[
8765
- [10],
8765
+ [100],
8766
8766
  0,
8767
8767
  ["percussion"]
8768
8768
  ]]
8769
8769
  ]]
8770
8770
  ]);
8771
8771
  static structuralMetaDataSignatures = AlphaTex1LanguageDefinitions._signatures([
8772
- ["track", [[[[17], 1], [[17], 1]]]],
8772
+ ["track", [[[[107], 1], [[107], 1]]]],
8773
8773
  ["staff", null],
8774
8774
  ["voice", null]
8775
8775
  ]);
8776
8776
  static barMetaDataSignatures = AlphaTex1LanguageDefinitions._signatures([
8777
8777
  ["ts", [[[
8778
- [10, 17],
8778
+ [100, 107],
8779
8779
  0,
8780
8780
  ["common"]
8781
- ]], [[[16], 0], [[16], 0]]]],
8781
+ ]], [[[106], 0], [[106], 0]]]],
8782
8782
  ["ro", null],
8783
- ["rc", [[[[16], 0]]]],
8784
- ["ae", [[[[16, 13], 4]]]],
8783
+ ["rc", [[[[106], 0]]]],
8784
+ ["ae", [[[[106, 103], 4]]]],
8785
8785
  ["ks", [[[
8786
- [10, 17],
8786
+ [100, 107],
8787
8787
  0,
8788
8788
  [
8789
8789
  "cb",
@@ -8837,9 +8837,9 @@ class AlphaTex1LanguageDefinitions {
8837
8837
  ]]]],
8838
8838
  ["clef", [[[
8839
8839
  [
8840
- 10,
8841
- 16,
8842
- 17
8840
+ 100,
8841
+ 106,
8842
+ 107
8843
8843
  ],
8844
8844
  0,
8845
8845
  [
@@ -8856,7 +8856,7 @@ class AlphaTex1LanguageDefinitions {
8856
8856
  ]
8857
8857
  ]]]],
8858
8858
  ["ottava", [[[
8859
- [10, 17],
8859
+ [100, 107],
8860
8860
  0,
8861
8861
  [
8862
8862
  "15ma",
@@ -8870,22 +8870,22 @@ class AlphaTex1LanguageDefinitions {
8870
8870
  "15mb"
8871
8871
  ]
8872
8872
  ]]]],
8873
- ["tempo", [[[[16], 2], [[17], 1]], [
8873
+ ["tempo", [[[[106], 2], [[107], 1]], [
8874
8874
  null,
8875
- [[16], 2],
8876
- [[17], 0],
8877
- [[16], 1],
8875
+ [[106], 2],
8876
+ [[107], 0],
8877
+ [[106], 1],
8878
8878
  [
8879
- [10],
8879
+ [100],
8880
8880
  1,
8881
8881
  ["hide"]
8882
8882
  ]
8883
8883
  ]]],
8884
8884
  ["tf", [[[
8885
8885
  [
8886
- 10,
8887
- 16,
8888
- 17
8886
+ 100,
8887
+ 106,
8888
+ 107
8889
8889
  ],
8890
8890
  0,
8891
8891
  [
@@ -8914,8 +8914,8 @@ class AlphaTex1LanguageDefinitions {
8914
8914
  ]
8915
8915
  ]]]],
8916
8916
  ["ac", null],
8917
- ["section", [[[[17, 10], 0]], [[[17, 10], 0], [
8918
- [17, 10],
8917
+ ["section", [[[[107, 100], 0]], [[[107, 100], 0], [
8918
+ [107, 100],
8919
8919
  0,
8920
8920
  null,
8921
8921
  [
@@ -8925,7 +8925,7 @@ class AlphaTex1LanguageDefinitions {
8925
8925
  ]
8926
8926
  ]]]],
8927
8927
  ["jump", [[[
8928
- [10, 17],
8928
+ [100, 107],
8929
8929
  0,
8930
8930
  [
8931
8931
  "fine",
@@ -8951,7 +8951,7 @@ class AlphaTex1LanguageDefinitions {
8951
8951
  ]]]],
8952
8952
  ["ft", null],
8953
8953
  ["simile", [[[
8954
- [10, 17],
8954
+ [100, 107],
8955
8955
  0,
8956
8956
  [
8957
8957
  "none",
@@ -8961,7 +8961,7 @@ class AlphaTex1LanguageDefinitions {
8961
8961
  ]
8962
8962
  ]]]],
8963
8963
  ["barlineleft", [[[
8964
- [10, 17],
8964
+ [100, 107],
8965
8965
  0,
8966
8966
  [
8967
8967
  "automatic",
@@ -8979,7 +8979,7 @@ class AlphaTex1LanguageDefinitions {
8979
8979
  ]
8980
8980
  ]]]],
8981
8981
  ["barlineright", [[[
8982
- [10, 17],
8982
+ [100, 107],
8983
8983
  0,
8984
8984
  [
8985
8985
  "automatic",
@@ -8996,30 +8996,30 @@ class AlphaTex1LanguageDefinitions {
8996
8996
  "tick"
8997
8997
  ]
8998
8998
  ]]]],
8999
- ["scale", [[[[16], 2]]]],
9000
- ["width", [[[[16], 2]]]],
8999
+ ["scale", [[[[106], 2]]]],
9000
+ ["width", [[[[106], 2]]]],
9001
9001
  ["sync", [[
9002
- [[16], 0],
9003
- [[16], 0],
9004
- [[16], 0],
9005
- [[16], 3]
9002
+ [[106], 0],
9003
+ [[106], 0],
9004
+ [[106], 0],
9005
+ [[106], 3]
9006
9006
  ]]],
9007
9007
  ["accidentals", [[[
9008
- [10, 17],
9008
+ [100, 107],
9009
9009
  0,
9010
9010
  ["auto", "explicit"]
9011
9011
  ]]]],
9012
- ["spd", [[[[16], 2]]]],
9013
- ["sph", [[[[16], 2]]]],
9014
- ["spu", [[[[16], 2]]]],
9012
+ ["spd", [[[[106], 2]]]],
9013
+ ["sph", [[[[106], 2]]]],
9014
+ ["spu", [[[[106], 2]]]],
9015
9015
  ["db", null],
9016
9016
  ["voicemode", [[[
9017
- [10, 17],
9017
+ [100, 107],
9018
9018
  0,
9019
9019
  ["staffwise", "barwise"]
9020
9020
  ]]]],
9021
9021
  ["barnumberdisplay", [[[
9022
- [10, 17],
9022
+ [100, 107],
9023
9023
  0,
9024
9024
  [
9025
9025
  "allbars",
@@ -9027,31 +9027,31 @@ class AlphaTex1LanguageDefinitions {
9027
9027
  "hide"
9028
9028
  ]
9029
9029
  ]]]],
9030
- ["beaming", [[[[16], 0], [[16], 5]]]]
9030
+ ["beaming", [[[[106], 0], [[106], 5]]]]
9031
9031
  ]);
9032
9032
  static metaDataProperties = AlphaTex1LanguageDefinitions._metaProps([
9033
9033
  ["track", [
9034
- ["color", [[[[17], 0]]]],
9035
- ["systemslayout", [[[[16], 5]]]],
9036
- ["defaultsystemslayout", [[[[16], 0]]]],
9034
+ ["color", [[[[107], 0]]]],
9035
+ ["systemslayout", [[[[106], 5]]]],
9036
+ ["defaultsystemslayout", [[[[106], 0]]]],
9037
9037
  ["solo", null],
9038
9038
  ["mute", null],
9039
- ["volume", [[[[16], 0]]]],
9040
- ["balance", [[[[16], 0]]]],
9039
+ ["volume", [[[[106], 0]]]],
9040
+ ["balance", [[[[106], 0]]]],
9041
9041
  ["instrument", [
9042
- [[[16], 0]],
9043
- [[[17, 10], 0]],
9042
+ [[[106], 0]],
9043
+ [[[107, 100], 0]],
9044
9044
  [[
9045
- [10],
9045
+ [100],
9046
9046
  0,
9047
9047
  ["percussion"]
9048
9048
  ]]
9049
9049
  ]],
9050
- ["bank", [[[[16], 0]]]],
9050
+ ["bank", [[[[106], 0]]]],
9051
9051
  ["multibarrest", null]
9052
9052
  ]],
9053
9053
  ["staff", [
9054
- ["score", [[[[16], 1]]]],
9054
+ ["score", [[[[106], 1]]]],
9055
9055
  ["tabs", null],
9056
9056
  ["slash", null],
9057
9057
  ["numbered", null]
@@ -9089,24 +9089,24 @@ class AlphaTex1LanguageDefinitions {
9089
9089
  ["hideemptystavesinfirstsystem", null],
9090
9090
  ["showsinglestaffbrackets", null],
9091
9091
  ["defaultbarnumberdisplay", null],
9092
- ["tuning", [["hide", null], ["label", [[[[17], 0]]]]]],
9092
+ ["tuning", [["hide", null], ["label", [[[[107], 0]]]]]],
9093
9093
  ["chord", [
9094
- ["firstfret", [[[[16], 0]]]],
9095
- ["barre", [[[[16], 5]]]],
9094
+ ["firstfret", [[[[106], 0]]]],
9095
+ ["barre", [[[[106], 5]]]],
9096
9096
  ["showdiagram", [
9097
9097
  [],
9098
9098
  [[
9099
- [17],
9099
+ [107],
9100
9100
  0,
9101
9101
  ["true", "false"]
9102
9102
  ]],
9103
9103
  [[
9104
- [10],
9104
+ [100],
9105
9105
  0,
9106
9106
  ["true", "false"]
9107
9107
  ]],
9108
9108
  [[
9109
- [16],
9109
+ [106],
9110
9110
  0,
9111
9111
  ["1", "0"]
9112
9112
  ]]
@@ -9114,17 +9114,17 @@ class AlphaTex1LanguageDefinitions {
9114
9114
  ["showfingering", [
9115
9115
  [],
9116
9116
  [[
9117
- [17],
9117
+ [107],
9118
9118
  0,
9119
9119
  ["true", "false"]
9120
9120
  ]],
9121
9121
  [[
9122
- [10],
9122
+ [100],
9123
9123
  0,
9124
9124
  ["true", "false"]
9125
9125
  ]],
9126
9126
  [[
9127
- [16],
9127
+ [106],
9128
9128
  0,
9129
9129
  ["1", "0"]
9130
9130
  ]]
@@ -9132,17 +9132,17 @@ class AlphaTex1LanguageDefinitions {
9132
9132
  ["showname", [
9133
9133
  [],
9134
9134
  [[
9135
- [17],
9135
+ [107],
9136
9136
  0,
9137
9137
  ["true", "false"]
9138
9138
  ]],
9139
9139
  [[
9140
- [10],
9140
+ [100],
9141
9141
  0,
9142
9142
  ["true", "false"]
9143
9143
  ]],
9144
9144
  [[
9145
- [16],
9145
+ [106],
9146
9146
  0,
9147
9147
  ["1", "0"]
9148
9148
  ]]
@@ -9189,7 +9189,7 @@ class AlphaTex1LanguageDefinitions {
9189
9189
  AlphaTex1LanguageDefinitions.barMetaDataSignatures
9190
9190
  ];
9191
9191
  static durationChangeProperties = AlphaTex1LanguageDefinitions._props([["tu", [[[
9192
- [16],
9192
+ [106],
9193
9193
  0,
9194
9194
  [
9195
9195
  "3",
@@ -9200,7 +9200,7 @@ class AlphaTex1LanguageDefinitions {
9200
9200
  "10",
9201
9201
  "12"
9202
9202
  ]
9203
- ]], [[[16], 0], [[16], 0]]]]]);
9203
+ ]], [[[106], 0], [[106], 0]]]]]);
9204
9204
  static beatProperties = AlphaTex1LanguageDefinitions._props([
9205
9205
  ["f", null],
9206
9206
  ["fo", null],
@@ -9229,7 +9229,7 @@ class AlphaTex1LanguageDefinitions {
9229
9229
  ["legatoorigin", null],
9230
9230
  ["timer", null],
9231
9231
  ["tu", [[[
9232
- [16],
9232
+ [106],
9233
9233
  0,
9234
9234
  [
9235
9235
  "3",
@@ -9240,14 +9240,13 @@ class AlphaTex1LanguageDefinitions {
9240
9240
  "10",
9241
9241
  "12"
9242
9242
  ]
9243
- ]], [[[16], 0], [[16], 0]]]],
9244
- ["txt", [[[[17, 10], 0]]]],
9245
- ["restdisplaypitch", [[[[10, 17], 0]]]],
9246
- ["lyrics", [[[[17], 0]], [[[16], 0], [[17], 0]]]],
9243
+ ]], [[[106], 0], [[106], 0]]]],
9244
+ ["txt", [[[[107, 100], 0]]]],
9245
+ ["lyrics", [[[[107], 0]], [[[106], 0], [[107], 0]]]],
9247
9246
  ["tb", [
9248
- [[[16], 5]],
9247
+ [[[106], 5]],
9249
9248
  [[
9250
- [10, 17],
9249
+ [100, 107],
9251
9250
  0,
9252
9251
  [
9253
9252
  "custom",
@@ -9257,19 +9256,19 @@ class AlphaTex1LanguageDefinitions {
9257
9256
  "predive",
9258
9257
  "predivedive"
9259
9258
  ]
9260
- ], [[16], 5]],
9259
+ ], [[106], 5]],
9261
9260
  [[
9262
- [10, 17],
9261
+ [100, 107],
9263
9262
  0,
9264
9263
  [
9265
9264
  "default",
9266
9265
  "gradual",
9267
9266
  "fast"
9268
9267
  ]
9269
- ], [[16], 5]],
9268
+ ], [[106], 5]],
9270
9269
  [
9271
9270
  [
9272
- [10, 17],
9271
+ [100, 107],
9273
9272
  0,
9274
9273
  [
9275
9274
  "custom",
@@ -9281,7 +9280,7 @@ class AlphaTex1LanguageDefinitions {
9281
9280
  ]
9282
9281
  ],
9283
9282
  [
9284
- [10, 17],
9283
+ [100, 107],
9285
9284
  0,
9286
9285
  [
9287
9286
  "default",
@@ -9289,13 +9288,13 @@ class AlphaTex1LanguageDefinitions {
9289
9288
  "fast"
9290
9289
  ]
9291
9290
  ],
9292
- [[16], 5]
9291
+ [[106], 5]
9293
9292
  ]
9294
9293
  ]],
9295
9294
  ["tbe", [
9296
- [[[16], 5]],
9295
+ [[[106], 5]],
9297
9296
  [[
9298
- [10, 17],
9297
+ [100, 107],
9299
9298
  0,
9300
9299
  [
9301
9300
  "custom",
@@ -9305,19 +9304,19 @@ class AlphaTex1LanguageDefinitions {
9305
9304
  "predive",
9306
9305
  "predivedive"
9307
9306
  ]
9308
- ], [[16], 5]],
9307
+ ], [[106], 5]],
9309
9308
  [[
9310
- [10, 17],
9309
+ [100, 107],
9311
9310
  0,
9312
9311
  [
9313
9312
  "default",
9314
9313
  "gradual",
9315
9314
  "fast"
9316
9315
  ]
9317
- ], [[16], 5]],
9316
+ ], [[106], 5]],
9318
9317
  [
9319
9318
  [
9320
- [10, 17],
9319
+ [100, 107],
9321
9320
  0,
9322
9321
  [
9323
9322
  "custom",
@@ -9329,7 +9328,7 @@ class AlphaTex1LanguageDefinitions {
9329
9328
  ]
9330
9329
  ],
9331
9330
  [
9332
- [10, 17],
9331
+ [100, 107],
9333
9332
  0,
9334
9333
  [
9335
9334
  "default",
@@ -9337,16 +9336,16 @@ class AlphaTex1LanguageDefinitions {
9337
9336
  "fast"
9338
9337
  ]
9339
9338
  ],
9340
- [[16], 5]
9339
+ [[106], 5]
9341
9340
  ]
9342
9341
  ]],
9343
- ["bu", [[[[16], 1]]]],
9344
- ["bd", [[[[16], 1]]]],
9345
- ["au", [[[[16], 1]]]],
9346
- ["ad", [[[[16], 1]]]],
9347
- ["ch", [[[[17, 10], 0]]]],
9342
+ ["bu", [[[[106], 1]]]],
9343
+ ["bd", [[[[106], 1]]]],
9344
+ ["au", [[[[106], 1]]]],
9345
+ ["ad", [[[[106], 1]]]],
9346
+ ["ch", [[[[107, 100], 0]]]],
9348
9347
  ["gr", [[[
9349
- [10, 17],
9348
+ [100, 107],
9350
9349
  1,
9351
9350
  [
9352
9351
  "onbeat",
@@ -9358,7 +9357,7 @@ class AlphaTex1LanguageDefinitions {
9358
9357
  ]
9359
9358
  ]]]],
9360
9359
  ["dy", [[[
9361
- [10, 17],
9360
+ [100, 107],
9362
9361
  0,
9363
9362
  [
9364
9363
  "ppp",
@@ -9389,33 +9388,33 @@ class AlphaTex1LanguageDefinitions {
9389
9388
  "sfzp"
9390
9389
  ]
9391
9390
  ]]]],
9392
- ["tempo", [[[[16], 0], [
9393
- [10],
9391
+ ["tempo", [[[[106], 0], [
9392
+ [100],
9394
9393
  1,
9395
9394
  ["hide"]
9396
9395
  ]], [
9397
- [[16], 0],
9398
- [[17], 0],
9396
+ [[106], 0],
9397
+ [[107], 0],
9399
9398
  [
9400
- [10],
9399
+ [100],
9401
9400
  1,
9402
9401
  ["hide"]
9403
9402
  ]
9404
9403
  ]]],
9405
- ["volume", [[[[16], 0]]]],
9406
- ["balance", [[[[16], 0]]]],
9407
- ["tp", [[[[16], 0], [
9408
- [10, 17],
9404
+ ["volume", [[[[106], 0]]]],
9405
+ ["balance", [[[[106], 0]]]],
9406
+ ["tp", [[[[106], 0], [
9407
+ [100, 107],
9409
9408
  1,
9410
9409
  ["default", "buzzroll"]
9411
9410
  ]]]],
9412
- ["barre", [[[[16], 0], [
9413
- [10, 17],
9411
+ ["barre", [[[[106], 0], [
9412
+ [100, 107],
9414
9413
  1,
9415
9414
  ["full", "half"]
9416
9415
  ]]]],
9417
9416
  ["rasg", [[[
9418
- [10, 17],
9417
+ [100, 107],
9419
9418
  0,
9420
9419
  [
9421
9420
  "ii",
@@ -9439,7 +9438,7 @@ class AlphaTex1LanguageDefinitions {
9439
9438
  ]
9440
9439
  ]]]],
9441
9440
  ["ot", [[[
9442
- [10, 17],
9441
+ [100, 107],
9443
9442
  0,
9444
9443
  [
9445
9444
  "15ma",
@@ -9454,26 +9453,26 @@ class AlphaTex1LanguageDefinitions {
9454
9453
  ]
9455
9454
  ]]]],
9456
9455
  ["instrument", [
9457
- [[[16], 0]],
9458
- [[[17, 10], 0]],
9456
+ [[[106], 0]],
9457
+ [[[107, 100], 0]],
9459
9458
  [[
9460
- [10],
9459
+ [100],
9461
9460
  0,
9462
9461
  ["percussion"]
9463
9462
  ]]
9464
9463
  ]],
9465
- ["bank", [[[[16], 0]]]],
9464
+ ["bank", [[[[106], 0]]]],
9466
9465
  ["fermata", [[[
9467
- [10, 17],
9466
+ [100, 107],
9468
9467
  0,
9469
9468
  [
9470
9469
  "short",
9471
9470
  "medium",
9472
9471
  "long"
9473
9472
  ]
9474
- ], [[16], 3]]]],
9473
+ ], [[106], 3]]]],
9475
9474
  ["beam", [[[
9476
- [10, 17],
9475
+ [100, 107],
9477
9476
  0,
9478
9477
  [
9479
9478
  "invert",
@@ -9484,15 +9483,16 @@ class AlphaTex1LanguageDefinitions {
9484
9483
  "merge",
9485
9484
  "splitsecondary"
9486
9485
  ]
9487
- ]]]]
9486
+ ]]]],
9487
+ ["restdisplaypitch", [[[[100], 0]]]]
9488
9488
  ]);
9489
9489
  static noteProperties = AlphaTex1LanguageDefinitions._props([
9490
9490
  ["nh", null],
9491
- ["ah", [[[[16], 1]]]],
9492
- ["th", [[[[16], 1]]]],
9493
- ["ph", [[[[16], 1]]]],
9494
- ["sh", [[[[16], 1]]]],
9495
- ["fh", [[[[16], 1]]]],
9491
+ ["ah", [[[[106], 1]]]],
9492
+ ["th", [[[[106], 1]]]],
9493
+ ["ph", [[[[106], 1]]]],
9494
+ ["sh", [[[[106], 1]]]],
9495
+ ["fh", [[[[106], 1]]]],
9496
9496
  ["v", null],
9497
9497
  ["vw", null],
9498
9498
  ["sl", null],
@@ -9509,8 +9509,8 @@ class AlphaTex1LanguageDefinitions {
9509
9509
  ["ac", null],
9510
9510
  ["hac", null],
9511
9511
  ["ten", null],
9512
- ["tr", [[[[16], 0], [
9513
- [16],
9512
+ ["tr", [[[[106], 0], [
9513
+ [106],
9514
9514
  1,
9515
9515
  [
9516
9516
  "16",
@@ -9530,9 +9530,9 @@ class AlphaTex1LanguageDefinitions {
9530
9530
  ["string", null],
9531
9531
  ["hide", null],
9532
9532
  ["b", [
9533
- [[[16], 5]],
9533
+ [[[106], 5]],
9534
9534
  [[
9535
- [10, 17],
9535
+ [100, 107],
9536
9536
  0,
9537
9537
  [
9538
9538
  "custom",
@@ -9544,19 +9544,19 @@ class AlphaTex1LanguageDefinitions {
9544
9544
  "prebendbend",
9545
9545
  "prebendrelease"
9546
9546
  ]
9547
- ], [[16], 5]],
9547
+ ], [[106], 5]],
9548
9548
  [[
9549
- [10, 17],
9549
+ [100, 107],
9550
9550
  0,
9551
9551
  [
9552
9552
  "default",
9553
9553
  "gradual",
9554
9554
  "fast"
9555
9555
  ]
9556
- ], [[16], 5]],
9556
+ ], [[106], 5]],
9557
9557
  [
9558
9558
  [
9559
- [10, 17],
9559
+ [100, 107],
9560
9560
  0,
9561
9561
  [
9562
9562
  "custom",
@@ -9570,7 +9570,7 @@ class AlphaTex1LanguageDefinitions {
9570
9570
  ]
9571
9571
  ],
9572
9572
  [
9573
- [10, 17],
9573
+ [100, 107],
9574
9574
  0,
9575
9575
  [
9576
9576
  "default",
@@ -9578,13 +9578,13 @@ class AlphaTex1LanguageDefinitions {
9578
9578
  "fast"
9579
9579
  ]
9580
9580
  ],
9581
- [[16], 5]
9581
+ [[106], 5]
9582
9582
  ]
9583
9583
  ]],
9584
9584
  ["be", [
9585
- [[[16], 5]],
9585
+ [[[106], 5]],
9586
9586
  [[
9587
- [10, 17],
9587
+ [100, 107],
9588
9588
  0,
9589
9589
  [
9590
9590
  "custom",
@@ -9596,19 +9596,19 @@ class AlphaTex1LanguageDefinitions {
9596
9596
  "prebendbend",
9597
9597
  "prebendrelease"
9598
9598
  ]
9599
- ], [[16], 5]],
9599
+ ], [[106], 5]],
9600
9600
  [[
9601
- [10, 17],
9601
+ [100, 107],
9602
9602
  0,
9603
9603
  [
9604
9604
  "default",
9605
9605
  "gradual",
9606
9606
  "fast"
9607
9607
  ]
9608
- ], [[16], 5]],
9608
+ ], [[106], 5]],
9609
9609
  [
9610
9610
  [
9611
- [10, 17],
9611
+ [100, 107],
9612
9612
  0,
9613
9613
  [
9614
9614
  "custom",
@@ -9622,7 +9622,7 @@ class AlphaTex1LanguageDefinitions {
9622
9622
  ]
9623
9623
  ],
9624
9624
  [
9625
- [10, 17],
9625
+ [100, 107],
9626
9626
  0,
9627
9627
  [
9628
9628
  "default",
@@ -9630,11 +9630,11 @@ class AlphaTex1LanguageDefinitions {
9630
9630
  "fast"
9631
9631
  ]
9632
9632
  ],
9633
- [[16], 5]
9633
+ [[106], 5]
9634
9634
  ]
9635
9635
  ]],
9636
9636
  ["lf", [[[
9637
- [16],
9637
+ [106],
9638
9638
  0,
9639
9639
  [
9640
9640
  "1",
@@ -9645,7 +9645,7 @@ class AlphaTex1LanguageDefinitions {
9645
9645
  ]
9646
9646
  ]]]],
9647
9647
  ["rf", [[[
9648
- [16],
9648
+ [106],
9649
9649
  0,
9650
9650
  [
9651
9651
  "1",
@@ -9656,7 +9656,7 @@ class AlphaTex1LanguageDefinitions {
9656
9656
  ]
9657
9657
  ]]]],
9658
9658
  ["acc", [[[
9659
- [10, 17],
9659
+ [100, 107],
9660
9660
  0,
9661
9661
  [
9662
9662
  "default",
@@ -9676,7 +9676,7 @@ class AlphaTex1LanguageDefinitions {
9676
9676
  "bb"
9677
9677
  ]
9678
9678
  ]]]],
9679
- ["slur", [[[[17], 0]], [[[10], 0]]]],
9679
+ ["slur", [[[[107], 0]], [[[100], 0]]]],
9680
9680
  ["-", null]
9681
9681
  ]);
9682
9682
  }
@@ -9697,20 +9697,21 @@ var AlphaTexNodeType = /* @__PURE__ */ function(AlphaTexNodeType) {
9697
9697
  AlphaTexNodeType[AlphaTexNodeType["RParen"] = 7] = "RParen";
9698
9698
  AlphaTexNodeType[AlphaTexNodeType["Colon"] = 8] = "Colon";
9699
9699
  AlphaTexNodeType[AlphaTexNodeType["Asterisk"] = 9] = "Asterisk";
9700
- AlphaTexNodeType[AlphaTexNodeType["Ident"] = 10] = "Ident";
9701
- AlphaTexNodeType[AlphaTexNodeType["Tag"] = 11] = "Tag";
9702
- AlphaTexNodeType[AlphaTexNodeType["Meta"] = 12] = "Meta";
9703
- AlphaTexNodeType[AlphaTexNodeType["Arguments"] = 13] = "Arguments";
9704
- AlphaTexNodeType[AlphaTexNodeType["Props"] = 14] = "Props";
9705
- AlphaTexNodeType[AlphaTexNodeType["Prop"] = 15] = "Prop";
9706
- AlphaTexNodeType[AlphaTexNodeType["Number"] = 16] = "Number";
9707
- AlphaTexNodeType[AlphaTexNodeType["String"] = 17] = "String";
9708
- AlphaTexNodeType[AlphaTexNodeType["Score"] = 18] = "Score";
9709
- AlphaTexNodeType[AlphaTexNodeType["Bar"] = 19] = "Bar";
9710
- AlphaTexNodeType[AlphaTexNodeType["Beat"] = 20] = "Beat";
9711
- AlphaTexNodeType[AlphaTexNodeType["Duration"] = 21] = "Duration";
9712
- AlphaTexNodeType[AlphaTexNodeType["NoteList"] = 22] = "NoteList";
9713
- AlphaTexNodeType[AlphaTexNodeType["Note"] = 23] = "Note";
9700
+ AlphaTexNodeType[AlphaTexNodeType["At"] = 10] = "At";
9701
+ AlphaTexNodeType[AlphaTexNodeType["Ident"] = 100] = "Ident";
9702
+ AlphaTexNodeType[AlphaTexNodeType["Tag"] = 101] = "Tag";
9703
+ AlphaTexNodeType[AlphaTexNodeType["Meta"] = 102] = "Meta";
9704
+ AlphaTexNodeType[AlphaTexNodeType["Arguments"] = 103] = "Arguments";
9705
+ AlphaTexNodeType[AlphaTexNodeType["Props"] = 104] = "Props";
9706
+ AlphaTexNodeType[AlphaTexNodeType["Prop"] = 105] = "Prop";
9707
+ AlphaTexNodeType[AlphaTexNodeType["Number"] = 106] = "Number";
9708
+ AlphaTexNodeType[AlphaTexNodeType["String"] = 107] = "String";
9709
+ AlphaTexNodeType[AlphaTexNodeType["Score"] = 200] = "Score";
9710
+ AlphaTexNodeType[AlphaTexNodeType["Bar"] = 201] = "Bar";
9711
+ AlphaTexNodeType[AlphaTexNodeType["Beat"] = 202] = "Beat";
9712
+ AlphaTexNodeType[AlphaTexNodeType["Duration"] = 203] = "Duration";
9713
+ AlphaTexNodeType[AlphaTexNodeType["NoteList"] = 204] = "NoteList";
9714
+ AlphaTexNodeType[AlphaTexNodeType["Note"] = 205] = "Note";
9714
9715
  return AlphaTexNodeType;
9715
9716
  }({});
9716
9717
  //#endregion
@@ -10331,6 +10332,7 @@ class AlphaTexLexer {
10331
10332
  [125, (l) => l._token({ nodeType: AlphaTexNodeType.RBrace })],
10332
10333
  [124, (l) => l._token({ nodeType: AlphaTexNodeType.Pipe })],
10333
10334
  [42, (l) => l._token({ nodeType: AlphaTexNodeType.Asterisk })],
10335
+ [64, (l) => l._token({ nodeType: AlphaTexNodeType.At })],
10334
10336
  [92, (l) => l._metaCommand()],
10335
10337
  [9, (l) => l._whitespace()],
10336
10338
  [10, (l) => l._whitespace()],
@@ -10901,12 +10903,12 @@ class AlphaTexParser {
10901
10903
  start: noteValue.start
10902
10904
  };
10903
10905
  try {
10904
- let canHaveString = false;
10906
+ let canHaveStringDot = false;
10905
10907
  switch (noteValue.nodeType) {
10906
10908
  case AlphaTexNodeType.Number:
10907
10909
  note.noteValue = noteValue;
10908
10910
  this.lexer.advance();
10909
- canHaveString = true;
10911
+ canHaveStringDot = true;
10910
10912
  break;
10911
10913
  case AlphaTexNodeType.String:
10912
10914
  note.noteValue = noteValue;
@@ -10914,7 +10916,7 @@ class AlphaTexParser {
10914
10916
  switch (note.noteValue.text) {
10915
10917
  case "x":
10916
10918
  case "-":
10917
- canHaveString = true;
10919
+ canHaveStringDot = true;
10918
10920
  break;
10919
10921
  }
10920
10922
  break;
@@ -10924,7 +10926,7 @@ class AlphaTexParser {
10924
10926
  switch (note.noteValue.text) {
10925
10927
  case "x":
10926
10928
  case "-":
10927
- canHaveString = true;
10929
+ canHaveStringDot = true;
10928
10930
  break;
10929
10931
  }
10930
10932
  break;
@@ -10936,25 +10938,23 @@ class AlphaTexParser {
10936
10938
  ], true);
10937
10939
  return;
10938
10940
  }
10939
- if (canHaveString) {
10940
- const dot = this.lexer.peekToken();
10941
- if (dot?.nodeType === AlphaTexNodeType.Dot) {
10942
- const noteStringDot = dot;
10941
+ const separator = this.lexer.peekToken();
10942
+ if (canHaveStringDot && separator?.nodeType === AlphaTexNodeType.Dot || separator?.nodeType === AlphaTexNodeType.At) {
10943
+ const noteStringSeparator = separator;
10944
+ this.lexer.advance();
10945
+ const noteString = this.lexer.peekToken();
10946
+ if (!noteString) {
10947
+ this.unexpectedToken(noteString, [AlphaTexNodeType.Number], true);
10948
+ return;
10949
+ }
10950
+ if (noteString.nodeType === AlphaTexNodeType.Tag) return note;
10951
+ else if (noteString.nodeType === AlphaTexNodeType.Number) {
10952
+ note.noteStringSeparator = noteStringSeparator;
10953
+ note.noteString = noteString;
10943
10954
  this.lexer.advance();
10944
- const noteString = this.lexer.peekToken();
10945
- if (!noteString) {
10946
- this.unexpectedToken(noteString, [AlphaTexNodeType.Number], true);
10947
- return;
10948
- }
10949
- if (noteString.nodeType === AlphaTexNodeType.Tag) return note;
10950
- else if (noteString.nodeType === AlphaTexNodeType.Number) {
10951
- note.noteStringDot = noteStringDot;
10952
- note.noteString = noteString;
10953
- this.lexer.advance();
10954
- } else {
10955
- this.unexpectedToken(noteString, [AlphaTexNodeType.Number], true);
10956
- return;
10957
- }
10955
+ } else {
10956
+ this.unexpectedToken(noteString, [AlphaTexNodeType.Number], true);
10957
+ return;
10958
10958
  }
10959
10959
  }
10960
10960
  note.noteEffects = this._properties((property) => this._metaDataReader.readNotePropertyArguments(this, property));
@@ -12678,12 +12678,18 @@ class Staff {
12678
12678
  return this._filledVoices;
12679
12679
  }
12680
12680
  finish(settings, sharedDataBag = null) {
12681
+ this.stringTuning.finish();
12681
12682
  if (this.isPercussion) {
12682
- this.stringTuning.tunings = [];
12683
- this.showTablature = false;
12684
12683
  this.displayTranspositionPitch = 0;
12684
+ this.stringTuning.tunings = [
12685
+ 0,
12686
+ 0,
12687
+ 0,
12688
+ 0,
12689
+ 0,
12690
+ 0
12691
+ ];
12685
12692
  }
12686
- this.stringTuning.finish();
12687
12693
  if (this.stringTuning.tunings.length === 0) this.showTablature = false;
12688
12694
  for (let i = 0, j = this.bars.length; i < j; i++) {
12689
12695
  this.bars[i].finish(settings, sharedDataBag);
@@ -13673,7 +13679,10 @@ class AlphaTex1LanguageHandler {
13673
13679
  case AlphaTexNodeType.String:
13674
13680
  const instrumentName = args.arguments[0].text.toLowerCase();
13675
13681
  if (instrumentName === "percussion") {
13676
- for (const staff of track.staves) importer.applyStaffNoteKind(staff, AlphaTexStaffNoteKind.Articulation);
13682
+ for (const staff of track.staves) {
13683
+ staff.showTablature = false;
13684
+ importer.applyStaffNoteKind(staff, AlphaTexStaffNoteKind.Articulation);
13685
+ }
13677
13686
  track.playbackInfo.primaryChannel = SynthConstants.PercussionChannel;
13678
13687
  track.playbackInfo.secondaryChannel = SynthConstants.PercussionChannel;
13679
13688
  } else track.playbackInfo.program = GeneralMidi.getValue(instrumentName);
@@ -15604,10 +15613,10 @@ class AlphaTexImporter extends ScoreImporter {
15604
15613
  _note(beat, node) {
15605
15614
  let isDead = false;
15606
15615
  let isTie = false;
15607
- let numericValue = -1;
15616
+ let numericValue = NaN;
15608
15617
  let articulationValue = "";
15609
- let octave = -1;
15610
- let tone = -1;
15618
+ let octave = NaN;
15619
+ let tone = NaN;
15611
15620
  let accidentalMode = NoteAccidentalMode.Default;
15612
15621
  const noteValue = node.noteValue;
15613
15622
  let detectedNoteKind = void 0;
@@ -15625,7 +15634,7 @@ class AlphaTexImporter extends ScoreImporter {
15625
15634
  isTie = str === "-";
15626
15635
  if (isTie || isDead) {
15627
15636
  numericValue = 0;
15628
- if (node.noteStringDot && node.noteString) detectedNoteKind = AlphaTexStaffNoteKind.Fretted;
15637
+ if (node.noteStringSeparator && node.noteString) detectedNoteKind = AlphaTexStaffNoteKind.Fretted;
15629
15638
  else detectedNoteKind = void 0;
15630
15639
  } else {
15631
15640
  const tuning = ModelUtils.parseTuning(str);
@@ -15693,18 +15702,18 @@ class AlphaTexImporter extends ScoreImporter {
15693
15702
  });
15694
15703
  return;
15695
15704
  }
15696
- const noteString = node.noteString.value;
15697
- if (noteString < 1 || noteString > this._state.currentStaff.tuning.length) {
15705
+ const frettedNoteString = node.noteString.value;
15706
+ if (frettedNoteString < 1 || frettedNoteString > this._state.currentStaff.tuning.length) {
15698
15707
  this.addSemanticDiagnostic({
15699
15708
  code: AlphaTexDiagnosticCode.AT208,
15700
15709
  message: `Note string is out of range. Available range: 1-${this._state.currentStaff.tuning.length}`,
15701
15710
  severity: AlphaTexDiagnosticsSeverity.Error,
15702
- start: noteValue.end,
15703
- end: noteValue.end
15711
+ start: node.noteString.start,
15712
+ end: node.noteString.end
15704
15713
  });
15705
15714
  return;
15706
15715
  }
15707
- note.string = this._state.currentStaff.tuning.length - (noteString - 1);
15716
+ note.string = this._state.currentStaff.tuning.length - (frettedNoteString - 1);
15708
15717
  if (!isTie) note.fret = numericValue;
15709
15718
  break;
15710
15719
  case AlphaTexStaffNoteKind.Articulation:
@@ -15731,6 +15740,29 @@ class AlphaTexImporter extends ScoreImporter {
15731
15740
  this._state.articulationUniqueIdToIndex.set(articulationValue, articulationIndex);
15732
15741
  }
15733
15742
  note.percussionArticulation = articulationIndex;
15743
+ if (node.noteString) {
15744
+ const percussionNoteString = node.noteString.value;
15745
+ if (percussionNoteString < 1 || percussionNoteString > this._state.currentStaff.tuning.length) {
15746
+ this.addSemanticDiagnostic({
15747
+ code: AlphaTexDiagnosticCode.AT208,
15748
+ message: `Note string is out of range. Available range: 1-${this._state.currentStaff.tuning.length}`,
15749
+ severity: AlphaTexDiagnosticsSeverity.Error,
15750
+ start: node.noteString.start,
15751
+ end: node.noteString.end
15752
+ });
15753
+ return;
15754
+ }
15755
+ note.string = this._state.currentStaff.tuning.length - (percussionNoteString - 1);
15756
+ } else {
15757
+ for (let i = 0; i < this._state.currentStaff.tuning.length; i++) {
15758
+ const s = this._state.currentStaff.tuning.length - i;
15759
+ if (!beat.noteStringLookup.has(s)) {
15760
+ note.string = s;
15761
+ break;
15762
+ }
15763
+ }
15764
+ if (Number.isNaN(note.string)) note.string = this._state.currentStaff.tuning.length;
15765
+ }
15734
15766
  break;
15735
15767
  }
15736
15768
  beat.addNote(note);
@@ -15748,6 +15780,7 @@ class AlphaTexImporter extends ScoreImporter {
15748
15780
  switch (staffNoteKind) {
15749
15781
  case AlphaTexStaffNoteKind.Pitched:
15750
15782
  staff.isPercussion = false;
15783
+ staff.showTablature = false;
15751
15784
  staff.stringTuning.reset();
15752
15785
  if (!this._state.staffHasExplicitDisplayTransposition.has(staff)) staff.displayTranspositionPitch = 0;
15753
15786
  break;
@@ -15759,6 +15792,14 @@ class AlphaTexImporter extends ScoreImporter {
15759
15792
  case AlphaTexStaffNoteKind.Articulation:
15760
15793
  staff.isPercussion = true;
15761
15794
  staff.stringTuning.reset();
15795
+ staff.stringTuning.tunings = [
15796
+ 0,
15797
+ 0,
15798
+ 0,
15799
+ 0,
15800
+ 0,
15801
+ 0
15802
+ ];
15762
15803
  if (!this._state.staffHasExplicitDisplayTransposition.has(staff)) staff.displayTranspositionPitch = 0;
15763
15804
  break;
15764
15805
  }
@@ -15795,7 +15836,15 @@ class AlphaTexImporter extends ScoreImporter {
15795
15836
  const program = staff.track.playbackInfo.program;
15796
15837
  if (!this._state.staffTuningApplied.has(staff) && !this._state.staffHasExplicitTuning.has(staff)) {
15797
15838
  staff.stringTuning.reset();
15798
- if (program === 15) staff.stringTuning.tunings = Tuning.getDefaultTuningFor(6).tunings;
15839
+ if (staff.isPercussion) staff.stringTuning.tunings = [
15840
+ 0,
15841
+ 0,
15842
+ 0,
15843
+ 0,
15844
+ 0,
15845
+ 0
15846
+ ];
15847
+ else if (program === 15) staff.stringTuning.tunings = Tuning.getDefaultTuningFor(6).tunings;
15799
15848
  else if (program >= 24 && program <= 31) staff.stringTuning.tunings = Tuning.getDefaultTuningFor(6).tunings;
15800
15849
  else if (program >= 32 && program <= 39) {
15801
15850
  staff.stringTuning.tunings = [
@@ -15987,7 +16036,6 @@ class AlphaTexImporter extends ScoreImporter {
15987
16036
  }
15988
16037
  applyPercussionStaff(staff) {
15989
16038
  staff.isPercussion = true;
15990
- staff.showTablature = false;
15991
16039
  staff.track.playbackInfo.program = 0;
15992
16040
  }
15993
16041
  startNewTrack() {
@@ -18817,8 +18865,7 @@ class Gp3To5Importer extends ScoreImporter {
18817
18865
  if ((flags & 8) !== 0) this.readNoteEffects(track, voice, beat, newNote);
18818
18866
  if (bar.staff.isPercussion) {
18819
18867
  newNote.percussionArticulation = Gp3To5Importer._gp5PercussionInstrumentMap.has(newNote.fret) ? Gp3To5Importer._gp5PercussionInstrumentMap.get(newNote.fret) : newNote.fret;
18820
- newNote.string = -1;
18821
- newNote.fret = -1;
18868
+ newNote.fret = NaN;
18822
18869
  }
18823
18870
  if (swapAccidentals) {
18824
18871
  const accidental = ModelUtils.computeAccidental(bar.keySignature, NoteAccidentalMode.Default, newNote.realValueWithoutHarmonic, false);
@@ -20023,8 +20070,6 @@ class GpifParser {
20023
20070
  this._articulationByName = /* @__PURE__ */ new Map();
20024
20071
  const track = new Track();
20025
20072
  track.ensureStaveCount(1);
20026
- const staff = track.staves[0];
20027
- staff.showStandardNotation = true;
20028
20073
  const trackId = node.getAttribute("id");
20029
20074
  for (const c of node.childElements()) switch (c.localName) {
20030
20075
  case "Name":
@@ -20287,7 +20332,6 @@ class GpifParser {
20287
20332
  staff.stringTuning.name = c.innerText;
20288
20333
  break;
20289
20334
  }
20290
- if (!staff.isPercussion) staff.showTablature = true;
20291
20335
  break;
20292
20336
  case "DiagramCollection":
20293
20337
  case "ChordCollection":
@@ -20421,11 +20465,7 @@ class GpifParser {
20421
20465
  const tuningParts = GpifParser._splitSafe(node.findChildElement("Pitches")?.innerText);
20422
20466
  const tuning = new Array(tuningParts.length);
20423
20467
  for (let i = 0; i < tuning.length; i++) tuning[tuning.length - 1 - i] = GpifParser._parseIntSafe(tuningParts[i], 0);
20424
- for (const staff of track.staves) {
20425
- staff.stringTuning.tunings = tuning;
20426
- staff.showStandardNotation = true;
20427
- staff.showTablature = true;
20428
- }
20468
+ for (const staff of track.staves) staff.stringTuning.tunings = tuning;
20429
20469
  break;
20430
20470
  case "DiagramCollection":
20431
20471
  case "ChordCollection":
@@ -21445,7 +21485,7 @@ class GpifParser {
21445
21485
  break;
21446
21486
  case "Octave":
21447
21487
  note.octave = GpifParser._parseIntSafe(c.findChildElement("Number")?.innerText, 0);
21448
- if (note.tone === -1) note.tone = 0;
21488
+ if (Number.isNaN(note.tone)) note.tone = 0;
21449
21489
  break;
21450
21490
  case "Tone":
21451
21491
  note.tone = GpifParser._parseIntSafe(c.findChildElement("Step")?.innerText, 0);
@@ -21661,10 +21701,8 @@ class GpifParser {
21661
21701
  if (this._notesOfBeat.has(beatId)) {
21662
21702
  for (const noteId of this._notesOfBeat.get(beatId)) if (noteId !== GpifParser._invalidId) {
21663
21703
  const note = NoteCloner.clone(this._noteById.get(noteId));
21664
- if (staff.isPercussion) {
21665
- note.fret = -1;
21666
- note.string = -1;
21667
- } else note.percussionArticulation = -1;
21704
+ if (staff.isPercussion) note.fret = NaN;
21705
+ else note.percussionArticulation = NaN;
21668
21706
  beat.addNote(note);
21669
21707
  if (this._tappedNotes.has(noteId)) beat.tap = true;
21670
21708
  }
@@ -21764,7 +21802,7 @@ class PartConfiguration {
21764
21802
  if (trackIndex < score.tracks.length) {
21765
21803
  const track = score.tracks[trackIndex];
21766
21804
  for (const staff of track.staves) {
21767
- if (!staff.isPercussion) staff.showTablature = trackConfig.showTablature;
21805
+ staff.showTablature = trackConfig.showTablature;
21768
21806
  staff.showStandardNotation = trackConfig.showStandardNotation;
21769
21807
  staff.showSlash = trackConfig.showSlash;
21770
21808
  staff.showNumbered = trackConfig.showNumbered;
@@ -23728,7 +23766,10 @@ class MusicXmlImporter extends ScoreImporter {
23728
23766
  break;
23729
23767
  case "percussion":
23730
23768
  bar.clef = Clef.Neutral;
23731
- if (bar.index === 0) bar.staff.isPercussion = true;
23769
+ if (bar.index === 0) {
23770
+ bar.staff.isPercussion = true;
23771
+ bar.staff.showTablature = false;
23772
+ }
23732
23773
  break;
23733
23774
  case "tab":
23734
23775
  bar.clef = Clef.G2;
@@ -58827,8 +58868,15 @@ class NoteNumberGlyph extends Glyph {
58827
58868
  }
58828
58869
  doLayout() {
58829
58870
  const n = this._note;
58830
- let fret = n.fret - n.beat.voice.bar.staff.transpositionPitch;
58831
- if (n.harmonicType === HarmonicType.Natural && n.harmonicValue !== 0) fret = n.harmonicValue - n.beat.voice.bar.staff.transpositionPitch;
58871
+ let fret;
58872
+ if (n.isStringed) {
58873
+ fret = n.fret - n.beat.voice.bar.staff.transpositionPitch;
58874
+ if (n.harmonicType === HarmonicType.Natural && n.harmonicValue !== 0) fret = n.harmonicValue - n.beat.voice.bar.staff.transpositionPitch;
58875
+ } else {
58876
+ const articulation = PercussionMapper.getArticulation(n);
58877
+ if (articulation) fret = articulation.id;
58878
+ else fret = n.percussionArticulation;
58879
+ }
58832
58880
  if (!n.isTieDestination) {
58833
58881
  this._noteString = n.isDead ? "x" : fret.toString();
58834
58882
  if (n.isGhost) this._noteString = `(${this._noteString})`;
@@ -65764,7 +65812,7 @@ class ScoreBeatGlyph extends BeatOnNoteGlyphBase {
65764
65812
  const beat = this.container.beat;
65765
65813
  const lineCount = this.renderer.bar.staff.standardNotationLineCount;
65766
65814
  let steps;
65767
- if (beat.restDisplayTone !== -1 && beat.restDisplayOctave !== -1) steps = AccidentalHelper.calculateRestDisplaySteps(sr.bar, beat.restDisplayTone, beat.restDisplayOctave);
65815
+ if (!Number.isNaN(beat.restDisplayTone) && !Number.isNaN(beat.restDisplayOctave)) steps = AccidentalHelper.calculateRestDisplaySteps(sr.bar, beat.restDisplayTone, beat.restDisplayOctave);
65768
65816
  else {
65769
65817
  steps = Math.ceil((lineCount - 1) / 2) * 2;
65770
65818
  if (beat.duration === Duration.Whole && lineCount !== 1 && lineCount !== 3) steps -= 2;
@@ -67507,10 +67555,6 @@ class TabBarRendererFactory extends BarRendererFactory {
67507
67555
  get cascadePriority() {
67508
67556
  return 1;
67509
67557
  }
67510
- constructor(effectBands) {
67511
- super(effectBands);
67512
- this.hideOnPercussionTrack = true;
67513
- }
67514
67558
  canCreate(track, staff) {
67515
67559
  return staff.showTablature && staff.tuning.length > 0 && super.canCreate(track, staff);
67516
67560
  }
@@ -68583,7 +68627,7 @@ class AlphaTexPrinter {
68583
68627
  _writeNote(n) {
68584
68628
  this._writeComments(n.leadingComments);
68585
68629
  this._writeValue(n.noteValue);
68586
- this._writeToken(n.noteStringDot, false);
68630
+ this._writeToken(n.noteStringSeparator, false);
68587
68631
  this._writeValue(n.noteString);
68588
68632
  if (n.noteEffects) this._writeProperties(n.noteEffects, false);
68589
68633
  this._writeComments(n.trailingComments);
@@ -68727,6 +68771,9 @@ class AlphaTexPrinter {
68727
68771
  case AlphaTexNodeType.Dot:
68728
68772
  this._writer.write(".");
68729
68773
  break;
68774
+ case AlphaTexNodeType.At:
68775
+ this._writer.write("@");
68776
+ break;
68730
68777
  case AlphaTexNodeType.Backslash:
68731
68778
  this._writer.write("\\");
68732
68779
  break;
@@ -68912,11 +68959,20 @@ class AlphaTexExporter extends ScoreExporter {
68912
68959
  text: ""
68913
68960
  }
68914
68961
  };
68915
- if (data.isPercussion) note.noteValue = {
68916
- nodeType: AlphaTexNodeType.String,
68917
- text: PercussionMapper.getArticulationName(data)
68918
- };
68919
- else if (data.isPiano) note.noteValue = {
68962
+ if (data.isPercussion) {
68963
+ note.noteValue = {
68964
+ nodeType: AlphaTexNodeType.String,
68965
+ text: PercussionMapper.getArticulationName(data)
68966
+ };
68967
+ if (!Number.isNaN(data.string)) {
68968
+ note.noteStringSeparator = { nodeType: AlphaTexNodeType.At };
68969
+ const stringNumber = data.beat.voice.bar.staff.tuning.length - data.string + 1;
68970
+ note.noteString = {
68971
+ nodeType: AlphaTexNodeType.Number,
68972
+ value: stringNumber
68973
+ };
68974
+ }
68975
+ } else if (data.isPiano) note.noteValue = {
68920
68976
  nodeType: AlphaTexNodeType.Ident,
68921
68977
  text: Tuning.getTextForTuning(data.realValueWithoutHarmonic, true)
68922
68978
  };
@@ -68925,7 +68981,7 @@ class AlphaTexExporter extends ScoreExporter {
68925
68981
  nodeType: AlphaTexNodeType.Number,
68926
68982
  value: data.fret
68927
68983
  };
68928
- note.noteStringDot = { nodeType: AlphaTexNodeType.Dot };
68984
+ note.noteStringSeparator = { nodeType: AlphaTexNodeType.Dot };
68929
68985
  const stringNumber = data.beat.voice.bar.staff.tuning.length - data.string + 1;
68930
68986
  note.noteString = {
68931
68987
  nodeType: AlphaTexNodeType.Number,
@@ -69497,6 +69553,7 @@ class GpifWriter {
69497
69553
  this._writeSimplePropertyNode(properties, "Midi", "Number", note.realValue.toString());
69498
69554
  if (note.showStringNumber) this._writeSimplePropertyNode(properties, "ShowStringNumber", "Enable", null);
69499
69555
  }
69556
+ if (note.isPercussion) this._writeSimplePropertyNode(properties, "String", "String", (note.string - 1).toString());
69500
69557
  if (note.isPiano) {
69501
69558
  this._writeSimplePropertyNode(properties, "Octave", "Number", note.octave.toString());
69502
69559
  this._writeSimplePropertyNode(properties, "Tone", "Step", note.tone.toString());