@coderline/alphatab 1.9.0-alpha.1883 → 1.9.0-alpha.1962
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/LICENSE.header +0 -24
- package/dist/alphaTab.core.min.mjs +2 -26
- package/dist/alphaTab.core.mjs +8248 -7433
- package/dist/alphaTab.d.ts +155 -3
- package/dist/alphaTab.js +8229 -7413
- package/dist/alphaTab.min.js +2 -26
- package/dist/alphaTab.min.mjs +1 -25
- package/dist/alphaTab.mjs +1 -25
- package/dist/alphaTab.worker.min.mjs +1 -25
- package/dist/alphaTab.worker.mjs +1 -25
- package/dist/alphaTab.worklet.min.mjs +1 -25
- package/dist/alphaTab.worklet.mjs +1 -25
- package/package.json +7 -7
package/dist/alphaTab.d.ts
CHANGED
|
@@ -226,6 +226,7 @@ declare class AlphaSynthMidiFileHandler implements IMidiFileHandler {
|
|
|
226
226
|
addTickShift(tickShift: number): void;
|
|
227
227
|
addTimeSignature(tick: number, timeSignatureNumerator: number, timeSignatureDenominator: number): void;
|
|
228
228
|
addRest(track: number, tick: number, channel: number): void;
|
|
229
|
+
addMetronome(tick: number, counter: number, durationInTicks: number): void;
|
|
229
230
|
addNote(track: number, start: number, length: number, key: number, velocity: number, channel: number): void;
|
|
230
231
|
private static _fixValue;
|
|
231
232
|
addControlChange(track: number, tick: number, channel: number, controller: ControllerType, value: number): void;
|
|
@@ -2087,6 +2088,10 @@ export declare class AlphaTabApiBase<TSettings> {
|
|
|
2087
2088
|
private _onNoteMouseUp;
|
|
2088
2089
|
private _updateSelectionCursor;
|
|
2089
2090
|
private _setupClickHandling;
|
|
2091
|
+
/**
|
|
2092
|
+
* Rebuilds the selection highlight against the current layout. A selection without an end beat yields an empty highlight.
|
|
2093
|
+
*/
|
|
2094
|
+
private _refreshSelectionHighlight;
|
|
2090
2095
|
/**
|
|
2091
2096
|
* Places the highlight markers at the specified start and end-beat range.
|
|
2092
2097
|
* @param startBeat The start beat where the selection should start
|
|
@@ -3144,8 +3149,9 @@ export declare enum AlphaTabErrorType {
|
|
|
3144
3149
|
}
|
|
3145
3150
|
|
|
3146
3151
|
/**
|
|
3147
|
-
* Represents a metronome event.
|
|
3148
|
-
*
|
|
3152
|
+
* Represents a metronome event. alphaTab places these events bar by bar into the midi files generated for playback
|
|
3153
|
+
* (respecting repeats, time signatures and pick-up bars). They are not written into standard midi files (SMF1 mode).
|
|
3154
|
+
* For midi files without these events the synthesizer generates them during playback according to the time signatures.
|
|
3149
3155
|
* @public
|
|
3150
3156
|
*/
|
|
3151
3157
|
declare class AlphaTabMetronomeEvent extends AlphaTabSysExEvent {
|
|
@@ -3246,6 +3252,7 @@ export declare namespace alphaTex {
|
|
|
3246
3252
|
AlphaTexDiagnosticCode,
|
|
3247
3253
|
AlphaTexDiagnosticsSeverity,
|
|
3248
3254
|
AlphaTexStaffNoteKind,
|
|
3255
|
+
AlphaTexStaffType,
|
|
3249
3256
|
AlphaTexVoiceMode,
|
|
3250
3257
|
ArgumentListParseTypesMode,
|
|
3251
3258
|
IAlphaTexImporter,
|
|
@@ -3619,6 +3626,10 @@ declare enum AlphaTexDiagnosticCode {
|
|
|
3619
3626
|
* Error parsing arguments: unexpected additional arguments. Signatures: %s
|
|
3620
3627
|
*/
|
|
3621
3628
|
AT220 = 220,
|
|
3629
|
+
/**
|
|
3630
|
+
* A string number can only be specified on pitched notes, use the 'fret.string' syntax to specify the string of fretted notes.
|
|
3631
|
+
*/
|
|
3632
|
+
AT221 = 221,
|
|
3622
3633
|
/**
|
|
3623
3634
|
* Expected no arguments, but found some.
|
|
3624
3635
|
*/
|
|
@@ -3647,6 +3658,10 @@ declare enum AlphaTexDiagnosticCode {
|
|
|
3647
3658
|
* This staff metadata tag should be specified as staff property.
|
|
3648
3659
|
*/
|
|
3649
3660
|
AT306 = 306,
|
|
3661
|
+
/**
|
|
3662
|
+
* The staff display property is not supported by the staff type, the value has no effect.
|
|
3663
|
+
*/
|
|
3664
|
+
AT307 = 307,
|
|
3650
3665
|
/**
|
|
3651
3666
|
* The dots separating score metadata, score contents and the sync points can be removed.
|
|
3652
3667
|
*/
|
|
@@ -4087,6 +4102,21 @@ declare enum AlphaTexStaffNoteKind {
|
|
|
4087
4102
|
Articulation = 2
|
|
4088
4103
|
}
|
|
4089
4104
|
|
|
4105
|
+
/**
|
|
4106
|
+
* The staff types selected by the alphaTex staff display tags (`\defaultStaffDisplay`, `\staffDisplay`, `\barDisplay`).
|
|
4107
|
+
* @public
|
|
4108
|
+
*/
|
|
4109
|
+
declare enum AlphaTexStaffType {
|
|
4110
|
+
/** Standard notation */
|
|
4111
|
+
Score = 0,
|
|
4112
|
+
/** Guitar tablature */
|
|
4113
|
+
Tabs = 1,
|
|
4114
|
+
/** Slash notation */
|
|
4115
|
+
Slash = 2,
|
|
4116
|
+
/** Numbered notation (Jianpu) */
|
|
4117
|
+
Numbered = 3
|
|
4118
|
+
}
|
|
4119
|
+
|
|
4090
4120
|
/**
|
|
4091
4121
|
* A string literal within alphaTex.
|
|
4092
4122
|
* @record
|
|
@@ -4283,6 +4313,10 @@ declare class Automation {
|
|
|
4283
4313
|
syncPointValue: SyncPointData | undefined;
|
|
4284
4314
|
/**
|
|
4285
4315
|
* Gets or sets the relative position of of the automation.
|
|
4316
|
+
* @remarks
|
|
4317
|
+
* The position is relative to the full duration of the bar's time signature (0 = bar start, 1 = bar end).
|
|
4318
|
+
* This also applies to pick-up bars (`MasterBar.isAnacrusis`) which are shorter than their time signature:
|
|
4319
|
+
* an automation on the 3rd eighth note of a 3/8 pick-up in 2/4 has the position 0.5 (as written by Guitar Pro).
|
|
4286
4320
|
*/
|
|
4287
4321
|
ratioPosition: number;
|
|
4288
4322
|
/**
|
|
@@ -4326,7 +4360,7 @@ declare enum AutomationType {
|
|
|
4326
4360
|
/**
|
|
4327
4361
|
* Midi Bank change.
|
|
4328
4362
|
*/
|
|
4329
|
-
Bank =
|
|
4363
|
+
Bank = 5
|
|
4330
4364
|
}
|
|
4331
4365
|
|
|
4332
4366
|
/**
|
|
@@ -7918,6 +7952,29 @@ export declare class EngravingSettings {
|
|
|
7918
7952
|
* in case of multi-voice note head overlaps.
|
|
7919
7953
|
*/
|
|
7920
7954
|
multiVoiceDisplacedNoteHeadSpacing: number;
|
|
7955
|
+
/**
|
|
7956
|
+
* The minimum vertical padding between the content of two adjacent staves
|
|
7957
|
+
* (e.g. a stem below one staff and a fret number above the next one).
|
|
7958
|
+
* Additional space is only added between staves where their content would come closer than this.
|
|
7959
|
+
* @remarks
|
|
7960
|
+
* Behind Bars: characters should not be closer than 1/2 stave-space and never collide.
|
|
7961
|
+
*/
|
|
7962
|
+
staffContentPadding: number;
|
|
7963
|
+
/**
|
|
7964
|
+
* The minimum horizontal padding between the content of two adjacent beats
|
|
7965
|
+
* (e.g. a notehead and the accidental or grace notes of the following beat).
|
|
7966
|
+
* Additional space is only added between beats where their content would come closer than this.
|
|
7967
|
+
* @remarks
|
|
7968
|
+
* Behind Bars: where space is limited, characters should not be closer than 1/2 stave-space and never collide.
|
|
7969
|
+
*/
|
|
7970
|
+
beatContentPadding: number;
|
|
7971
|
+
/**
|
|
7972
|
+
* The minimum horizontal padding between the content of the last beat in a bar and the bar line.
|
|
7973
|
+
* Additional space is only added where the content would come closer than this.
|
|
7974
|
+
* @remarks
|
|
7975
|
+
* Behind Bars: stems must never come closer to a barline than one stave-space.
|
|
7976
|
+
*/
|
|
7977
|
+
barlineContentPadding: number;
|
|
7921
7978
|
/**
|
|
7922
7979
|
* Calculates the stem height for a note of the given duration.
|
|
7923
7980
|
* @param duration The duration to calculate the height respecting flag sizes.
|
|
@@ -8326,6 +8383,29 @@ declare interface EngravingSettingsJson {
|
|
|
8326
8383
|
* in case of multi-voice note head overlaps.
|
|
8327
8384
|
*/
|
|
8328
8385
|
multiVoiceDisplacedNoteHeadSpacing?: number;
|
|
8386
|
+
/**
|
|
8387
|
+
* The minimum vertical padding between the content of two adjacent staves
|
|
8388
|
+
* (e.g. a stem below one staff and a fret number above the next one).
|
|
8389
|
+
* Additional space is only added between staves where their content would come closer than this.
|
|
8390
|
+
* @remarks
|
|
8391
|
+
* Behind Bars: characters should not be closer than 1/2 stave-space and never collide.
|
|
8392
|
+
*/
|
|
8393
|
+
staffContentPadding?: number;
|
|
8394
|
+
/**
|
|
8395
|
+
* The minimum horizontal padding between the content of two adjacent beats
|
|
8396
|
+
* (e.g. a notehead and the accidental or grace notes of the following beat).
|
|
8397
|
+
* Additional space is only added between beats where their content would come closer than this.
|
|
8398
|
+
* @remarks
|
|
8399
|
+
* Behind Bars: where space is limited, characters should not be closer than 1/2 stave-space and never collide.
|
|
8400
|
+
*/
|
|
8401
|
+
beatContentPadding?: number;
|
|
8402
|
+
/**
|
|
8403
|
+
* The minimum horizontal padding between the content of the last beat in a bar and the bar line.
|
|
8404
|
+
* Additional space is only added where the content would come closer than this.
|
|
8405
|
+
* @remarks
|
|
8406
|
+
* Behind Bars: stems must never come closer to a barline than one stave-space.
|
|
8407
|
+
*/
|
|
8408
|
+
barlineContentPadding?: number;
|
|
8329
8409
|
/**
|
|
8330
8410
|
* The space needed by flags on the stem-side from top to bottom to place.
|
|
8331
8411
|
*/
|
|
@@ -8891,6 +8971,7 @@ declare enum GolpeType {
|
|
|
8891
8971
|
declare class Gp7Exporter extends ScoreExporter {
|
|
8892
8972
|
get name(): string;
|
|
8893
8973
|
writeScore(score: Score): void;
|
|
8974
|
+
private static _cloneScore;
|
|
8894
8975
|
}
|
|
8895
8976
|
|
|
8896
8977
|
/**
|
|
@@ -9534,10 +9615,17 @@ declare interface IContainer {
|
|
|
9534
9615
|
mouseDown: IEventEmitterOfT<IMouseEventArgs>;
|
|
9535
9616
|
/**
|
|
9536
9617
|
* This event occurs when a mouse/finger moves on top of the control.
|
|
9618
|
+
*
|
|
9619
|
+
* @remarks
|
|
9620
|
+
* While a press started on this control is active, moves are reported even if they happen outside the control.
|
|
9537
9621
|
*/
|
|
9538
9622
|
mouseMove: IEventEmitterOfT<IMouseEventArgs>;
|
|
9539
9623
|
/**
|
|
9540
9624
|
* This event occurs when a mouse/finger is released from the control.
|
|
9625
|
+
*
|
|
9626
|
+
* @remarks
|
|
9627
|
+
* Every press started on this control ends with exactly one mouseUp, also when the release happens
|
|
9628
|
+
* outside the control or the gesture is cancelled by the system.
|
|
9541
9629
|
*/
|
|
9542
9630
|
mouseUp: IEventEmitterOfT<IMouseEventArgs>;
|
|
9543
9631
|
}
|
|
@@ -9780,6 +9868,16 @@ declare interface IMidiFileHandler {
|
|
|
9780
9868
|
* This shift is applied in case grace beats
|
|
9781
9869
|
*/
|
|
9782
9870
|
addTickShift(tickShift: number): void;
|
|
9871
|
+
/**
|
|
9872
|
+
* Adds a metronome click to the generated midi file.
|
|
9873
|
+
* @param tick The midi ticks when the click should be happening.
|
|
9874
|
+
* @param counter The index of the beat within the bar as per time signature (0 = first beat of the bar).
|
|
9875
|
+
* @param durationInTicks The duration of one metronome beat in midi ticks.
|
|
9876
|
+
* @remarks
|
|
9877
|
+
* The clicks are generated bar by bar respecting repeats, the time signature and pick-up bars. Handlers
|
|
9878
|
+
* which do not need a metronome (e.g. when writing standard midi files) can ignore this call.
|
|
9879
|
+
*/
|
|
9880
|
+
addMetronome(tick: number, counter: number, durationInTicks: number): void;
|
|
9783
9881
|
}
|
|
9784
9882
|
|
|
9785
9883
|
/**
|
|
@@ -10984,6 +11082,33 @@ declare class MasterBar {
|
|
|
10984
11082
|
* @json_ignore
|
|
10985
11083
|
*/
|
|
10986
11084
|
index: number;
|
|
11085
|
+
/**
|
|
11086
|
+
* A custom string to display for the bar number as override.
|
|
11087
|
+
* Even with a custom string, this masterbar contributes to the incremental bar numbers
|
|
11088
|
+
* across the score. Set the {@link customBarNumber} for the next master bar if you want
|
|
11089
|
+
* alternative counting.
|
|
11090
|
+
*/
|
|
11091
|
+
customBarNumberText?: string;
|
|
11092
|
+
/**
|
|
11093
|
+
* A custom bar number affecting this and subsequent bar numbers.
|
|
11094
|
+
* e.g. allows setting the initial bar number to 10 and the second will be 11.
|
|
11095
|
+
* Any change to {@link customBarNumber} requires an additional call to {@link Score.finish}
|
|
11096
|
+
* to consolidate the counting.
|
|
11097
|
+
*/
|
|
11098
|
+
customBarNumber?: number;
|
|
11099
|
+
/**
|
|
11100
|
+
* The actual bar number of this masterbar respecting any Pick-Up bars and manually overriden bar numbers.
|
|
11101
|
+
* Returns NaN for pick-up bars (see {@link isAnacrusis}) Only available after data model finish.
|
|
11102
|
+
* The final bar number is not guaranteed to be unique. using {@see customBarNumber}
|
|
11103
|
+
* users might reset or change counting in any custom fashion. Do not rely on the bar number
|
|
11104
|
+
* for lookup or indexing.
|
|
11105
|
+
*/
|
|
11106
|
+
get barNumber(): number;
|
|
11107
|
+
/**
|
|
11108
|
+
* Returns the actual text displayed for this master bar respecting any custom overrides and
|
|
11109
|
+
* out-of-order numbers. Only available after data model finish.
|
|
11110
|
+
*/
|
|
11111
|
+
get barNumberText(): string;
|
|
10987
11112
|
/**
|
|
10988
11113
|
* Whether the masterbar is has any changes applied to it (e.g. tempo changes, time signature changes etc)
|
|
10989
11114
|
* The first bar is always considered changed due to initial setup of values. It does not consider
|
|
@@ -11619,6 +11744,7 @@ declare class MidiFileGenerator {
|
|
|
11619
11744
|
private static _processBarTimeNoSyncPoints;
|
|
11620
11745
|
private static _toChannelShort;
|
|
11621
11746
|
private _generateMasterBar;
|
|
11747
|
+
private _generateMetronome;
|
|
11622
11748
|
private _generateBar;
|
|
11623
11749
|
private _getPlaybackBar;
|
|
11624
11750
|
private _generateVoice;
|
|
@@ -13064,10 +13190,13 @@ declare class Note {
|
|
|
13064
13190
|
* Gets or sets the string number where the note is placed.
|
|
13065
13191
|
* 1 is the lowest string on the guitar and the bottom line on the tablature.
|
|
13066
13192
|
* It then increases the the number of strings on available on the track.
|
|
13193
|
+
* On pitched notes (no fret) the string is only an annotation shown via {@link showStringNumber}
|
|
13194
|
+
* and has no effect on playback. Staves without tuning assume a standard 6 string instrument for this case.
|
|
13067
13195
|
*/
|
|
13068
13196
|
string: number;
|
|
13069
13197
|
/**
|
|
13070
13198
|
* Gets or sets whether the string number for this note should be shown.
|
|
13199
|
+
* For pitched notes this requires {@link string} to be set.
|
|
13071
13200
|
*/
|
|
13072
13201
|
showStringNumber: boolean;
|
|
13073
13202
|
get isPiano(): boolean;
|
|
@@ -13386,6 +13515,10 @@ declare class Note {
|
|
|
13386
13515
|
style?: NoteStyle;
|
|
13387
13516
|
get stringTuning(): number;
|
|
13388
13517
|
static getStringTuning(staff: Staff, noteString: number): number;
|
|
13518
|
+
/**
|
|
13519
|
+
* The number of strings assumed for string number annotations on staves without tuning.
|
|
13520
|
+
*/
|
|
13521
|
+
private static readonly _defaultAnnotationStringCount;
|
|
13389
13522
|
get realValue(): number;
|
|
13390
13523
|
get realValueWithoutHarmonic(): number;
|
|
13391
13524
|
/**
|
|
@@ -13395,6 +13528,10 @@ declare class Note {
|
|
|
13395
13528
|
* @returns The calculated note value as midi key.
|
|
13396
13529
|
*/
|
|
13397
13530
|
calculateRealValue(applyTranspositionPitch: boolean, applyHarmonic: boolean): number;
|
|
13531
|
+
/**
|
|
13532
|
+
* The interval in semitones the harmonic sounds above the played pitch. Natural harmonics are relative to the open string
|
|
13533
|
+
* and therefore need a string, the other types are an interval above the played note on any pitched note.
|
|
13534
|
+
*/
|
|
13398
13535
|
get harmonicPitch(): number;
|
|
13399
13536
|
get initialBendValue(): number;
|
|
13400
13537
|
get displayValue(): number;
|
|
@@ -15527,8 +15664,17 @@ declare class ScoreRenderer implements IScoreRenderer {
|
|
|
15527
15664
|
updateSettings(settings: Settings): void;
|
|
15528
15665
|
renderResult(resultId: string): void;
|
|
15529
15666
|
render(renderHints?: RenderHints): void;
|
|
15667
|
+
/**
|
|
15668
|
+
* Renders within the 'render.total' profiling frame.
|
|
15669
|
+
* The finished events are raised by the caller once all profiling frames are closed:
|
|
15670
|
+
* listeners might start a new render right away (e.g. on another thread).
|
|
15671
|
+
* @returns whether the rendering finished (and the finished events need to be raised).
|
|
15672
|
+
*/
|
|
15673
|
+
private _renderProfiled;
|
|
15674
|
+
private _render;
|
|
15530
15675
|
resizeRender(): void;
|
|
15531
15676
|
private _layoutAndRender;
|
|
15677
|
+
private _notifyRenderFinished;
|
|
15532
15678
|
readonly preRender: IEventEmitterOfT<boolean>;
|
|
15533
15679
|
readonly renderFinished: IEventEmitterOfT<RenderFinishedEventArgs>;
|
|
15534
15680
|
readonly partialRenderFinished: IEventEmitterOfT<RenderFinishedEventArgs>;
|
|
@@ -16629,6 +16775,12 @@ declare class Track {
|
|
|
16629
16775
|
style?: TrackStyle;
|
|
16630
16776
|
ensureStaveCount(staveCount: number): void;
|
|
16631
16777
|
addStaff(staff: Staff): void;
|
|
16778
|
+
/**
|
|
16779
|
+
* Returns the index of {@link articulation} in {@link percussionArticulations},
|
|
16780
|
+
* appending it (deduplicated by `uniqueId`) when not yet present. Callers store the
|
|
16781
|
+
* returned index in {@link Note.percussionArticulation}.
|
|
16782
|
+
*/
|
|
16783
|
+
getOrRegisterPercussionArticulation(articulation: InstrumentArticulation): number;
|
|
16632
16784
|
finish(settings: Settings, sharedDataBag?: Map<string, unknown> | null): void;
|
|
16633
16785
|
applyLyrics(lyrics: Lyrics[]): void;
|
|
16634
16786
|
}
|