@coderline/alphatab 1.7.1 → 1.8.0-alpha.1636

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.
@@ -217,12 +217,19 @@ declare class AlphaSynthBase implements IAlphaSynth {
217
217
  declare class AlphaSynthMidiFileHandler implements IMidiFileHandler {
218
218
  private _midiFile;
219
219
  private _smf1Mode;
220
+ /**
221
+ * An indicator by how many midi-ticks the song contents are shifted.
222
+ * Grace beats at start might require a shift for the first beat to start at 0.
223
+ * This information can be used to translate back the player time axis to the music notation.
224
+ */
225
+ tickShift: number;
220
226
  /**
221
227
  * Initializes a new instance of the {@link AlphaSynthMidiFileHandler} class.
222
228
  * @param midiFile The midi file.
223
229
  * @param smf1Mode Whether to generate a SMF1 compatible midi file. This might break multi note bends.
224
230
  */
225
231
  constructor(midiFile: MidiFile, smf1Mode?: boolean);
232
+ addTickShift(tickShift: number): void;
226
233
  addTimeSignature(tick: number, timeSignatureNumerator: number, timeSignatureDenominator: number): void;
227
234
  addRest(track: number, tick: number, channel: number): void;
228
235
  addNote(track: number, start: number, length: number, key: number, velocity: number, channel: number): void;
@@ -356,6 +363,12 @@ export declare class AlphaTabApiBase<TSettings> {
356
363
  private _actualPlayerMode;
357
364
  private _player;
358
365
  private _renderer;
366
+ /**
367
+ * An indicator by how many midi-ticks the song contents are shifted.
368
+ * Grace beats at start might require a shift for the first beat to start at 0.
369
+ * This information can be used to translate back the player time axis to the music notation.
370
+ */
371
+ get midiTickShift(): number;
359
372
  /**
360
373
  * The actual player mode which is currently active.
361
374
  * @remarks
@@ -3744,6 +3757,7 @@ declare class AlphaTexParser {
3744
3757
  private _beatMultiplier;
3745
3758
  private _noteList;
3746
3759
  private _note;
3760
+ private static readonly _allowValuesAfterProperties;
3747
3761
  private _metaData;
3748
3762
  private _properties;
3749
3763
  private _property;
@@ -6106,6 +6120,7 @@ export declare class DisplaySettings {
6106
6120
  * @remarks
6107
6121
  * AlphaTab has various stave profiles that define which staves will be shown in for the rendered tracks. Its recommended
6108
6122
  * to keep this on {@link StaveProfile.Default} and rather rely on the options available ob {@link Staff} level
6123
+ * @deprecated Set the notation visibility by modifying the {@link Staff} properties.
6109
6124
  */
6110
6125
  staveProfile: StaveProfile;
6111
6126
  /**
@@ -6221,7 +6236,7 @@ export declare class DisplaySettings {
6221
6236
  * The top padding applied to first system.
6222
6237
  * @since 1.4.0
6223
6238
  * @category Display
6224
- * @defaultValue `5`
6239
+ * @defaultValue `0`
6225
6240
  */
6226
6241
  firstSystemPaddingTop: number;
6227
6242
  /**
@@ -6235,14 +6250,14 @@ export declare class DisplaySettings {
6235
6250
  * The bottom padding applied to systems beside the last one.
6236
6251
  * @since 1.4.0
6237
6252
  * @category Display
6238
- * @defaultValue `20`
6253
+ * @defaultValue `10`
6239
6254
  */
6240
6255
  systemPaddingBottom: number;
6241
6256
  /**
6242
6257
  * The bottom padding applied to the last system.
6243
6258
  * @since 1.4.0
6244
6259
  * @category Display
6245
- * @defaultValue `0`
6260
+ * @defaultValue `5`
6246
6261
  */
6247
6262
  lastSystemPaddingBottom: number;
6248
6263
  /**
@@ -6267,17 +6282,31 @@ export declare class DisplaySettings {
6267
6282
  */
6268
6283
  accoladeBarPaddingRight: number;
6269
6284
  /**
6270
- * The bottom padding applied to main notation staves (standard, tabs, numbered, slash).
6285
+ * The top padding applied to the first main notation staff (standard, tabs, numbered, slash).
6286
+ * @since 1.8.0
6287
+ * @category Display
6288
+ * @defaultValue `0`
6289
+ */
6290
+ firstNotationStaffPaddingTop: number;
6291
+ /**
6292
+ * The bottom padding applied to last main notation staff (standard, tabs, numbered, slash).
6293
+ * @since 1.8.0
6294
+ * @category Display
6295
+ * @defaultValue `0`
6296
+ */
6297
+ lastNotationStaffPaddingBottom: number;
6298
+ /**
6299
+ * The top padding applied to main notation staves (standard, tabs, numbered, slash).
6271
6300
  * @since 1.4.0
6272
6301
  * @category Display
6273
- * @defaultValue `5`
6302
+ * @defaultValue `0`
6274
6303
  */
6275
6304
  notationStaffPaddingTop: number;
6276
6305
  /**
6277
6306
  * The bottom padding applied to main notation staves (standard, tabs, numbered, slash).
6278
6307
  * @since 1.4.0
6279
6308
  * @category Display
6280
- * @defaultValue `5`
6309
+ * @defaultValue `0`
6281
6310
  */
6282
6311
  notationStaffPaddingBottom: number;
6283
6312
  /**
@@ -6285,6 +6314,8 @@ export declare class DisplaySettings {
6285
6314
  * @since 1.4.0
6286
6315
  * @category Display
6287
6316
  * @defaultValue `0`
6317
+ * @deprecated Effect staves do not exist anymore, effects are now part of the main notation staves. This value has no effect anymore.
6318
+ * Use {@link effectBandPaddingBottom} to control the padding after effect bands.
6288
6319
  */
6289
6320
  effectStaffPaddingTop: number;
6290
6321
  /**
@@ -6292,6 +6323,8 @@ export declare class DisplaySettings {
6292
6323
  * @since 1.4.0
6293
6324
  * @category Display
6294
6325
  * @defaultValue `0`
6326
+ * @deprecated Effect staves do not exist anymore, effects are now part of the main notation staves. This value has no effect anymore.
6327
+ * Use {@link effectBandPaddingBottom} to control the padding after effect bands.
6295
6328
  */
6296
6329
  effectStaffPaddingBottom: number;
6297
6330
  /**
@@ -6315,6 +6348,13 @@ export declare class DisplaySettings {
6315
6348
  * @defaultValue `2`
6316
6349
  */
6317
6350
  effectBandPaddingBottom: number;
6351
+ /**
6352
+ * The additional padding to apply between the staves of two separate tracks.
6353
+ * @since 1.8.0
6354
+ * @category Display
6355
+ * @defaultValue `5`
6356
+ */
6357
+ trackStaffPaddingBetween: number;
6318
6358
  /**
6319
6359
  * The mode used to arrange staves and systems.
6320
6360
  * @since 1.3.0
@@ -6431,6 +6471,7 @@ declare interface DisplaySettingsJson {
6431
6471
  * @remarks
6432
6472
  * AlphaTab has various stave profiles that define which staves will be shown in for the rendered tracks. Its recommended
6433
6473
  * to keep this on {@link StaveProfile.Default} and rather rely on the options available ob {@link Staff} level
6474
+ * @deprecated Set the notation visibility by modifying the {@link Staff} properties.
6434
6475
  */
6435
6476
  staveProfile?: StaveProfile | keyof typeof StaveProfile | Lowercase<keyof typeof StaveProfile>;
6436
6477
  /**
@@ -6546,7 +6587,7 @@ declare interface DisplaySettingsJson {
6546
6587
  * The top padding applied to first system.
6547
6588
  * @since 1.4.0
6548
6589
  * @category Display
6549
- * @defaultValue `5`
6590
+ * @defaultValue `0`
6550
6591
  */
6551
6592
  firstSystemPaddingTop?: number;
6552
6593
  /**
@@ -6560,14 +6601,14 @@ declare interface DisplaySettingsJson {
6560
6601
  * The bottom padding applied to systems beside the last one.
6561
6602
  * @since 1.4.0
6562
6603
  * @category Display
6563
- * @defaultValue `20`
6604
+ * @defaultValue `10`
6564
6605
  */
6565
6606
  systemPaddingBottom?: number;
6566
6607
  /**
6567
6608
  * The bottom padding applied to the last system.
6568
6609
  * @since 1.4.0
6569
6610
  * @category Display
6570
- * @defaultValue `0`
6611
+ * @defaultValue `5`
6571
6612
  */
6572
6613
  lastSystemPaddingBottom?: number;
6573
6614
  /**
@@ -6592,17 +6633,31 @@ declare interface DisplaySettingsJson {
6592
6633
  */
6593
6634
  accoladeBarPaddingRight?: number;
6594
6635
  /**
6595
- * The bottom padding applied to main notation staves (standard, tabs, numbered, slash).
6636
+ * The top padding applied to the first main notation staff (standard, tabs, numbered, slash).
6637
+ * @since 1.8.0
6638
+ * @category Display
6639
+ * @defaultValue `0`
6640
+ */
6641
+ firstNotationStaffPaddingTop?: number;
6642
+ /**
6643
+ * The bottom padding applied to last main notation staff (standard, tabs, numbered, slash).
6644
+ * @since 1.8.0
6645
+ * @category Display
6646
+ * @defaultValue `0`
6647
+ */
6648
+ lastNotationStaffPaddingBottom?: number;
6649
+ /**
6650
+ * The top padding applied to main notation staves (standard, tabs, numbered, slash).
6596
6651
  * @since 1.4.0
6597
6652
  * @category Display
6598
- * @defaultValue `5`
6653
+ * @defaultValue `0`
6599
6654
  */
6600
6655
  notationStaffPaddingTop?: number;
6601
6656
  /**
6602
6657
  * The bottom padding applied to main notation staves (standard, tabs, numbered, slash).
6603
6658
  * @since 1.4.0
6604
6659
  * @category Display
6605
- * @defaultValue `5`
6660
+ * @defaultValue `0`
6606
6661
  */
6607
6662
  notationStaffPaddingBottom?: number;
6608
6663
  /**
@@ -6610,6 +6665,8 @@ declare interface DisplaySettingsJson {
6610
6665
  * @since 1.4.0
6611
6666
  * @category Display
6612
6667
  * @defaultValue `0`
6668
+ * @deprecated Effect staves do not exist anymore, effects are now part of the main notation staves. This value has no effect anymore.
6669
+ * Use {@link effectBandPaddingBottom} to control the padding after effect bands.
6613
6670
  */
6614
6671
  effectStaffPaddingTop?: number;
6615
6672
  /**
@@ -6617,6 +6674,8 @@ declare interface DisplaySettingsJson {
6617
6674
  * @since 1.4.0
6618
6675
  * @category Display
6619
6676
  * @defaultValue `0`
6677
+ * @deprecated Effect staves do not exist anymore, effects are now part of the main notation staves. This value has no effect anymore.
6678
+ * Use {@link effectBandPaddingBottom} to control the padding after effect bands.
6620
6679
  */
6621
6680
  effectStaffPaddingBottom?: number;
6622
6681
  /**
@@ -6640,6 +6699,13 @@ declare interface DisplaySettingsJson {
6640
6699
  * @defaultValue `2`
6641
6700
  */
6642
6701
  effectBandPaddingBottom?: number;
6702
+ /**
6703
+ * The additional padding to apply between the staves of two separate tracks.
6704
+ * @since 1.8.0
6705
+ * @category Display
6706
+ * @defaultValue `5`
6707
+ */
6708
+ trackStaffPaddingBetween?: number;
6643
6709
  /**
6644
6710
  * The mode used to arrange staves and systems.
6645
6711
  * @since 1.3.0
@@ -7193,6 +7259,11 @@ export declare class EngravingSettings {
7193
7259
  * The size of the dashes on bends (e.g. on holds)
7194
7260
  */
7195
7261
  tabBendDashSize: number;
7262
+ /**
7263
+ * The additional padding between the staff and the point
7264
+ * where bend values are calculated from.
7265
+ */
7266
+ tabBendStaffPadding: number;
7196
7267
  /**
7197
7268
  * The height applied per quarter-note.
7198
7269
  */
@@ -7580,6 +7651,11 @@ declare interface EngravingSettingsJson {
7580
7651
  * The size of the dashes on bends (e.g. on holds)
7581
7652
  */
7582
7653
  tabBendDashSize?: number;
7654
+ /**
7655
+ * The additional padding between the staff and the point
7656
+ * where bend values are calculated from.
7657
+ */
7658
+ tabBendStaffPadding?: number;
7583
7659
  /**
7584
7660
  * The height applied per quarter-note.
7585
7661
  */
@@ -7710,13 +7786,6 @@ declare interface EngravingStemInfoJson {
7710
7786
  * @public
7711
7787
  */
7712
7788
  export declare class Environment {
7713
- private static readonly _staffIdBeforeSlashAlways;
7714
- private static readonly _staffIdBeforeScoreAlways;
7715
- private static readonly _staffIdBeforeScoreHideable;
7716
- private static readonly _staffIdBeforeNumberedAlways;
7717
- private static readonly _staffIdBeforeTabAlways;
7718
- private static readonly _staffIdBeforeTabHideable;
7719
- private static readonly _staffIdBeforeEndAlways;
7720
7789
 
7721
7790
  /**
7722
7791
  * @target web
@@ -7800,7 +7869,7 @@ export declare class Environment {
7800
7869
  * @partial
7801
7870
  */
7802
7871
  private static _createPlatformSpecificRenderEngines;
7803
- private static _createDefaultRenderers;
7872
+
7804
7873
  private static _createDefaultStaveProfiles;
7805
7874
  private static _createDefaultLayoutEngines;
7806
7875
  /**
@@ -9051,6 +9120,12 @@ declare interface IMidiFileHandler {
9051
9120
  * @param tick The end tick for this track.
9052
9121
  */
9053
9122
  finishTrack(track: number, tick: number): void;
9123
+ /**
9124
+ * Registers a general shift of the time-axis for the generate midi file.
9125
+ * @param tickShift The shift in midi ticks by which all midi events beside the initial channel setups are shifted.
9126
+ * This shift is applied in case grace beats
9127
+ */
9128
+ addTickShift(tickShift: number): void;
9054
9129
  }
9055
9130
 
9056
9131
  /**
@@ -10608,6 +10683,12 @@ declare class MidiFile {
10608
10683
  * Gets or sets the division per quarter notes.
10609
10684
  */
10610
10685
  division: number;
10686
+ /**
10687
+ * An indicator by how many midi-ticks the song contents are shifted.
10688
+ * Grace beats at start might require a shift for the first beat to start at 0.
10689
+ * This information can be used to translate back the player time axis to the music notation.
10690
+ */
10691
+ tickShift: number;
10611
10692
  /**
10612
10693
  * Gets a list of midi events sorted by time.
10613
10694
  */
@@ -10690,6 +10771,7 @@ declare class MidiFileGenerator {
10690
10771
  * Starts the generation of the midi file.
10691
10772
  */
10692
10773
  generate(): void;
10774
+ private _detectTickShift;
10693
10775
  private _generateTrack;
10694
10776
  private _addProgramChange;
10695
10777
  private _addBankChange;
@@ -11562,7 +11644,11 @@ export declare enum NotationElement {
11562
11644
  /**
11563
11645
  * The absolute playback time of beats.
11564
11646
  */
11565
- EffectBeatTimer = 49
11647
+ EffectBeatTimer = 49,
11648
+ /**
11649
+ * The whammy bar line effect shown above the tab staff
11650
+ */
11651
+ EffectWhammyBarLine = 50
11566
11652
  }
11567
11653
 
11568
11654
  /**
@@ -11722,7 +11808,7 @@ export declare class NotationSettings {
11722
11808
  * Controls how high the ryhthm notation is rendered below the tab staff
11723
11809
  * @since 0.9.6
11724
11810
  * @category Notation
11725
- * @defaultValue `15`
11811
+ * @defaultValue `25`
11726
11812
  * @remarks
11727
11813
  * This setting can be used in combination with the {@link rhythmMode} setting to control how high the rhythm notation should be rendered below the tab staff.
11728
11814
  */
@@ -11935,7 +12021,7 @@ declare interface NotationSettingsJson {
11935
12021
  * Controls how high the ryhthm notation is rendered below the tab staff
11936
12022
  * @since 0.9.6
11937
12023
  * @category Notation
11938
- * @defaultValue `15`
12024
+ * @defaultValue `25`
11939
12025
  * @remarks
11940
12026
  * This setting can be used in combination with the {@link rhythmMode} setting to control how high the rhythm notation should be rendered below the tab staff.
11941
12027
  */
@@ -13981,6 +14067,10 @@ declare class RenderStylesheet {
13981
14067
  * If single track: Whether to render multiple subsequent empty (or rest-only) bars together as multi-bar rest.
13982
14068
  */
13983
14069
  perTrackMultiBarRest: Set<number> | null;
14070
+ /**
14071
+ * Whether barlines should be drawn across staves within the same system.
14072
+ */
14073
+ extendBarLines: boolean;
13984
14074
  }
13985
14075
 
13986
14076
  /**