@tspro/web-music-score 3.1.1 → 3.2.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.
@@ -1,4 +1,4 @@
1
- /* WebMusicScore v3.1.1 | (c) 2023 PahkaSoft | MIT License | Includes: Tone.js (MIT License) */
1
+ /* WebMusicScore v3.2.0 | (c) 2023 PahkaSoft | MIT License | Includes: Tone.js (MIT License) */
2
2
  "use strict";
3
3
  var __create = Object.create;
4
4
  var __defProp = Object.defineProperty;
@@ -364,19 +364,19 @@ var DivRect = class _DivRect {
364
364
  var import_ts_utils_lib11 = require("@tspro/ts-utils-lib");
365
365
 
366
366
  // src/score/pub/types.ts
367
- var StaffPreset = /* @__PURE__ */ ((StaffPreset4) => {
368
- StaffPreset4[StaffPreset4["Treble"] = 1] = "Treble";
369
- StaffPreset4[StaffPreset4["Bass"] = 2] = "Bass";
370
- StaffPreset4[StaffPreset4["Grand"] = 3] = "Grand";
371
- StaffPreset4[StaffPreset4["GuitarTreble"] = 4] = "GuitarTreble";
372
- StaffPreset4[StaffPreset4["GuitarTab"] = 8] = "GuitarTab";
373
- StaffPreset4[StaffPreset4["GuitarCombined"] = 12] = "GuitarCombined";
374
- return StaffPreset4;
367
+ var StaffPreset = /* @__PURE__ */ ((StaffPreset3) => {
368
+ StaffPreset3[StaffPreset3["Treble"] = 1] = "Treble";
369
+ StaffPreset3[StaffPreset3["Bass"] = 2] = "Bass";
370
+ StaffPreset3[StaffPreset3["Grand"] = 3] = "Grand";
371
+ StaffPreset3[StaffPreset3["GuitarTreble"] = 4] = "GuitarTreble";
372
+ StaffPreset3[StaffPreset3["GuitarTab"] = 8] = "GuitarTab";
373
+ StaffPreset3[StaffPreset3["GuitarCombined"] = 12] = "GuitarCombined";
374
+ return StaffPreset3;
375
375
  })(StaffPreset || {});
376
- var Clef = /* @__PURE__ */ ((Clef3) => {
377
- Clef3["G"] = "G";
378
- Clef3["F"] = "F";
379
- return Clef3;
376
+ var Clef = /* @__PURE__ */ ((Clef2) => {
377
+ Clef2["G"] = "G";
378
+ Clef2["F"] = "F";
379
+ return Clef2;
380
380
  })(Clef || {});
381
381
  function getVoiceIds() {
382
382
  return [0, 1, 2, 3];
@@ -384,21 +384,21 @@ function getVoiceIds() {
384
384
  function getStringNumbers() {
385
385
  return [1, 2, 3, 4, 5, 6];
386
386
  }
387
- var Stem = /* @__PURE__ */ ((Stem3) => {
388
- Stem3[Stem3["Auto"] = 0] = "Auto";
389
- Stem3[Stem3["Up"] = 1] = "Up";
390
- Stem3[Stem3["Down"] = 2] = "Down";
391
- return Stem3;
387
+ var Stem = /* @__PURE__ */ ((Stem2) => {
388
+ Stem2[Stem2["Auto"] = 0] = "Auto";
389
+ Stem2[Stem2["Up"] = 1] = "Up";
390
+ Stem2[Stem2["Down"] = 2] = "Down";
391
+ return Stem2;
392
392
  })(Stem || {});
393
393
  var Arpeggio = /* @__PURE__ */ ((Arpeggio2) => {
394
394
  Arpeggio2[Arpeggio2["Up"] = 0] = "Up";
395
395
  Arpeggio2[Arpeggio2["Down"] = 1] = "Down";
396
396
  return Arpeggio2;
397
397
  })(Arpeggio || {});
398
- var TieType = /* @__PURE__ */ ((TieType3) => {
399
- TieType3[TieType3["Stub"] = -1] = "Stub";
400
- TieType3[TieType3["ToMeasureEnd"] = -2] = "ToMeasureEnd";
401
- return TieType3;
398
+ var TieType = /* @__PURE__ */ ((TieType2) => {
399
+ TieType2[TieType2["Stub"] = -1] = "Stub";
400
+ TieType2[TieType2["ToMeasureEnd"] = -2] = "ToMeasureEnd";
401
+ return TieType2;
402
402
  })(TieType || {});
403
403
  var NoteAnchor = /* @__PURE__ */ ((NoteAnchor2) => {
404
404
  NoteAnchor2[NoteAnchor2["Auto"] = 0] = "Auto";
@@ -408,11 +408,11 @@ var NoteAnchor = /* @__PURE__ */ ((NoteAnchor2) => {
408
408
  NoteAnchor2[NoteAnchor2["StemTip"] = 4] = "StemTip";
409
409
  return NoteAnchor2;
410
410
  })(NoteAnchor || {});
411
- var Connective = /* @__PURE__ */ ((Connective3) => {
412
- Connective3[Connective3["Tie"] = 0] = "Tie";
413
- Connective3[Connective3["Slur"] = 1] = "Slur";
414
- Connective3[Connective3["Slide"] = 2] = "Slide";
415
- return Connective3;
411
+ var Connective = /* @__PURE__ */ ((Connective2) => {
412
+ Connective2[Connective2["Tie"] = 0] = "Tie";
413
+ Connective2[Connective2["Slur"] = 1] = "Slur";
414
+ Connective2[Connective2["Slide"] = 2] = "Slide";
415
+ return Connective2;
416
416
  })(Connective || {});
417
417
  var VerticalPosition = /* @__PURE__ */ ((VerticalPosition4) => {
418
418
  VerticalPosition4[VerticalPosition4["Above"] = 0] = "Above";
@@ -427,34 +427,34 @@ var PlayState = /* @__PURE__ */ ((PlayState2) => {
427
427
  PlayState2[PlayState2["Stopped"] = 2] = "Stopped";
428
428
  return PlayState2;
429
429
  })(PlayState || {});
430
- var Fermata = /* @__PURE__ */ ((Fermata3) => {
431
- Fermata3[Fermata3["AtNote"] = 0] = "AtNote";
432
- Fermata3[Fermata3["AtMeasureEnd"] = 1] = "AtMeasureEnd";
433
- return Fermata3;
430
+ var Fermata = /* @__PURE__ */ ((Fermata2) => {
431
+ Fermata2[Fermata2["AtNote"] = 0] = "AtNote";
432
+ Fermata2[Fermata2["AtMeasureEnd"] = 1] = "AtMeasureEnd";
433
+ return Fermata2;
434
434
  })(Fermata || {});
435
- var Navigation = /* @__PURE__ */ ((Navigation3) => {
436
- Navigation3[Navigation3["DC_al_Fine"] = 0] = "DC_al_Fine";
437
- Navigation3[Navigation3["DC_al_Coda"] = 1] = "DC_al_Coda";
438
- Navigation3[Navigation3["DS_al_Fine"] = 2] = "DS_al_Fine";
439
- Navigation3[Navigation3["DS_al_Coda"] = 3] = "DS_al_Coda";
440
- Navigation3[Navigation3["Coda"] = 4] = "Coda";
441
- Navigation3[Navigation3["toCoda"] = 5] = "toCoda";
442
- Navigation3[Navigation3["Segno"] = 6] = "Segno";
443
- Navigation3[Navigation3["Fine"] = 7] = "Fine";
444
- Navigation3[Navigation3["StartRepeat"] = 8] = "StartRepeat";
445
- Navigation3[Navigation3["EndRepeat"] = 9] = "EndRepeat";
446
- Navigation3[Navigation3["Ending"] = 10] = "Ending";
447
- return Navigation3;
435
+ var Navigation = /* @__PURE__ */ ((Navigation2) => {
436
+ Navigation2[Navigation2["DC_al_Fine"] = 0] = "DC_al_Fine";
437
+ Navigation2[Navigation2["DC_al_Coda"] = 1] = "DC_al_Coda";
438
+ Navigation2[Navigation2["DS_al_Fine"] = 2] = "DS_al_Fine";
439
+ Navigation2[Navigation2["DS_al_Coda"] = 3] = "DS_al_Coda";
440
+ Navigation2[Navigation2["Coda"] = 4] = "Coda";
441
+ Navigation2[Navigation2["toCoda"] = 5] = "toCoda";
442
+ Navigation2[Navigation2["Segno"] = 6] = "Segno";
443
+ Navigation2[Navigation2["Fine"] = 7] = "Fine";
444
+ Navigation2[Navigation2["StartRepeat"] = 8] = "StartRepeat";
445
+ Navigation2[Navigation2["EndRepeat"] = 9] = "EndRepeat";
446
+ Navigation2[Navigation2["Ending"] = 10] = "Ending";
447
+ return Navigation2;
448
448
  })(Navigation || {});
449
- var Annotation = /* @__PURE__ */ ((Annotation3) => {
450
- Annotation3[Annotation3["Dynamics"] = 0] = "Dynamics";
451
- Annotation3[Annotation3["Tempo"] = 1] = "Tempo";
452
- return Annotation3;
449
+ var Annotation = /* @__PURE__ */ ((Annotation2) => {
450
+ Annotation2[Annotation2["Dynamics"] = 0] = "Dynamics";
451
+ Annotation2[Annotation2["Tempo"] = 1] = "Tempo";
452
+ return Annotation2;
453
453
  })(Annotation || {});
454
- var Label = /* @__PURE__ */ ((Label3) => {
455
- Label3[Label3["Note"] = 0] = "Note";
456
- Label3[Label3["Chord"] = 1] = "Chord";
457
- return Label3;
454
+ var Label = /* @__PURE__ */ ((Label2) => {
455
+ Label2[Label2["Note"] = 0] = "Note";
456
+ Label2[Label2["Chord"] = 1] = "Chord";
457
+ return Label2;
458
458
  })(Label || {});
459
459
 
460
460
  // src/score/engine/music-object.ts
@@ -1747,7 +1747,7 @@ var ObjRest = class extends MusicObject {
1747
1747
  return [this, ...arr];
1748
1748
  }
1749
1749
  }
1750
- return [this];
1750
+ return [];
1751
1751
  }
1752
1752
  getBeamGroup() {
1753
1753
  return this.beamGroup;
@@ -2063,9 +2063,6 @@ var ObjBeamGroup = class _ObjBeamGroup extends MusicObject {
2063
2063
  }
2064
2064
  }
2065
2065
  static createTriplet(symbols) {
2066
- if (!symbols.every((s) => s.triplet)) {
2067
- return false;
2068
- }
2069
2066
  let MaxTripletNoteLenght = import_theory4.NoteLength.Half;
2070
2067
  let len = symbols.map((s) => s.rhythmProps.noteLength);
2071
2068
  if (symbols.length == 2) {
@@ -2371,7 +2368,16 @@ var ObjStaffNoteGroup = class extends MusicObject {
2371
2368
  return this.mi;
2372
2369
  }
2373
2370
  pick(x, y) {
2374
- return this.getRect().contains(x, y) ? [this] : [];
2371
+ if (!this.getRect().contains(x, y)) {
2372
+ return [];
2373
+ }
2374
+ for (let i = 0; i < this.accidentals.length; i++) {
2375
+ let arr = this.accidentals[i].pick(x, y);
2376
+ if (arr.length > 0) {
2377
+ return [this, ...arr];
2378
+ }
2379
+ }
2380
+ return [this];
2375
2381
  }
2376
2382
  updateRect() {
2377
2383
  this.rect = this.noteHeadRects[0].copy();
@@ -2533,7 +2539,7 @@ var ObjNoteGroup = class _ObjNoteGroup extends MusicObject {
2533
2539
  return [this, ...arr];
2534
2540
  }
2535
2541
  }
2536
- return [this];
2542
+ return [];
2537
2543
  }
2538
2544
  getTopNote() {
2539
2545
  return this.notes[this.notes.length - 1];
@@ -3161,7 +3167,7 @@ var ObjRhythmColumn = class extends MusicObject {
3161
3167
  return [this, ...arr];
3162
3168
  }
3163
3169
  }
3164
- return [this];
3170
+ return [];
3165
3171
  }
3166
3172
  hasArpeggio() {
3167
3173
  return this.arpeggioDir !== void 0;
@@ -4057,8 +4063,9 @@ var Player = class _Player {
4057
4063
 
4058
4064
  // src/score/engine/obj-bar-line.ts
4059
4065
  var ObjStaffTabBarLine = class extends MusicObject {
4060
- constructor(line) {
4066
+ constructor(barLine, line) {
4061
4067
  super(line);
4068
+ this.barLine = barLine;
4062
4069
  this.line = line;
4063
4070
  __publicField(this, "lineRects", []);
4064
4071
  __publicField(this, "dotRects", []);
@@ -4113,7 +4120,7 @@ var ObjBarLine = class extends MusicObject {
4113
4120
  let dotW = DocumentSettings.DotSize * unitSize;
4114
4121
  let dotRadius = dotW / 2;
4115
4122
  row.getNotationLines().forEach((line) => {
4116
- let obj = new ObjStaffTabBarLine(line);
4123
+ let obj = new ObjStaffTabBarLine(this, line);
4117
4124
  let lineCenterY;
4118
4125
  let lineDotOff;
4119
4126
  let top, bottom;
@@ -4415,9 +4422,10 @@ var ObjFermata = class extends MusicObject {
4415
4422
 
4416
4423
  // src/score/engine/obj-extension-line.ts
4417
4424
  var ObjExtensionLine = class extends MusicObject {
4418
- constructor(measure, extension, leftObj, rightObj) {
4425
+ constructor(measure, line, extension, leftObj, rightObj) {
4419
4426
  super(measure);
4420
4427
  this.measure = measure;
4428
+ this.line = line;
4421
4429
  this.extension = extension;
4422
4430
  this.leftObj = leftObj;
4423
4431
  this.rightObj = rightObj;
@@ -4480,7 +4488,7 @@ var ObjExtensionLine = class extends MusicObject {
4480
4488
  ctx.setLineDash([]);
4481
4489
  let tails = this.extension.getTails();
4482
4490
  if (tails.length > 0 && this === tails[tails.length - 1]) {
4483
- let tipH = rect.centerY > this.measure.row.getRect().centerY ? -renderer.unitSize : renderer.unitSize;
4491
+ let tipH = rect.centerY > this.line.getRect().centerY ? -renderer.unitSize : renderer.unitSize;
4484
4492
  renderer.drawLine(rect.right, rect.centerY, rect.right, rect.centerY + tipH, "black", renderer.lineWidth);
4485
4493
  }
4486
4494
  }
@@ -5388,6 +5396,9 @@ var _ObjMeasure = class _ObjMeasure extends MusicObject {
5388
5396
  col.setVoiceSymbol(voiceId, symbol);
5389
5397
  this.getVoiceSymbols(voiceId);
5390
5398
  this.voiceSymbols[voiceId].push(symbol);
5399
+ if (symbol.triplet) {
5400
+ this.createOldStyleTriplets(voiceId);
5401
+ }
5391
5402
  this.requestBeamsUpdate();
5392
5403
  this.lastAddedRhythmColumn = col;
5393
5404
  this.lastAddedRhythmSymbol = symbol;
@@ -5527,7 +5538,7 @@ var _ObjMeasure = class _ObjMeasure extends MusicObject {
5527
5538
  const lines = m.row.getNotationLines();
5528
5539
  let line2 = (_a = lines.find((l) => l.name !== "" && l.name === line.name)) != null ? _a : lines[line.id];
5529
5540
  if (line2) {
5530
- m.addLayoutObject(new ObjExtensionLine(m, extension, leftObj, rightObj), line2, layoutGroupId, verticalPos);
5541
+ m.addLayoutObject(new ObjExtensionLine(m, line2, extension, leftObj, rightObj), line2, layoutGroupId, verticalPos);
5531
5542
  }
5532
5543
  }
5533
5544
  }
@@ -5541,28 +5552,41 @@ var _ObjMeasure = class _ObjMeasure extends MusicObject {
5541
5552
  requestBeamsUpdate() {
5542
5553
  this.needBeamsUpdate = true;
5543
5554
  }
5555
+ createOldStyleTriplets(voiceId) {
5556
+ let symbols = this.getVoiceSymbols(voiceId);
5557
+ if (symbols.length <= 2) {
5558
+ return;
5559
+ }
5560
+ for (let i = 0; i < symbols.length; ) {
5561
+ let s2 = symbols.slice(i, i + 2);
5562
+ let s3 = symbols.slice(i, i + 3);
5563
+ if (s2.length === 2 && s2.every((s) => s.triplet) && s2.every((s) => s.getBeamGroup() === void 0) && ObjBeamGroup.createTriplet(s2)) {
5564
+ i += 2;
5565
+ } else if (s3.length === 3 && s3.every((s) => s.triplet) && s3.every((s) => s.getBeamGroup() === void 0) && ObjBeamGroup.createTriplet(s3)) {
5566
+ i += 3;
5567
+ } else {
5568
+ i++;
5569
+ }
5570
+ }
5571
+ this.requestLayout();
5572
+ }
5544
5573
  createBeams() {
5545
- if (!this.needBeamsUpdate || !this.row.hasStaff) {
5574
+ if (!this.needBeamsUpdate) {
5546
5575
  return;
5547
5576
  }
5548
- this.beamGroups.forEach((beamGroup) => beamGroup.detach());
5549
- this.beamGroups.length = 0;
5577
+ this.beamGroups = this.beamGroups.filter((beamGroup) => {
5578
+ if (beamGroup.getType() === 0 /* RegularBeam */) {
5579
+ beamGroup.detach();
5580
+ return false;
5581
+ } else {
5582
+ return true;
5583
+ }
5584
+ });
5550
5585
  getVoiceIds().forEach((voiceId) => {
5551
5586
  let symbols = this.getVoiceSymbols(voiceId);
5552
5587
  if (symbols.length <= 2) {
5553
5588
  return;
5554
5589
  }
5555
- for (let i = 0; i < symbols.length; ) {
5556
- let s2 = symbols.slice(i, i + 2);
5557
- let s3 = symbols.slice(i, i + 3);
5558
- if (s2.length === 2 && ObjBeamGroup.createTriplet(s2)) {
5559
- i += 2;
5560
- } else if (s3.length === 3 && ObjBeamGroup.createTriplet(s3)) {
5561
- i += 3;
5562
- } else {
5563
- i++;
5564
- }
5565
- }
5566
5590
  if (!DebugSettings.DisableBeams) {
5567
5591
  let groupSymbols = [];
5568
5592
  let groupStartTicks = 0;
@@ -6515,8 +6539,8 @@ var ObjScoreRow = class extends MusicObject {
6515
6539
  updateRect() {
6516
6540
  let left = this.measures.length > 0 ? this.measures[0].getRect().left : 0;
6517
6541
  let right = this.measures.length > 0 ? this.measures[this.measures.length - 1].getRect().right : 0;
6518
- let top = Math.min(0, ...this.measures.map((m) => m.getRect().top));
6519
- let bottom = Math.max(0, ...this.measures.map((m) => m.getRect().bottom));
6542
+ let top = this.measures.length > 0 ? Math.min(...this.measures.map((m) => m.getRect().top)) : 0;
6543
+ let bottom = this.measures.length > 0 ? Math.max(...this.measures.map((m) => m.getRect().bottom)) : 0;
6520
6544
  this.rect = new DivRect(left, right, top, bottom);
6521
6545
  }
6522
6546
  alignStemsToBeams() {
@@ -6808,6 +6832,12 @@ var ObjDocument = class extends MusicObject {
6808
6832
  getLastRow() {
6809
6833
  return this.rows.length === 0 ? this.addNewRow(void 0) : this.rows[this.rows.length - 1];
6810
6834
  }
6835
+ getRows() {
6836
+ return this.rows;
6837
+ }
6838
+ getMeasures() {
6839
+ return this.measures;
6840
+ }
6811
6841
  requestNewRow() {
6812
6842
  this.newRowRequested = true;
6813
6843
  }
@@ -7307,6 +7337,13 @@ function require_t(t, message) {
7307
7337
  function isVoiceId2(value) {
7308
7338
  return import_ts_utils_lib12.Utils.Is.isNumber(value) && getVoiceIds().indexOf(value) >= 0;
7309
7339
  }
7340
+ function getNotationLine(line) {
7341
+ if (line instanceof ObjStaff || line instanceof ObjTab) {
7342
+ return line.getMusicInterface();
7343
+ } else {
7344
+ throw new import_core19.MusicError(import_core19.MusicErrorType.Score, `Notation line not staff nor tab.`);
7345
+ }
7346
+ }
7310
7347
  var MusicInterface6 = class {
7311
7348
  constructor(name) {
7312
7349
  this.name = name;
@@ -7355,6 +7392,12 @@ var _MArpeggio = class _MArpeggio extends MusicInterface6 {
7355
7392
  getMusicObject() {
7356
7393
  return this.obj;
7357
7394
  }
7395
+ getRhythmColumn() {
7396
+ return this.obj.col.getMusicInterface();
7397
+ }
7398
+ getNotationLine() {
7399
+ return getNotationLine(this.obj.line);
7400
+ }
7358
7401
  };
7359
7402
  __publicField(_MArpeggio, "Name", "Arpeggio");
7360
7403
  var MArpeggio = _MArpeggio;
@@ -7381,6 +7424,9 @@ var _MStaffBeamGroup = class _MStaffBeamGroup extends MusicInterface6 {
7381
7424
  getMusicObject() {
7382
7425
  return this.obj;
7383
7426
  }
7427
+ getStaff() {
7428
+ return this.obj.staff.getMusicInterface();
7429
+ }
7384
7430
  };
7385
7431
  __publicField(_MStaffBeamGroup, "Name", "StaffBeamGroup");
7386
7432
  var MStaffBeamGroup = _MStaffBeamGroup;
@@ -7404,6 +7450,12 @@ var _MDocument = class _MDocument extends MusicInterface6 {
7404
7450
  getArranger() {
7405
7451
  return this.obj.getArranger();
7406
7452
  }
7453
+ getRows() {
7454
+ return this.obj.getRows().map((r) => r.getMusicInterface());
7455
+ }
7456
+ getMeasures() {
7457
+ return this.obj.getMeasures().map((m) => m.getMusicInterface());
7458
+ }
7407
7459
  play(fn) {
7408
7460
  assertArg2(import_ts_utils_lib12.Utils.Is.isFunctionOrUndefined(fn), "playStateChangeListener", fn);
7409
7461
  return new MPlayer(this, fn).play();
@@ -7495,6 +7547,9 @@ var _MMeasure = class _MMeasure extends MusicInterface6 {
7495
7547
  getRhythmColumns() {
7496
7548
  return this.obj.getColumns().map((col) => col.getMusicInterface());
7497
7549
  }
7550
+ getRow() {
7551
+ return this.obj.row.getMusicInterface();
7552
+ }
7498
7553
  };
7499
7554
  __publicField(_MMeasure, "Name", "Measure");
7500
7555
  var MMeasure = _MMeasure;
@@ -7534,6 +7589,17 @@ var _MStaffTabBarLine = class _MStaffTabBarLine extends MusicInterface6 {
7534
7589
  getMusicObject() {
7535
7590
  return this.obj;
7536
7591
  }
7592
+ getBarLine() {
7593
+ let barLine = this.obj.barLine;
7594
+ if (barLine instanceof ObjBarLineLeft || barLine instanceof ObjBarLineRight) {
7595
+ return barLine.getMusicInterface();
7596
+ } else {
7597
+ throw new import_core19.MusicError(import_core19.MusicErrorType.Score, `Bar line not let nor right.`);
7598
+ }
7599
+ }
7600
+ getNotationLine() {
7601
+ return getNotationLine(this.obj.line);
7602
+ }
7537
7603
  };
7538
7604
  __publicField(_MStaffTabBarLine, "Name", "StaffTabBarLine");
7539
7605
  var MStaffTabBarLine = _MStaffTabBarLine;
@@ -7553,6 +7619,12 @@ var _MNoteGroup = class _MNoteGroup extends MusicInterface6 {
7553
7619
  getRhythmProps() {
7554
7620
  return this.obj.rhythmProps;
7555
7621
  }
7622
+ getRhythmColumn() {
7623
+ return this.obj.col.getMusicInterface();
7624
+ }
7625
+ getMeasure() {
7626
+ return this.obj.measure.getMusicInterface();
7627
+ }
7556
7628
  };
7557
7629
  __publicField(_MNoteGroup, "Name", "NoteGroup");
7558
7630
  var MNoteGroup = _MNoteGroup;
@@ -7569,6 +7641,15 @@ var _MStaffNoteGroup = class _MStaffNoteGroup extends MusicInterface6 {
7569
7641
  getNoteGroup() {
7570
7642
  return this.obj.noteGroup.getMusicInterface();
7571
7643
  }
7644
+ getRhythmColumn() {
7645
+ return this.getNoteGroup().getRhythmColumn();
7646
+ }
7647
+ getMeasure() {
7648
+ return this.getNoteGroup().getMeasure();
7649
+ }
7650
+ getStaff() {
7651
+ return this.obj.staff.getMusicInterface();
7652
+ }
7572
7653
  };
7573
7654
  __publicField(_MStaffNoteGroup, "Name", "StaffNoteGroup");
7574
7655
  var MStaffNoteGroup = _MStaffNoteGroup;
@@ -7585,6 +7666,15 @@ var _MTabNoteGroup = class _MTabNoteGroup extends MusicInterface6 {
7585
7666
  getNoteGroup() {
7586
7667
  return this.obj.noteGroup.getMusicInterface();
7587
7668
  }
7669
+ getRhythmColumn() {
7670
+ return this.getNoteGroup().getRhythmColumn();
7671
+ }
7672
+ getMeasure() {
7673
+ return this.getNoteGroup().getMeasure();
7674
+ }
7675
+ getTab() {
7676
+ return this.obj.tab.getMusicInterface();
7677
+ }
7588
7678
  };
7589
7679
  __publicField(_MTabNoteGroup, "Name", "TabNoteGroup");
7590
7680
  var MTabNoteGroup = _MTabNoteGroup;
@@ -7601,6 +7691,12 @@ var _MRest = class _MRest extends MusicInterface6 {
7601
7691
  getRhythmProps() {
7602
7692
  return this.obj.rhythmProps;
7603
7693
  }
7694
+ getRhythmColumn() {
7695
+ return this.obj.col.getMusicInterface();
7696
+ }
7697
+ getMeasure() {
7698
+ return this.obj.measure.getMusicInterface();
7699
+ }
7604
7700
  };
7605
7701
  __publicField(_MRest, "Name", "Rest");
7606
7702
  var MRest = _MRest;
@@ -7617,6 +7713,15 @@ var _MStaffRest = class _MStaffRest extends MusicInterface6 {
7617
7713
  getRest() {
7618
7714
  return this.obj.rest.getMusicInterface();
7619
7715
  }
7716
+ getRhythmColumn() {
7717
+ return this.getRest().getRhythmColumn();
7718
+ }
7719
+ getMeasure() {
7720
+ return this.getRest().getMeasure();
7721
+ }
7722
+ getStaff() {
7723
+ return this.obj.staff.getMusicInterface();
7724
+ }
7620
7725
  };
7621
7726
  __publicField(_MStaffRest, "Name", "StaffRest");
7622
7727
  var MStaffRest = _MStaffRest;
@@ -7635,6 +7740,13 @@ var _MRhythmColumn = class _MRhythmColumn extends MusicInterface6 {
7635
7740
  assertArg2(isVoiceId2(voiceId), "voiceId", voiceId);
7636
7741
  return (_a = this.obj.getVoiceSymbol(voiceId)) == null ? void 0 : _a.getMusicInterface();
7637
7742
  }
7743
+ getMeasure() {
7744
+ return this.obj.measure.getMusicInterface();
7745
+ }
7746
+ getVoiceSymbol(voiceId) {
7747
+ let s = this.obj.getVoiceSymbol(voiceId);
7748
+ return s instanceof ObjNoteGroup || s instanceof ObjRest ? s.getMusicInterface() : void 0;
7749
+ }
7638
7750
  };
7639
7751
  __publicField(_MRhythmColumn, "Name", "RhythmColumn");
7640
7752
  var MRhythmColumn = _MRhythmColumn;
@@ -7648,9 +7760,15 @@ var _MScoreRow = class _MScoreRow extends MusicInterface6 {
7648
7760
  getMusicObject() {
7649
7761
  return this.obj;
7650
7762
  }
7763
+ getDocument() {
7764
+ return this.obj.doc.getMusicInterface();
7765
+ }
7651
7766
  getMeasures() {
7652
7767
  return this.obj.getMeasures().map((m) => m.getMusicInterface());
7653
7768
  }
7769
+ getNotationLines() {
7770
+ return this.obj.getNotationLines().map((line) => getNotationLine(line));
7771
+ }
7654
7772
  };
7655
7773
  __publicField(_MScoreRow, "Name", "ScoreRow");
7656
7774
  var MScoreRow = _MScoreRow;
@@ -7664,6 +7782,15 @@ var _MStaff = class _MStaff extends MusicInterface6 {
7664
7782
  getMusicObject() {
7665
7783
  return this.obj;
7666
7784
  }
7785
+ getId() {
7786
+ return this.obj.id;
7787
+ }
7788
+ getName() {
7789
+ return this.obj.name.length > 0 ? this.obj.name : void 0;
7790
+ }
7791
+ getRow() {
7792
+ return this.obj.row.getMusicInterface();
7793
+ }
7667
7794
  };
7668
7795
  __publicField(_MStaff, "Name", "Staff");
7669
7796
  var MStaff = _MStaff;
@@ -7677,6 +7804,15 @@ var _MTab = class _MTab extends MusicInterface6 {
7677
7804
  getMusicObject() {
7678
7805
  return this.obj;
7679
7806
  }
7807
+ getId() {
7808
+ return this.obj.id;
7809
+ }
7810
+ getName() {
7811
+ return this.obj.name.length > 0 ? this.obj.name : void 0;
7812
+ }
7813
+ getRow() {
7814
+ return this.obj.row.getMusicInterface();
7815
+ }
7680
7816
  };
7681
7817
  __publicField(_MTab, "Name", "Tab");
7682
7818
  var MTab = _MTab;
@@ -7690,6 +7826,9 @@ var _MSignature = class _MSignature extends MusicInterface6 {
7690
7826
  getMusicObject() {
7691
7827
  return this.obj;
7692
7828
  }
7829
+ getStaff() {
7830
+ return this.obj.staff.getMusicInterface();
7831
+ }
7693
7832
  };
7694
7833
  __publicField(_MSignature, "Name", "Signature");
7695
7834
  var MSignature = _MSignature;
@@ -7703,6 +7842,9 @@ var _MSpecialText = class _MSpecialText extends MusicInterface6 {
7703
7842
  getMusicObject() {
7704
7843
  return this.obj;
7705
7844
  }
7845
+ getText() {
7846
+ return this.obj.getText();
7847
+ }
7706
7848
  };
7707
7849
  __publicField(_MSpecialText, "Name", "SpecialText");
7708
7850
  var MSpecialText = _MSpecialText;