@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,7 +1,7 @@
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
  import {
3
3
  __publicField
4
- } from "../chunk-PU4J7K4Z.mjs";
4
+ } from "../chunk-LCTM7BID.mjs";
5
5
 
6
6
  // src/score/pub/div-rect.ts
7
7
  import { Utils } from "@tspro/ts-utils-lib";
@@ -280,19 +280,19 @@ var DivRect = class _DivRect {
280
280
  import { Utils as Utils11 } from "@tspro/ts-utils-lib";
281
281
 
282
282
  // src/score/pub/types.ts
283
- var StaffPreset = /* @__PURE__ */ ((StaffPreset4) => {
284
- StaffPreset4[StaffPreset4["Treble"] = 1] = "Treble";
285
- StaffPreset4[StaffPreset4["Bass"] = 2] = "Bass";
286
- StaffPreset4[StaffPreset4["Grand"] = 3] = "Grand";
287
- StaffPreset4[StaffPreset4["GuitarTreble"] = 4] = "GuitarTreble";
288
- StaffPreset4[StaffPreset4["GuitarTab"] = 8] = "GuitarTab";
289
- StaffPreset4[StaffPreset4["GuitarCombined"] = 12] = "GuitarCombined";
290
- return StaffPreset4;
283
+ var StaffPreset = /* @__PURE__ */ ((StaffPreset3) => {
284
+ StaffPreset3[StaffPreset3["Treble"] = 1] = "Treble";
285
+ StaffPreset3[StaffPreset3["Bass"] = 2] = "Bass";
286
+ StaffPreset3[StaffPreset3["Grand"] = 3] = "Grand";
287
+ StaffPreset3[StaffPreset3["GuitarTreble"] = 4] = "GuitarTreble";
288
+ StaffPreset3[StaffPreset3["GuitarTab"] = 8] = "GuitarTab";
289
+ StaffPreset3[StaffPreset3["GuitarCombined"] = 12] = "GuitarCombined";
290
+ return StaffPreset3;
291
291
  })(StaffPreset || {});
292
- var Clef = /* @__PURE__ */ ((Clef3) => {
293
- Clef3["G"] = "G";
294
- Clef3["F"] = "F";
295
- return Clef3;
292
+ var Clef = /* @__PURE__ */ ((Clef2) => {
293
+ Clef2["G"] = "G";
294
+ Clef2["F"] = "F";
295
+ return Clef2;
296
296
  })(Clef || {});
297
297
  function getVoiceIds() {
298
298
  return [0, 1, 2, 3];
@@ -300,21 +300,21 @@ function getVoiceIds() {
300
300
  function getStringNumbers() {
301
301
  return [1, 2, 3, 4, 5, 6];
302
302
  }
303
- var Stem = /* @__PURE__ */ ((Stem3) => {
304
- Stem3[Stem3["Auto"] = 0] = "Auto";
305
- Stem3[Stem3["Up"] = 1] = "Up";
306
- Stem3[Stem3["Down"] = 2] = "Down";
307
- return Stem3;
303
+ var Stem = /* @__PURE__ */ ((Stem2) => {
304
+ Stem2[Stem2["Auto"] = 0] = "Auto";
305
+ Stem2[Stem2["Up"] = 1] = "Up";
306
+ Stem2[Stem2["Down"] = 2] = "Down";
307
+ return Stem2;
308
308
  })(Stem || {});
309
309
  var Arpeggio = /* @__PURE__ */ ((Arpeggio2) => {
310
310
  Arpeggio2[Arpeggio2["Up"] = 0] = "Up";
311
311
  Arpeggio2[Arpeggio2["Down"] = 1] = "Down";
312
312
  return Arpeggio2;
313
313
  })(Arpeggio || {});
314
- var TieType = /* @__PURE__ */ ((TieType3) => {
315
- TieType3[TieType3["Stub"] = -1] = "Stub";
316
- TieType3[TieType3["ToMeasureEnd"] = -2] = "ToMeasureEnd";
317
- return TieType3;
314
+ var TieType = /* @__PURE__ */ ((TieType2) => {
315
+ TieType2[TieType2["Stub"] = -1] = "Stub";
316
+ TieType2[TieType2["ToMeasureEnd"] = -2] = "ToMeasureEnd";
317
+ return TieType2;
318
318
  })(TieType || {});
319
319
  var NoteAnchor = /* @__PURE__ */ ((NoteAnchor2) => {
320
320
  NoteAnchor2[NoteAnchor2["Auto"] = 0] = "Auto";
@@ -324,11 +324,11 @@ var NoteAnchor = /* @__PURE__ */ ((NoteAnchor2) => {
324
324
  NoteAnchor2[NoteAnchor2["StemTip"] = 4] = "StemTip";
325
325
  return NoteAnchor2;
326
326
  })(NoteAnchor || {});
327
- var Connective = /* @__PURE__ */ ((Connective3) => {
328
- Connective3[Connective3["Tie"] = 0] = "Tie";
329
- Connective3[Connective3["Slur"] = 1] = "Slur";
330
- Connective3[Connective3["Slide"] = 2] = "Slide";
331
- return Connective3;
327
+ var Connective = /* @__PURE__ */ ((Connective2) => {
328
+ Connective2[Connective2["Tie"] = 0] = "Tie";
329
+ Connective2[Connective2["Slur"] = 1] = "Slur";
330
+ Connective2[Connective2["Slide"] = 2] = "Slide";
331
+ return Connective2;
332
332
  })(Connective || {});
333
333
  var VerticalPosition = /* @__PURE__ */ ((VerticalPosition4) => {
334
334
  VerticalPosition4[VerticalPosition4["Above"] = 0] = "Above";
@@ -343,34 +343,34 @@ var PlayState = /* @__PURE__ */ ((PlayState2) => {
343
343
  PlayState2[PlayState2["Stopped"] = 2] = "Stopped";
344
344
  return PlayState2;
345
345
  })(PlayState || {});
346
- var Fermata = /* @__PURE__ */ ((Fermata3) => {
347
- Fermata3[Fermata3["AtNote"] = 0] = "AtNote";
348
- Fermata3[Fermata3["AtMeasureEnd"] = 1] = "AtMeasureEnd";
349
- return Fermata3;
346
+ var Fermata = /* @__PURE__ */ ((Fermata2) => {
347
+ Fermata2[Fermata2["AtNote"] = 0] = "AtNote";
348
+ Fermata2[Fermata2["AtMeasureEnd"] = 1] = "AtMeasureEnd";
349
+ return Fermata2;
350
350
  })(Fermata || {});
351
- var Navigation = /* @__PURE__ */ ((Navigation3) => {
352
- Navigation3[Navigation3["DC_al_Fine"] = 0] = "DC_al_Fine";
353
- Navigation3[Navigation3["DC_al_Coda"] = 1] = "DC_al_Coda";
354
- Navigation3[Navigation3["DS_al_Fine"] = 2] = "DS_al_Fine";
355
- Navigation3[Navigation3["DS_al_Coda"] = 3] = "DS_al_Coda";
356
- Navigation3[Navigation3["Coda"] = 4] = "Coda";
357
- Navigation3[Navigation3["toCoda"] = 5] = "toCoda";
358
- Navigation3[Navigation3["Segno"] = 6] = "Segno";
359
- Navigation3[Navigation3["Fine"] = 7] = "Fine";
360
- Navigation3[Navigation3["StartRepeat"] = 8] = "StartRepeat";
361
- Navigation3[Navigation3["EndRepeat"] = 9] = "EndRepeat";
362
- Navigation3[Navigation3["Ending"] = 10] = "Ending";
363
- return Navigation3;
351
+ var Navigation = /* @__PURE__ */ ((Navigation2) => {
352
+ Navigation2[Navigation2["DC_al_Fine"] = 0] = "DC_al_Fine";
353
+ Navigation2[Navigation2["DC_al_Coda"] = 1] = "DC_al_Coda";
354
+ Navigation2[Navigation2["DS_al_Fine"] = 2] = "DS_al_Fine";
355
+ Navigation2[Navigation2["DS_al_Coda"] = 3] = "DS_al_Coda";
356
+ Navigation2[Navigation2["Coda"] = 4] = "Coda";
357
+ Navigation2[Navigation2["toCoda"] = 5] = "toCoda";
358
+ Navigation2[Navigation2["Segno"] = 6] = "Segno";
359
+ Navigation2[Navigation2["Fine"] = 7] = "Fine";
360
+ Navigation2[Navigation2["StartRepeat"] = 8] = "StartRepeat";
361
+ Navigation2[Navigation2["EndRepeat"] = 9] = "EndRepeat";
362
+ Navigation2[Navigation2["Ending"] = 10] = "Ending";
363
+ return Navigation2;
364
364
  })(Navigation || {});
365
- var Annotation = /* @__PURE__ */ ((Annotation3) => {
366
- Annotation3[Annotation3["Dynamics"] = 0] = "Dynamics";
367
- Annotation3[Annotation3["Tempo"] = 1] = "Tempo";
368
- return Annotation3;
365
+ var Annotation = /* @__PURE__ */ ((Annotation2) => {
366
+ Annotation2[Annotation2["Dynamics"] = 0] = "Dynamics";
367
+ Annotation2[Annotation2["Tempo"] = 1] = "Tempo";
368
+ return Annotation2;
369
369
  })(Annotation || {});
370
- var Label = /* @__PURE__ */ ((Label3) => {
371
- Label3[Label3["Note"] = 0] = "Note";
372
- Label3[Label3["Chord"] = 1] = "Chord";
373
- return Label3;
370
+ var Label = /* @__PURE__ */ ((Label2) => {
371
+ Label2[Label2["Note"] = 0] = "Note";
372
+ Label2[Label2["Chord"] = 1] = "Chord";
373
+ return Label2;
374
374
  })(Label || {});
375
375
 
376
376
  // src/score/engine/music-object.ts
@@ -1663,7 +1663,7 @@ var ObjRest = class extends MusicObject {
1663
1663
  return [this, ...arr];
1664
1664
  }
1665
1665
  }
1666
- return [this];
1666
+ return [];
1667
1667
  }
1668
1668
  getBeamGroup() {
1669
1669
  return this.beamGroup;
@@ -1979,9 +1979,6 @@ var ObjBeamGroup = class _ObjBeamGroup extends MusicObject {
1979
1979
  }
1980
1980
  }
1981
1981
  static createTriplet(symbols) {
1982
- if (!symbols.every((s) => s.triplet)) {
1983
- return false;
1984
- }
1985
1982
  let MaxTripletNoteLenght = NoteLength2.Half;
1986
1983
  let len = symbols.map((s) => s.rhythmProps.noteLength);
1987
1984
  if (symbols.length == 2) {
@@ -2287,7 +2284,16 @@ var ObjStaffNoteGroup = class extends MusicObject {
2287
2284
  return this.mi;
2288
2285
  }
2289
2286
  pick(x, y) {
2290
- return this.getRect().contains(x, y) ? [this] : [];
2287
+ if (!this.getRect().contains(x, y)) {
2288
+ return [];
2289
+ }
2290
+ for (let i = 0; i < this.accidentals.length; i++) {
2291
+ let arr = this.accidentals[i].pick(x, y);
2292
+ if (arr.length > 0) {
2293
+ return [this, ...arr];
2294
+ }
2295
+ }
2296
+ return [this];
2291
2297
  }
2292
2298
  updateRect() {
2293
2299
  this.rect = this.noteHeadRects[0].copy();
@@ -2449,7 +2455,7 @@ var ObjNoteGroup = class _ObjNoteGroup extends MusicObject {
2449
2455
  return [this, ...arr];
2450
2456
  }
2451
2457
  }
2452
- return [this];
2458
+ return [];
2453
2459
  }
2454
2460
  getTopNote() {
2455
2461
  return this.notes[this.notes.length - 1];
@@ -3077,7 +3083,7 @@ var ObjRhythmColumn = class extends MusicObject {
3077
3083
  return [this, ...arr];
3078
3084
  }
3079
3085
  }
3080
- return [this];
3086
+ return [];
3081
3087
  }
3082
3088
  hasArpeggio() {
3083
3089
  return this.arpeggioDir !== void 0;
@@ -3973,8 +3979,9 @@ var Player = class _Player {
3973
3979
 
3974
3980
  // src/score/engine/obj-bar-line.ts
3975
3981
  var ObjStaffTabBarLine = class extends MusicObject {
3976
- constructor(line) {
3982
+ constructor(barLine, line) {
3977
3983
  super(line);
3984
+ this.barLine = barLine;
3978
3985
  this.line = line;
3979
3986
  __publicField(this, "lineRects", []);
3980
3987
  __publicField(this, "dotRects", []);
@@ -4029,7 +4036,7 @@ var ObjBarLine = class extends MusicObject {
4029
4036
  let dotW = DocumentSettings.DotSize * unitSize;
4030
4037
  let dotRadius = dotW / 2;
4031
4038
  row.getNotationLines().forEach((line) => {
4032
- let obj = new ObjStaffTabBarLine(line);
4039
+ let obj = new ObjStaffTabBarLine(this, line);
4033
4040
  let lineCenterY;
4034
4041
  let lineDotOff;
4035
4042
  let top, bottom;
@@ -4331,9 +4338,10 @@ var ObjFermata = class extends MusicObject {
4331
4338
 
4332
4339
  // src/score/engine/obj-extension-line.ts
4333
4340
  var ObjExtensionLine = class extends MusicObject {
4334
- constructor(measure, extension, leftObj, rightObj) {
4341
+ constructor(measure, line, extension, leftObj, rightObj) {
4335
4342
  super(measure);
4336
4343
  this.measure = measure;
4344
+ this.line = line;
4337
4345
  this.extension = extension;
4338
4346
  this.leftObj = leftObj;
4339
4347
  this.rightObj = rightObj;
@@ -4396,7 +4404,7 @@ var ObjExtensionLine = class extends MusicObject {
4396
4404
  ctx.setLineDash([]);
4397
4405
  let tails = this.extension.getTails();
4398
4406
  if (tails.length > 0 && this === tails[tails.length - 1]) {
4399
- let tipH = rect.centerY > this.measure.row.getRect().centerY ? -renderer.unitSize : renderer.unitSize;
4407
+ let tipH = rect.centerY > this.line.getRect().centerY ? -renderer.unitSize : renderer.unitSize;
4400
4408
  renderer.drawLine(rect.right, rect.centerY, rect.right, rect.centerY + tipH, "black", renderer.lineWidth);
4401
4409
  }
4402
4410
  }
@@ -5304,6 +5312,9 @@ var _ObjMeasure = class _ObjMeasure extends MusicObject {
5304
5312
  col.setVoiceSymbol(voiceId, symbol);
5305
5313
  this.getVoiceSymbols(voiceId);
5306
5314
  this.voiceSymbols[voiceId].push(symbol);
5315
+ if (symbol.triplet) {
5316
+ this.createOldStyleTriplets(voiceId);
5317
+ }
5307
5318
  this.requestBeamsUpdate();
5308
5319
  this.lastAddedRhythmColumn = col;
5309
5320
  this.lastAddedRhythmSymbol = symbol;
@@ -5443,7 +5454,7 @@ var _ObjMeasure = class _ObjMeasure extends MusicObject {
5443
5454
  const lines = m.row.getNotationLines();
5444
5455
  let line2 = (_a = lines.find((l) => l.name !== "" && l.name === line.name)) != null ? _a : lines[line.id];
5445
5456
  if (line2) {
5446
- m.addLayoutObject(new ObjExtensionLine(m, extension, leftObj, rightObj), line2, layoutGroupId, verticalPos);
5457
+ m.addLayoutObject(new ObjExtensionLine(m, line2, extension, leftObj, rightObj), line2, layoutGroupId, verticalPos);
5447
5458
  }
5448
5459
  }
5449
5460
  }
@@ -5457,28 +5468,41 @@ var _ObjMeasure = class _ObjMeasure extends MusicObject {
5457
5468
  requestBeamsUpdate() {
5458
5469
  this.needBeamsUpdate = true;
5459
5470
  }
5471
+ createOldStyleTriplets(voiceId) {
5472
+ let symbols = this.getVoiceSymbols(voiceId);
5473
+ if (symbols.length <= 2) {
5474
+ return;
5475
+ }
5476
+ for (let i = 0; i < symbols.length; ) {
5477
+ let s2 = symbols.slice(i, i + 2);
5478
+ let s3 = symbols.slice(i, i + 3);
5479
+ if (s2.length === 2 && s2.every((s) => s.triplet) && s2.every((s) => s.getBeamGroup() === void 0) && ObjBeamGroup.createTriplet(s2)) {
5480
+ i += 2;
5481
+ } else if (s3.length === 3 && s3.every((s) => s.triplet) && s3.every((s) => s.getBeamGroup() === void 0) && ObjBeamGroup.createTriplet(s3)) {
5482
+ i += 3;
5483
+ } else {
5484
+ i++;
5485
+ }
5486
+ }
5487
+ this.requestLayout();
5488
+ }
5460
5489
  createBeams() {
5461
- if (!this.needBeamsUpdate || !this.row.hasStaff) {
5490
+ if (!this.needBeamsUpdate) {
5462
5491
  return;
5463
5492
  }
5464
- this.beamGroups.forEach((beamGroup) => beamGroup.detach());
5465
- this.beamGroups.length = 0;
5493
+ this.beamGroups = this.beamGroups.filter((beamGroup) => {
5494
+ if (beamGroup.getType() === 0 /* RegularBeam */) {
5495
+ beamGroup.detach();
5496
+ return false;
5497
+ } else {
5498
+ return true;
5499
+ }
5500
+ });
5466
5501
  getVoiceIds().forEach((voiceId) => {
5467
5502
  let symbols = this.getVoiceSymbols(voiceId);
5468
5503
  if (symbols.length <= 2) {
5469
5504
  return;
5470
5505
  }
5471
- for (let i = 0; i < symbols.length; ) {
5472
- let s2 = symbols.slice(i, i + 2);
5473
- let s3 = symbols.slice(i, i + 3);
5474
- if (s2.length === 2 && ObjBeamGroup.createTriplet(s2)) {
5475
- i += 2;
5476
- } else if (s3.length === 3 && ObjBeamGroup.createTriplet(s3)) {
5477
- i += 3;
5478
- } else {
5479
- i++;
5480
- }
5481
- }
5482
5506
  if (!DebugSettings.DisableBeams) {
5483
5507
  let groupSymbols = [];
5484
5508
  let groupStartTicks = 0;
@@ -6431,8 +6455,8 @@ var ObjScoreRow = class extends MusicObject {
6431
6455
  updateRect() {
6432
6456
  let left = this.measures.length > 0 ? this.measures[0].getRect().left : 0;
6433
6457
  let right = this.measures.length > 0 ? this.measures[this.measures.length - 1].getRect().right : 0;
6434
- let top = Math.min(0, ...this.measures.map((m) => m.getRect().top));
6435
- let bottom = Math.max(0, ...this.measures.map((m) => m.getRect().bottom));
6458
+ let top = this.measures.length > 0 ? Math.min(...this.measures.map((m) => m.getRect().top)) : 0;
6459
+ let bottom = this.measures.length > 0 ? Math.max(...this.measures.map((m) => m.getRect().bottom)) : 0;
6436
6460
  this.rect = new DivRect(left, right, top, bottom);
6437
6461
  }
6438
6462
  alignStemsToBeams() {
@@ -6724,6 +6748,12 @@ var ObjDocument = class extends MusicObject {
6724
6748
  getLastRow() {
6725
6749
  return this.rows.length === 0 ? this.addNewRow(void 0) : this.rows[this.rows.length - 1];
6726
6750
  }
6751
+ getRows() {
6752
+ return this.rows;
6753
+ }
6754
+ getMeasures() {
6755
+ return this.measures;
6756
+ }
6727
6757
  requestNewRow() {
6728
6758
  this.newRowRequested = true;
6729
6759
  }
@@ -7223,6 +7253,13 @@ function require_t(t, message) {
7223
7253
  function isVoiceId2(value) {
7224
7254
  return Utils12.Is.isNumber(value) && getVoiceIds().indexOf(value) >= 0;
7225
7255
  }
7256
+ function getNotationLine(line) {
7257
+ if (line instanceof ObjStaff || line instanceof ObjTab) {
7258
+ return line.getMusicInterface();
7259
+ } else {
7260
+ throw new MusicError19(MusicErrorType19.Score, `Notation line not staff nor tab.`);
7261
+ }
7262
+ }
7226
7263
  var MusicInterface6 = class {
7227
7264
  constructor(name) {
7228
7265
  this.name = name;
@@ -7271,6 +7308,12 @@ var _MArpeggio = class _MArpeggio extends MusicInterface6 {
7271
7308
  getMusicObject() {
7272
7309
  return this.obj;
7273
7310
  }
7311
+ getRhythmColumn() {
7312
+ return this.obj.col.getMusicInterface();
7313
+ }
7314
+ getNotationLine() {
7315
+ return getNotationLine(this.obj.line);
7316
+ }
7274
7317
  };
7275
7318
  __publicField(_MArpeggio, "Name", "Arpeggio");
7276
7319
  var MArpeggio = _MArpeggio;
@@ -7297,6 +7340,9 @@ var _MStaffBeamGroup = class _MStaffBeamGroup extends MusicInterface6 {
7297
7340
  getMusicObject() {
7298
7341
  return this.obj;
7299
7342
  }
7343
+ getStaff() {
7344
+ return this.obj.staff.getMusicInterface();
7345
+ }
7300
7346
  };
7301
7347
  __publicField(_MStaffBeamGroup, "Name", "StaffBeamGroup");
7302
7348
  var MStaffBeamGroup = _MStaffBeamGroup;
@@ -7320,6 +7366,12 @@ var _MDocument = class _MDocument extends MusicInterface6 {
7320
7366
  getArranger() {
7321
7367
  return this.obj.getArranger();
7322
7368
  }
7369
+ getRows() {
7370
+ return this.obj.getRows().map((r) => r.getMusicInterface());
7371
+ }
7372
+ getMeasures() {
7373
+ return this.obj.getMeasures().map((m) => m.getMusicInterface());
7374
+ }
7323
7375
  play(fn) {
7324
7376
  assertArg2(Utils12.Is.isFunctionOrUndefined(fn), "playStateChangeListener", fn);
7325
7377
  return new MPlayer(this, fn).play();
@@ -7411,6 +7463,9 @@ var _MMeasure = class _MMeasure extends MusicInterface6 {
7411
7463
  getRhythmColumns() {
7412
7464
  return this.obj.getColumns().map((col) => col.getMusicInterface());
7413
7465
  }
7466
+ getRow() {
7467
+ return this.obj.row.getMusicInterface();
7468
+ }
7414
7469
  };
7415
7470
  __publicField(_MMeasure, "Name", "Measure");
7416
7471
  var MMeasure = _MMeasure;
@@ -7450,6 +7505,17 @@ var _MStaffTabBarLine = class _MStaffTabBarLine extends MusicInterface6 {
7450
7505
  getMusicObject() {
7451
7506
  return this.obj;
7452
7507
  }
7508
+ getBarLine() {
7509
+ let barLine = this.obj.barLine;
7510
+ if (barLine instanceof ObjBarLineLeft || barLine instanceof ObjBarLineRight) {
7511
+ return barLine.getMusicInterface();
7512
+ } else {
7513
+ throw new MusicError19(MusicErrorType19.Score, `Bar line not let nor right.`);
7514
+ }
7515
+ }
7516
+ getNotationLine() {
7517
+ return getNotationLine(this.obj.line);
7518
+ }
7453
7519
  };
7454
7520
  __publicField(_MStaffTabBarLine, "Name", "StaffTabBarLine");
7455
7521
  var MStaffTabBarLine = _MStaffTabBarLine;
@@ -7469,6 +7535,12 @@ var _MNoteGroup = class _MNoteGroup extends MusicInterface6 {
7469
7535
  getRhythmProps() {
7470
7536
  return this.obj.rhythmProps;
7471
7537
  }
7538
+ getRhythmColumn() {
7539
+ return this.obj.col.getMusicInterface();
7540
+ }
7541
+ getMeasure() {
7542
+ return this.obj.measure.getMusicInterface();
7543
+ }
7472
7544
  };
7473
7545
  __publicField(_MNoteGroup, "Name", "NoteGroup");
7474
7546
  var MNoteGroup = _MNoteGroup;
@@ -7485,6 +7557,15 @@ var _MStaffNoteGroup = class _MStaffNoteGroup extends MusicInterface6 {
7485
7557
  getNoteGroup() {
7486
7558
  return this.obj.noteGroup.getMusicInterface();
7487
7559
  }
7560
+ getRhythmColumn() {
7561
+ return this.getNoteGroup().getRhythmColumn();
7562
+ }
7563
+ getMeasure() {
7564
+ return this.getNoteGroup().getMeasure();
7565
+ }
7566
+ getStaff() {
7567
+ return this.obj.staff.getMusicInterface();
7568
+ }
7488
7569
  };
7489
7570
  __publicField(_MStaffNoteGroup, "Name", "StaffNoteGroup");
7490
7571
  var MStaffNoteGroup = _MStaffNoteGroup;
@@ -7501,6 +7582,15 @@ var _MTabNoteGroup = class _MTabNoteGroup extends MusicInterface6 {
7501
7582
  getNoteGroup() {
7502
7583
  return this.obj.noteGroup.getMusicInterface();
7503
7584
  }
7585
+ getRhythmColumn() {
7586
+ return this.getNoteGroup().getRhythmColumn();
7587
+ }
7588
+ getMeasure() {
7589
+ return this.getNoteGroup().getMeasure();
7590
+ }
7591
+ getTab() {
7592
+ return this.obj.tab.getMusicInterface();
7593
+ }
7504
7594
  };
7505
7595
  __publicField(_MTabNoteGroup, "Name", "TabNoteGroup");
7506
7596
  var MTabNoteGroup = _MTabNoteGroup;
@@ -7517,6 +7607,12 @@ var _MRest = class _MRest extends MusicInterface6 {
7517
7607
  getRhythmProps() {
7518
7608
  return this.obj.rhythmProps;
7519
7609
  }
7610
+ getRhythmColumn() {
7611
+ return this.obj.col.getMusicInterface();
7612
+ }
7613
+ getMeasure() {
7614
+ return this.obj.measure.getMusicInterface();
7615
+ }
7520
7616
  };
7521
7617
  __publicField(_MRest, "Name", "Rest");
7522
7618
  var MRest = _MRest;
@@ -7533,6 +7629,15 @@ var _MStaffRest = class _MStaffRest extends MusicInterface6 {
7533
7629
  getRest() {
7534
7630
  return this.obj.rest.getMusicInterface();
7535
7631
  }
7632
+ getRhythmColumn() {
7633
+ return this.getRest().getRhythmColumn();
7634
+ }
7635
+ getMeasure() {
7636
+ return this.getRest().getMeasure();
7637
+ }
7638
+ getStaff() {
7639
+ return this.obj.staff.getMusicInterface();
7640
+ }
7536
7641
  };
7537
7642
  __publicField(_MStaffRest, "Name", "StaffRest");
7538
7643
  var MStaffRest = _MStaffRest;
@@ -7551,6 +7656,13 @@ var _MRhythmColumn = class _MRhythmColumn extends MusicInterface6 {
7551
7656
  assertArg2(isVoiceId2(voiceId), "voiceId", voiceId);
7552
7657
  return (_a = this.obj.getVoiceSymbol(voiceId)) == null ? void 0 : _a.getMusicInterface();
7553
7658
  }
7659
+ getMeasure() {
7660
+ return this.obj.measure.getMusicInterface();
7661
+ }
7662
+ getVoiceSymbol(voiceId) {
7663
+ let s = this.obj.getVoiceSymbol(voiceId);
7664
+ return s instanceof ObjNoteGroup || s instanceof ObjRest ? s.getMusicInterface() : void 0;
7665
+ }
7554
7666
  };
7555
7667
  __publicField(_MRhythmColumn, "Name", "RhythmColumn");
7556
7668
  var MRhythmColumn = _MRhythmColumn;
@@ -7564,9 +7676,15 @@ var _MScoreRow = class _MScoreRow extends MusicInterface6 {
7564
7676
  getMusicObject() {
7565
7677
  return this.obj;
7566
7678
  }
7679
+ getDocument() {
7680
+ return this.obj.doc.getMusicInterface();
7681
+ }
7567
7682
  getMeasures() {
7568
7683
  return this.obj.getMeasures().map((m) => m.getMusicInterface());
7569
7684
  }
7685
+ getNotationLines() {
7686
+ return this.obj.getNotationLines().map((line) => getNotationLine(line));
7687
+ }
7570
7688
  };
7571
7689
  __publicField(_MScoreRow, "Name", "ScoreRow");
7572
7690
  var MScoreRow = _MScoreRow;
@@ -7580,6 +7698,15 @@ var _MStaff = class _MStaff extends MusicInterface6 {
7580
7698
  getMusicObject() {
7581
7699
  return this.obj;
7582
7700
  }
7701
+ getId() {
7702
+ return this.obj.id;
7703
+ }
7704
+ getName() {
7705
+ return this.obj.name.length > 0 ? this.obj.name : void 0;
7706
+ }
7707
+ getRow() {
7708
+ return this.obj.row.getMusicInterface();
7709
+ }
7583
7710
  };
7584
7711
  __publicField(_MStaff, "Name", "Staff");
7585
7712
  var MStaff = _MStaff;
@@ -7593,6 +7720,15 @@ var _MTab = class _MTab extends MusicInterface6 {
7593
7720
  getMusicObject() {
7594
7721
  return this.obj;
7595
7722
  }
7723
+ getId() {
7724
+ return this.obj.id;
7725
+ }
7726
+ getName() {
7727
+ return this.obj.name.length > 0 ? this.obj.name : void 0;
7728
+ }
7729
+ getRow() {
7730
+ return this.obj.row.getMusicInterface();
7731
+ }
7596
7732
  };
7597
7733
  __publicField(_MTab, "Name", "Tab");
7598
7734
  var MTab = _MTab;
@@ -7606,6 +7742,9 @@ var _MSignature = class _MSignature extends MusicInterface6 {
7606
7742
  getMusicObject() {
7607
7743
  return this.obj;
7608
7744
  }
7745
+ getStaff() {
7746
+ return this.obj.staff.getMusicInterface();
7747
+ }
7609
7748
  };
7610
7749
  __publicField(_MSignature, "Name", "Signature");
7611
7750
  var MSignature = _MSignature;
@@ -7619,6 +7758,9 @@ var _MSpecialText = class _MSpecialText extends MusicInterface6 {
7619
7758
  getMusicObject() {
7620
7759
  return this.obj;
7621
7760
  }
7761
+ getText() {
7762
+ return this.obj.getText();
7763
+ }
7622
7764
  };
7623
7765
  __publicField(_MSpecialText, "Name", "SpecialText");
7624
7766
  var MSpecialText = _MSpecialText;
@@ -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 __defProp = Object.defineProperty;
4
4
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
@@ -1,7 +1,7 @@
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
  import {
3
3
  __publicField
4
- } from "../chunk-PU4J7K4Z.mjs";
4
+ } from "../chunk-LCTM7BID.mjs";
5
5
 
6
6
  // src/theory/chord.ts
7
7
  import { Utils as Utils6 } from "@tspro/ts-utils-lib";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tspro/web-music-score",
3
- "version": "3.1.1",
3
+ "version": "3.2.0",
4
4
  "author": "PahkaSoft",
5
5
  "license": "MIT",
6
6
  "private": false,