@coderline/alphatab 1.6.0-alpha.1420 → 1.6.0-alpha.1421

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.6.0-alpha.1420 (develop, build 1420)
2
+ * alphaTab v1.6.0-alpha.1421 (develop, build 1421)
3
3
  *
4
4
  * Copyright © 2025, Daniel Kuschny and Contributors, All rights reserved.
5
5
  *
@@ -22646,6 +22646,8 @@ class MidiFileSequencer {
22646
22646
  state.tempoChangeIndex = tempoChangeIndex;
22647
22647
  state.currentTempo = state.tempoChanges[state.tempoChangeIndex].bpm;
22648
22648
  }
22649
+ }
22650
+ updateSyncPoints(state, timePosition) {
22649
22651
  const syncPoints = state.syncPoints;
22650
22652
  if (syncPoints.length > 0) {
22651
22653
  let syncPointIndex = Math.min(state.syncPointIndex, syncPoints.length - 1);
@@ -22671,7 +22673,7 @@ class MidiFileSequencer {
22671
22673
  if (timePosition < 0 || syncPoints.length === 0) {
22672
22674
  return timePosition;
22673
22675
  }
22674
- this.updateCurrentTempo(this._mainState, timePosition);
22676
+ this.updateSyncPoints(this._mainState, timePosition);
22675
22677
  const syncPointIndex = Math.min(mainState.syncPointIndex, syncPoints.length - 1);
22676
22678
  const currentSyncPoint = syncPoints[syncPointIndex];
22677
22679
  const timeDiff = timePosition - currentSyncPoint.millisecondOffset;
@@ -36007,15 +36009,6 @@ class MidiFileGenerator {
36007
36009
  else {
36008
36010
  masterBarLookup.tempoChanges.push(new MasterBarTickLookupTempoChange(currentTick, currentTempo));
36009
36011
  }
36010
- const syncPoints = masterBar.syncPoints;
36011
- if (syncPoints) {
36012
- for (const syncPoint of syncPoints) {
36013
- if (syncPoint.syncPointValue.barOccurence === barOccurence) {
36014
- const tick = currentTick + masterBarDuration * syncPoint.ratioPosition;
36015
- this.syncPoints.push(new BackingTrackSyncPoint(tick, syncPoint.syncPointValue));
36016
- }
36017
- }
36018
- }
36019
36012
  masterBarLookup.masterBar = masterBar;
36020
36013
  masterBarLookup.start = currentTick;
36021
36014
  masterBarLookup.end = masterBarLookup.start + masterBarDuration;
@@ -41321,8 +41314,9 @@ class AlphaTabApiBase {
41321
41314
  // it can happen that the cursor reaches the target position slightly too early (especially on backing tracks)
41322
41315
  // to avoid the cursor stopping, causing a wierd look, we animate the cursor to the double position in double time.
41323
41316
  // beatCursor!.transitionToX((duration / cursorSpeed), nextBeatX);
41324
- const doubleEndBeatX = startBeatX + (nextBeatX - startBeatX) * 2;
41325
- beatCursor.transitionToX((duration / cursorSpeed) * 2, doubleEndBeatX);
41317
+ const factor = cursorMode === MidiTickLookupFindBeatResultCursorMode.ToNextBext ? 2 : 1;
41318
+ const doubleEndBeatX = startBeatX + (nextBeatX - startBeatX) * factor;
41319
+ beatCursor.transitionToX((duration / cursorSpeed) * factor, doubleEndBeatX);
41326
41320
  });
41327
41321
  }
41328
41322
  else {
@@ -60941,9 +60935,9 @@ class VersionInfo {
60941
60935
  print(`build date: ${VersionInfo.date}`);
60942
60936
  }
60943
60937
  }
60944
- VersionInfo.version = '1.6.0-alpha.1420';
60945
- VersionInfo.date = '2025-05-22T03:03:04.057Z';
60946
- VersionInfo.commit = '230bdd455a1906e6f334b63bad3b8cf773f890e6';
60938
+ VersionInfo.version = '1.6.0-alpha.1421';
60939
+ VersionInfo.date = '2025-05-22T19:50:36.984Z';
60940
+ VersionInfo.commit = '0b4cd7b2a2c0d244d65c0c0c5254fe4814976bc4';
60947
60941
 
60948
60942
  /**
60949
60943
  * A factory for custom layout engines.
@@ -9316,6 +9316,7 @@ declare class MidiFileSequencer {
9316
9316
  mainUpdateSyncPoints(syncPoints: BackingTrackSyncPoint[]): void;
9317
9317
  currentTimePositionToTickPosition(timePosition: number): number;
9318
9318
  private updateCurrentTempo;
9319
+ private updateSyncPoints;
9319
9320
  mainTimePositionFromBackingTrack(timePosition: number, backingTrackLength: number): number;
9320
9321
  mainTimePositionToBackingTrack(timePosition: number, backingTrackLength: number): number;
9321
9322
  private tickPositionToTimePositionWithSpeed;
package/dist/alphaTab.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * alphaTab v1.6.0-alpha.1420 (develop, build 1420)
2
+ * alphaTab v1.6.0-alpha.1421 (develop, build 1421)
3
3
  *
4
4
  * Copyright © 2025, Daniel Kuschny and Contributors, All rights reserved.
5
5
  *
@@ -22652,6 +22652,8 @@
22652
22652
  state.tempoChangeIndex = tempoChangeIndex;
22653
22653
  state.currentTempo = state.tempoChanges[state.tempoChangeIndex].bpm;
22654
22654
  }
22655
+ }
22656
+ updateSyncPoints(state, timePosition) {
22655
22657
  const syncPoints = state.syncPoints;
22656
22658
  if (syncPoints.length > 0) {
22657
22659
  let syncPointIndex = Math.min(state.syncPointIndex, syncPoints.length - 1);
@@ -22677,7 +22679,7 @@
22677
22679
  if (timePosition < 0 || syncPoints.length === 0) {
22678
22680
  return timePosition;
22679
22681
  }
22680
- this.updateCurrentTempo(this._mainState, timePosition);
22682
+ this.updateSyncPoints(this._mainState, timePosition);
22681
22683
  const syncPointIndex = Math.min(mainState.syncPointIndex, syncPoints.length - 1);
22682
22684
  const currentSyncPoint = syncPoints[syncPointIndex];
22683
22685
  const timeDiff = timePosition - currentSyncPoint.millisecondOffset;
@@ -36013,15 +36015,6 @@
36013
36015
  else {
36014
36016
  masterBarLookup.tempoChanges.push(new MasterBarTickLookupTempoChange(currentTick, currentTempo));
36015
36017
  }
36016
- const syncPoints = masterBar.syncPoints;
36017
- if (syncPoints) {
36018
- for (const syncPoint of syncPoints) {
36019
- if (syncPoint.syncPointValue.barOccurence === barOccurence) {
36020
- const tick = currentTick + masterBarDuration * syncPoint.ratioPosition;
36021
- this.syncPoints.push(new BackingTrackSyncPoint(tick, syncPoint.syncPointValue));
36022
- }
36023
- }
36024
- }
36025
36018
  masterBarLookup.masterBar = masterBar;
36026
36019
  masterBarLookup.start = currentTick;
36027
36020
  masterBarLookup.end = masterBarLookup.start + masterBarDuration;
@@ -41327,8 +41320,9 @@
41327
41320
  // it can happen that the cursor reaches the target position slightly too early (especially on backing tracks)
41328
41321
  // to avoid the cursor stopping, causing a wierd look, we animate the cursor to the double position in double time.
41329
41322
  // beatCursor!.transitionToX((duration / cursorSpeed), nextBeatX);
41330
- const doubleEndBeatX = startBeatX + (nextBeatX - startBeatX) * 2;
41331
- beatCursor.transitionToX((duration / cursorSpeed) * 2, doubleEndBeatX);
41323
+ const factor = cursorMode === MidiTickLookupFindBeatResultCursorMode.ToNextBext ? 2 : 1;
41324
+ const doubleEndBeatX = startBeatX + (nextBeatX - startBeatX) * factor;
41325
+ beatCursor.transitionToX((duration / cursorSpeed) * factor, doubleEndBeatX);
41332
41326
  });
41333
41327
  }
41334
41328
  else {
@@ -60947,9 +60941,9 @@
60947
60941
  print(`build date: ${VersionInfo.date}`);
60948
60942
  }
60949
60943
  }
60950
- VersionInfo.version = '1.6.0-alpha.1420';
60951
- VersionInfo.date = '2025-05-22T03:03:04.057Z';
60952
- VersionInfo.commit = '230bdd455a1906e6f334b63bad3b8cf773f890e6';
60944
+ VersionInfo.version = '1.6.0-alpha.1421';
60945
+ VersionInfo.date = '2025-05-22T19:50:36.984Z';
60946
+ VersionInfo.commit = '0b4cd7b2a2c0d244d65c0c0c5254fe4814976bc4';
60953
60947
 
60954
60948
  /**
60955
60949
  * A factory for custom layout engines.