* Exports all sync points in this song to a FlatSyncPoint list. * @since 1.6.0
()
| 481 | * @since 1.6.0 |
| 482 | */ |
| 483 | public exportFlatSyncPoints(): FlatSyncPoint[] { |
| 484 | const syncPoints: FlatSyncPoint[] = []; |
| 485 | for (const masterBar of this.masterBars) { |
| 486 | const masterBarSyncPoints = masterBar.syncPoints; |
| 487 | if (masterBarSyncPoints) { |
| 488 | for (const syncPoint of masterBarSyncPoints) { |
| 489 | syncPoints.push({ |
| 490 | barIndex: masterBar.index, |
| 491 | barOccurence: syncPoint.syncPointValue!.barOccurence, |
| 492 | barPosition: syncPoint.ratioPosition, |
| 493 | millisecondOffset: syncPoint.syncPointValue!.millisecondOffset |
| 494 | }); |
| 495 | } |
| 496 | } |
| 497 | } |
| 498 | return syncPoints; |
| 499 | } |
| 500 | } |