@coderline/alphatab 1.6.0-alpha.1428 → 1.6.0-alpha.1432
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.
- package/dist/alphaTab.core.min.mjs +2 -2
- package/dist/alphaTab.core.mjs +415 -114
- package/dist/alphaTab.d.ts +218 -26
- package/dist/alphaTab.js +415 -114
- package/dist/alphaTab.min.js +2 -2
- package/dist/alphaTab.min.mjs +1 -1
- package/dist/alphaTab.mjs +1 -1
- package/dist/alphaTab.vite.js +1 -1
- package/dist/alphaTab.vite.mjs +1 -1
- package/dist/alphaTab.webpack.js +1 -1
- package/dist/alphaTab.webpack.mjs +1 -1
- package/dist/alphaTab.worker.min.mjs +1 -1
- package/dist/alphaTab.worker.mjs +1 -1
- package/dist/alphaTab.worklet.min.mjs +1 -1
- package/dist/alphaTab.worklet.mjs +1 -1
- package/package.json +1 -1
package/dist/alphaTab.d.ts
CHANGED
|
@@ -3014,6 +3014,155 @@ declare enum AlphaTabSystemExclusiveEvents {
|
|
|
3014
3014
|
Rest = 1
|
|
3015
3015
|
}
|
|
3016
3016
|
|
|
3017
|
+
/**
|
|
3018
|
+
* This importer can parse alphaTex markup into a score structure.
|
|
3019
|
+
*/
|
|
3020
|
+
declare class AlphaTexImporter extends ScoreImporter {
|
|
3021
|
+
private static readonly Eof;
|
|
3022
|
+
private _trackChannel;
|
|
3023
|
+
private _score;
|
|
3024
|
+
private _currentTrack;
|
|
3025
|
+
private _currentStaff;
|
|
3026
|
+
private _barIndex;
|
|
3027
|
+
private _voiceIndex;
|
|
3028
|
+
private _input;
|
|
3029
|
+
private _ch;
|
|
3030
|
+
private _curChPos;
|
|
3031
|
+
private _line;
|
|
3032
|
+
private _col;
|
|
3033
|
+
private _lastValidSpot;
|
|
3034
|
+
private _sy;
|
|
3035
|
+
private _syData;
|
|
3036
|
+
private _allowNegatives;
|
|
3037
|
+
private _allowFloat;
|
|
3038
|
+
private _allowTuning;
|
|
3039
|
+
private _currentDuration;
|
|
3040
|
+
private _currentDynamics;
|
|
3041
|
+
private _currentTuplet;
|
|
3042
|
+
private _lyrics;
|
|
3043
|
+
private _staffHasExplicitDisplayTransposition;
|
|
3044
|
+
private _staffHasExplicitTuning;
|
|
3045
|
+
private _staffTuningApplied;
|
|
3046
|
+
private _percussionArticulationNames;
|
|
3047
|
+
private _sustainPedalToBeat;
|
|
3048
|
+
private _slurs;
|
|
3049
|
+
private _articulationValueToIndex;
|
|
3050
|
+
private _accidentalMode;
|
|
3051
|
+
private _syncPoints;
|
|
3052
|
+
logErrors: boolean;
|
|
3053
|
+
get name(): string;
|
|
3054
|
+
initFromString(tex: string, settings: Settings): void;
|
|
3055
|
+
readScore(): Score;
|
|
3056
|
+
private syncPoints;
|
|
3057
|
+
private syncPoint;
|
|
3058
|
+
private error;
|
|
3059
|
+
private errorMessage;
|
|
3060
|
+
/**
|
|
3061
|
+
* Initializes the song with some required default values.
|
|
3062
|
+
* @returns
|
|
3063
|
+
*/
|
|
3064
|
+
private createDefaultScore;
|
|
3065
|
+
private newTrack;
|
|
3066
|
+
/**
|
|
3067
|
+
* Converts a clef string into the clef value.
|
|
3068
|
+
* @param str the string to convert
|
|
3069
|
+
* @returns the clef value
|
|
3070
|
+
*/
|
|
3071
|
+
private parseClefFromString;
|
|
3072
|
+
/**
|
|
3073
|
+
* Converts a clef tuning into the clef value.
|
|
3074
|
+
* @param i the tuning value to convert
|
|
3075
|
+
* @returns the clef value
|
|
3076
|
+
*/
|
|
3077
|
+
private parseClefFromInt;
|
|
3078
|
+
private parseTripletFeelFromString;
|
|
3079
|
+
private parseTripletFeelFromInt;
|
|
3080
|
+
/**
|
|
3081
|
+
* Converts a keysignature string into the assocciated value.
|
|
3082
|
+
* @param str the string to convert
|
|
3083
|
+
* @returns the assocciated keysignature value
|
|
3084
|
+
*/
|
|
3085
|
+
private parseKeySignature;
|
|
3086
|
+
private parseKeySignatureType;
|
|
3087
|
+
/**
|
|
3088
|
+
* Reads, saves, and returns the next character of the source stream.
|
|
3089
|
+
*/
|
|
3090
|
+
private nextChar;
|
|
3091
|
+
/**
|
|
3092
|
+
* Saves the current position, line, and column.
|
|
3093
|
+
* All parsed data until this point is assumed to be valid.
|
|
3094
|
+
*/
|
|
3095
|
+
private saveValidSpot;
|
|
3096
|
+
/**
|
|
3097
|
+
* Reads, saves, and returns the next terminal symbol.
|
|
3098
|
+
*/
|
|
3099
|
+
private newSy;
|
|
3100
|
+
private readNumberOrName;
|
|
3101
|
+
/**
|
|
3102
|
+
* Checks if the given character is a valid letter for a name.
|
|
3103
|
+
* (no control characters, whitespaces, numbers or dots)
|
|
3104
|
+
*/
|
|
3105
|
+
private static isNameLetter;
|
|
3106
|
+
private static isTerminal;
|
|
3107
|
+
private static isWhiteSpace;
|
|
3108
|
+
private isDigit;
|
|
3109
|
+
/**
|
|
3110
|
+
* Reads a string from the stream.
|
|
3111
|
+
* @returns the read string.
|
|
3112
|
+
*/
|
|
3113
|
+
private readName;
|
|
3114
|
+
private metaData;
|
|
3115
|
+
headerFooterStyle(element: ScoreSubElement): void;
|
|
3116
|
+
private parseTrackNamePolicy;
|
|
3117
|
+
private parseTrackNameMode;
|
|
3118
|
+
private parseTrackNameOrientation;
|
|
3119
|
+
private handleStaffMeta;
|
|
3120
|
+
private handleAccidentalMode;
|
|
3121
|
+
private makeCurrentStaffPitched;
|
|
3122
|
+
/**
|
|
3123
|
+
* Encodes a given string to a shorthand text form without spaces or special characters
|
|
3124
|
+
*/
|
|
3125
|
+
private static toArticulationId;
|
|
3126
|
+
private applyPercussionStaff;
|
|
3127
|
+
private chordProperties;
|
|
3128
|
+
private bars;
|
|
3129
|
+
private trackStaffMeta;
|
|
3130
|
+
private handleNewVoice;
|
|
3131
|
+
private beginStaff;
|
|
3132
|
+
private trackProperties;
|
|
3133
|
+
private staffProperties;
|
|
3134
|
+
private bar;
|
|
3135
|
+
private newBar;
|
|
3136
|
+
private beat;
|
|
3137
|
+
private beatDuration;
|
|
3138
|
+
private beatEffects;
|
|
3139
|
+
/**
|
|
3140
|
+
* Tries to apply a beat effect to the given beat.
|
|
3141
|
+
* @returns true if a effect could be applied, otherwise false
|
|
3142
|
+
*/
|
|
3143
|
+
private applyBeatEffect;
|
|
3144
|
+
private parseBracketExtendMode;
|
|
3145
|
+
private parseFermataFromString;
|
|
3146
|
+
private parseClefOttavaFromString;
|
|
3147
|
+
private getChordId;
|
|
3148
|
+
private static applyTuplet;
|
|
3149
|
+
private isNoteText;
|
|
3150
|
+
private note;
|
|
3151
|
+
private noteEffects;
|
|
3152
|
+
private harmonicValue;
|
|
3153
|
+
private toFinger;
|
|
3154
|
+
private parseDuration;
|
|
3155
|
+
private parseBendStyle;
|
|
3156
|
+
private parseBendType;
|
|
3157
|
+
private barMeta;
|
|
3158
|
+
private parseBarLineStyle;
|
|
3159
|
+
private parseSimileMarkFromString;
|
|
3160
|
+
private handleDirections;
|
|
3161
|
+
private readTempoAutomation;
|
|
3162
|
+
private applyAlternateEnding;
|
|
3163
|
+
private parseWhammyType;
|
|
3164
|
+
}
|
|
3165
|
+
|
|
3017
3166
|
/**
|
|
3018
3167
|
* Automations are used to change the behaviour of a song.
|
|
3019
3168
|
* @cloneable
|
|
@@ -3092,17 +3241,48 @@ declare class BackingTrack {
|
|
|
3092
3241
|
* Rerpresents a point to sync the alphaTab time axis with an external backing track.
|
|
3093
3242
|
*/
|
|
3094
3243
|
declare class BackingTrackSyncPoint {
|
|
3095
|
-
|
|
3096
|
-
|
|
3097
|
-
|
|
3098
|
-
|
|
3099
|
-
|
|
3100
|
-
|
|
3101
|
-
|
|
3102
|
-
|
|
3103
|
-
|
|
3104
|
-
|
|
3105
|
-
|
|
3244
|
+
/**
|
|
3245
|
+
* The index of the masterbar to which this sync point belongs to.
|
|
3246
|
+
* @remarks
|
|
3247
|
+
* This property is purely informative for external use like in editors.
|
|
3248
|
+
* It has no impact to the synchronization itself.
|
|
3249
|
+
*/
|
|
3250
|
+
masterBarIndex: number;
|
|
3251
|
+
/**
|
|
3252
|
+
* The occurence of the masterbar to which this sync point belongs to. The occurence
|
|
3253
|
+
* is 0-based and increases with every repeated play of a masterbar (e.g. on repeats or jumps).
|
|
3254
|
+
* @remarks
|
|
3255
|
+
* This property is purely informative for external use like in editors.
|
|
3256
|
+
* It has no impact to the synchronization itself.
|
|
3257
|
+
*/
|
|
3258
|
+
masterBarOccurence: number;
|
|
3259
|
+
/**
|
|
3260
|
+
* The BPM the synthesizer has at the exact tick position of this sync point.
|
|
3261
|
+
*/
|
|
3262
|
+
synthBpm: number;
|
|
3263
|
+
/**
|
|
3264
|
+
* The millisecond time position of the synthesizer when this sync point is reached.
|
|
3265
|
+
*/
|
|
3266
|
+
synthTime: number;
|
|
3267
|
+
/**
|
|
3268
|
+
* The midi tick position of the synthesizer when this sync point is reached.
|
|
3269
|
+
*/
|
|
3270
|
+
synthTick: number;
|
|
3271
|
+
/**
|
|
3272
|
+
* The millisecond time in the external media marking the synchronization point.
|
|
3273
|
+
*/
|
|
3274
|
+
syncTime: number;
|
|
3275
|
+
/**
|
|
3276
|
+
* The BPM the song will have virtually after this sync point to align the external media time axis
|
|
3277
|
+
* with the one from the synthesizer.
|
|
3278
|
+
*/
|
|
3279
|
+
syncBpm: number;
|
|
3280
|
+
/**
|
|
3281
|
+
* Updates the synchronization BPM that will apply after this sync point.
|
|
3282
|
+
* @param nextSyncPointSynthTime The synthesizer time of the next sync point after this one.
|
|
3283
|
+
* @param nextSyncPointSyncTime The synchronization time of the next sync point after this one.
|
|
3284
|
+
*/
|
|
3285
|
+
updateSyncBpm(nextSyncPointSynthTime: number, nextSyncPointSyncTime: number): void;
|
|
3106
3286
|
}
|
|
3107
3287
|
|
|
3108
3288
|
/**
|
|
@@ -3180,6 +3360,11 @@ declare class Bar {
|
|
|
3180
3360
|
* Whether this bar is fully empty (not even having rests).
|
|
3181
3361
|
*/
|
|
3182
3362
|
get isEmpty(): boolean;
|
|
3363
|
+
/**
|
|
3364
|
+
* Whether this bar has any changes applied which are not related to the voices in it.
|
|
3365
|
+
* (e.g. new key signatures)
|
|
3366
|
+
*/
|
|
3367
|
+
get hasChanges(): boolean;
|
|
3183
3368
|
/**
|
|
3184
3369
|
* Whether this bar is empty or has only rests.
|
|
3185
3370
|
*/
|
|
@@ -6341,6 +6526,7 @@ export declare class Environment {
|
|
|
6341
6526
|
* @partial
|
|
6342
6527
|
*/
|
|
6343
6528
|
private static printPlatformInfo;
|
|
6529
|
+
/* Excluded from this release type: prepareForPostMessage */
|
|
6344
6530
|
}
|
|
6345
6531
|
|
|
6346
6532
|
export declare namespace exporter {
|
|
@@ -6492,13 +6678,7 @@ declare interface FlatSyncPoint {
|
|
|
6492
6678
|
*/
|
|
6493
6679
|
barOccurence: number;
|
|
6494
6680
|
/**
|
|
6495
|
-
* The
|
|
6496
|
-
* This information is used together with normal tempo changes to calculate how much faster/slower the
|
|
6497
|
-
* cursor playback is performed to align with the audio track.
|
|
6498
|
-
*/
|
|
6499
|
-
modifiedTempo: number;
|
|
6500
|
-
/**
|
|
6501
|
-
* The uadio offset marking the position within the audio track in milliseconds.
|
|
6681
|
+
* The audio offset marking the position within the audio track in milliseconds.
|
|
6502
6682
|
* This information is used to regularly sync (or on seeking) to match a given external audio time axis with the internal time axis.
|
|
6503
6683
|
*/
|
|
6504
6684
|
millisecondOffset: number;
|
|
@@ -7644,7 +7824,8 @@ export declare namespace importer {
|
|
|
7644
7824
|
export {
|
|
7645
7825
|
ScoreImporter,
|
|
7646
7826
|
ScoreLoader,
|
|
7647
|
-
UnsupportedFormatError
|
|
7827
|
+
UnsupportedFormatError,
|
|
7828
|
+
AlphaTexImporter
|
|
7648
7829
|
}
|
|
7649
7830
|
}
|
|
7650
7831
|
|
|
@@ -8658,6 +8839,12 @@ declare class MasterBar {
|
|
|
8658
8839
|
* @json_ignore
|
|
8659
8840
|
*/
|
|
8660
8841
|
index: number;
|
|
8842
|
+
/**
|
|
8843
|
+
* Whether the masterbar is has any changes applied to it (e.g. tempo changes, time signature changes etc)
|
|
8844
|
+
* The first bar is always considered changed due to initial setup of values. It does not consider
|
|
8845
|
+
* elements like whether the tempo really changes to the previous bar.
|
|
8846
|
+
*/
|
|
8847
|
+
get hasChanges(): boolean;
|
|
8661
8848
|
/**
|
|
8662
8849
|
* The key signature used on all bars.
|
|
8663
8850
|
* @deprecated Use key signatures on bar level
|
|
@@ -9271,7 +9458,11 @@ declare class MidiFileGenerator {
|
|
|
9271
9458
|
* @returns The generated sync points for usage in the backing track playback.
|
|
9272
9459
|
*/
|
|
9273
9460
|
static generateSyncPoints(score: Score): BackingTrackSyncPoint[];
|
|
9461
|
+
/* Excluded from this release type: buildModifiedTempoLookup */
|
|
9274
9462
|
private static playThroughSong;
|
|
9463
|
+
private static processBarTime;
|
|
9464
|
+
private static processBarTimeWithSyncPoints;
|
|
9465
|
+
private static processBarTimeNoSyncPoints;
|
|
9275
9466
|
private static toChannelShort;
|
|
9276
9467
|
private generateMasterBar;
|
|
9277
9468
|
private generateBar;
|
|
@@ -9415,7 +9606,7 @@ declare class MidiFileSequencerTempoChange {
|
|
|
9415
9606
|
declare class MidiSequencerState {
|
|
9416
9607
|
tempoChanges: MidiFileSequencerTempoChange[];
|
|
9417
9608
|
tempoChangeIndex: number;
|
|
9418
|
-
syncPoints:
|
|
9609
|
+
syncPoints: BackingTrackSyncPoint[];
|
|
9419
9610
|
firstProgramEventPerChannel: Map<number, SynthEvent>;
|
|
9420
9611
|
firstTimeSignatureNumerator: number;
|
|
9421
9612
|
firstTimeSignatureDenominator: number;
|
|
@@ -12923,6 +13114,13 @@ declare abstract class ScoreLayout {
|
|
|
12923
13114
|
* available importers
|
|
12924
13115
|
*/
|
|
12925
13116
|
declare class ScoreLoader {
|
|
13117
|
+
/**
|
|
13118
|
+
* Loads the given alphaTex string.
|
|
13119
|
+
* @param tex The alphaTex string.
|
|
13120
|
+
* @param settings The settings to use for parsing.
|
|
13121
|
+
* @returns The parsed {@see Score}.
|
|
13122
|
+
*/
|
|
13123
|
+
static loadAlphaTex(tex: string, settings?: Settings): Score;
|
|
12926
13124
|
/**
|
|
12927
13125
|
* Loads a score asynchronously from the given datasource
|
|
12928
13126
|
* @param path the source path to load the binary file from
|
|
@@ -13656,12 +13854,6 @@ declare class SyncPointData {
|
|
|
13656
13854
|
* Indicates for which repeat occurence this sync point is valid (e.g. 0 on the first time played, 1 on the second time played)
|
|
13657
13855
|
*/
|
|
13658
13856
|
barOccurence: number;
|
|
13659
|
-
/**
|
|
13660
|
-
* The modified tempo at which the cursor should move (aka. the tempo played within the external audio track).
|
|
13661
|
-
* This information is used together with normal tempo changes to calculate how much faster/slower the
|
|
13662
|
-
* cursor playback is performed to align with the audio track.
|
|
13663
|
-
*/
|
|
13664
|
-
modifiedTempo: number;
|
|
13665
13857
|
/**
|
|
13666
13858
|
* The audio offset marking the position within the audio track in milliseconds.
|
|
13667
13859
|
* This information is used to regularly sync (or on seeking) to match a given external audio time axis with the internal time axis.
|