Skip to content

Commit 123bff3

Browse files
authored
feat: smooth cursor scrolling. (#2447)
1 parent 5789b59 commit 123bff3

File tree

22 files changed

+1025
-256
lines changed

22 files changed

+1025
-256
lines changed

packages/alphatab/src/AlphaTabApiBase.ts

Lines changed: 148 additions & 91 deletions
Large diffs are not rendered by default.

packages/alphatab/src/PlayerSettings.ts

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,13 @@ export enum ScrollMode {
1414
/**
1515
* Scrolling happens as soon the cursors exceed the displayed range.
1616
*/
17-
OffScreen = 2
17+
OffScreen = 2,
18+
/**
19+
* Scrolling happens constantly in a smooth fashion.
20+
* This will disable the use of any native scroll optimizations but
21+
* manually scroll the scroll container in the required speed.
22+
*/
23+
Smooth = 3
1824
}
1925

2026
/**
@@ -219,25 +225,25 @@ export class PlayerSettings {
219225
* @category Player
220226
* @remarks
221227
* This setting configures whether the player feature is enabled or not. Depending on the platform enabling the player needs some additional actions of the developer.
222-
*
228+
*
223229
* **Synthesizer**
224-
*
230+
*
225231
* If the synthesizer is used (via {@link PlayerMode.EnabledAutomatic} or {@link PlayerMode.EnabledSynthesizer}) a sound font is needed so that the midi synthesizer can produce the audio samples.
226-
*
232+
*
227233
* For the JavaScript version the [player.soundFont](/docs/reference/settings/player/soundfont) property must be set to the URL of the sound font that should be used or it must be loaded manually via API.
228234
* For .net manually the soundfont must be loaded.
229-
*
235+
*
230236
* **Backing Track**
231-
*
232-
* For a built-in backing track of the input file no additional data needs to be loaded (assuming everything is filled via the input file).
237+
*
238+
* For a built-in backing track of the input file no additional data needs to be loaded (assuming everything is filled via the input file).
233239
* Otherwise the `score.backingTrack` needs to be filled before loading and the related sync points need to be configured.
234-
*
240+
*
235241
* **External Media**
236-
*
242+
*
237243
* For synchronizing alphaTab with an external media no data needs to be loaded into alphaTab. The configured sync points on the MasterBars are used
238244
* as reference to synchronize the external media with the internal time axis. Then the related APIs on the AlphaTabApi object need to be used
239245
* to update the playback state and exterrnal audio position during playback.
240-
*
246+
*
241247
* **User Interface**
242248
*
243249
* AlphaTab does not ship a default UI for the player. The API must be hooked up to some UI controls to allow the user to interact with the player.

0 commit comments

Comments
 (0)