@coderline/alphatab 1.3.0-alpha.138 → 1.3.0-alpha.142

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.
@@ -958,7 +958,7 @@ declare enum AlphaTabErrorType {
958
958
  declare class AlphaTabError extends Error {
959
959
  inner: Error | null;
960
960
  type: AlphaTabErrorType;
961
- constructor(type: AlphaTabErrorType, message?: string, inner?: Error);
961
+ constructor(type: AlphaTabErrorType, message?: string | null, inner?: Error);
962
962
  }
963
963
 
964
964
  /**
@@ -1428,6 +1428,7 @@ declare enum AutomationType {
1428
1428
  * Automations are used to change the behaviour of a song.
1429
1429
  * @cloneable
1430
1430
  * @json
1431
+ * @json_strict
1431
1432
  */
1432
1433
  declare class Automation {
1433
1434
  /**
@@ -1459,6 +1460,7 @@ declare class Automation {
1459
1460
  * describe WhammyBar and String Bending effects.
1460
1461
  * @cloneable
1461
1462
  * @json
1463
+ * @json_strict
1462
1464
  */
1463
1465
  declare class BendPoint {
1464
1466
  static readonly MaxPosition: number;
@@ -1569,6 +1571,7 @@ declare enum FermataType {
1569
1571
  /**
1570
1572
  * Represents a fermata.
1571
1573
  * @json
1574
+ * @json_strict
1572
1575
  */
1573
1576
  declare class Fermata {
1574
1577
  /**
@@ -1692,6 +1695,7 @@ declare class RepeatGroup {
1692
1695
  * This class represents the rendering stylesheet.
1693
1696
  * It contains settings which control the display of the score when rendered.
1694
1697
  * @json
1698
+ * @json_strict
1695
1699
  */
1696
1700
  declare class RenderStylesheet {
1697
1701
  /**
@@ -1734,6 +1738,7 @@ declare class Lyrics {
1734
1738
  * This public class stores the midi specific information of a track needed
1735
1739
  * for playback.
1736
1740
  * @json
1741
+ * @json_strict
1737
1742
  */
1738
1743
  declare class PlaybackInformation {
1739
1744
  /**
@@ -2016,6 +2021,7 @@ declare enum Duration {
2016
2021
  /**
2017
2022
  * Describes an instrument articulation which is used for percussions.
2018
2023
  * @json
2024
+ * @json_strict
2019
2025
  */
2020
2026
  declare class InstrumentArticulation {
2021
2027
  /**
@@ -2058,6 +2064,7 @@ declare class InstrumentArticulation {
2058
2064
  * This public class describes a single track or instrument of score.
2059
2065
  * It is bascially a list of staffs containing individual music notation kinds.
2060
2066
  * @json
2067
+ * @json_strict
2061
2068
  */
2062
2069
  declare class Track {
2063
2070
  private static readonly ShortNameMaxLength;
@@ -2099,1291 +2106,1298 @@ declare class Track {
2099
2106
  percussionArticulations: InstrumentArticulation[];
2100
2107
  ensureStaveCount(staveCount: number): void;
2101
2108
  addStaff(staff: Staff): void;
2102
- finish(settings: Settings): void;
2109
+ finish(settings: Settings, sharedDataBag: Map<string, unknown>): void;
2103
2110
  applyLyrics(lyrics: Lyrics[]): void;
2104
2111
  }
2105
2112
 
2106
2113
  /**
2107
- * Lists all types of note acceuntations
2108
- */
2109
- declare enum AccentuationType {
2110
- /**
2111
- * No accentuation
2112
- */
2113
- None = 0,
2114
- /**
2115
- * Normal accentuation
2116
- */
2117
- Normal = 1,
2118
- /**
2119
- * Heavy accentuation
2120
- */
2121
- Heavy = 2
2122
- }
2123
-
2124
- /**
2125
- * Lists all types of bends
2114
+ * The score is the root node of the complete
2115
+ * model. It stores the basic information of
2116
+ * a song and stores the sub components.
2117
+ * @json
2118
+ * @json_strict
2126
2119
  */
2127
- declare enum BendType {
2120
+ declare class Score {
2121
+ private _currentRepeatGroup;
2128
2122
  /**
2129
- * No bend at all
2123
+ * The album of this song.
2130
2124
  */
2131
- None = 0,
2125
+ album: string;
2132
2126
  /**
2133
- * Individual points define the bends in a flexible manner.
2134
- * This system was mainly used in Guitar Pro 3-5
2127
+ * The artist who performs this song.
2135
2128
  */
2136
- Custom = 1,
2129
+ artist: string;
2137
2130
  /**
2138
- * Simple Bend from an unbended string to a higher note.
2131
+ * The owner of the copyright of this song.
2139
2132
  */
2140
- Bend = 2,
2133
+ copyright: string;
2141
2134
  /**
2142
- * Release of a bend that was started on an earlier note.
2135
+ * Additional instructions
2143
2136
  */
2144
- Release = 3,
2137
+ instructions: string;
2145
2138
  /**
2146
- * A bend that starts from an unbended string,
2147
- * and also releases the bend after some time.
2139
+ * The author of the music.
2148
2140
  */
2149
- BendRelease = 4,
2141
+ music: string;
2150
2142
  /**
2151
- * Holds a bend that was started on an earlier note
2143
+ * Some additional notes about the song.
2152
2144
  */
2153
- Hold = 5,
2145
+ notices: string;
2154
2146
  /**
2155
- * A bend that is already started before the note is played then it is held until the end.
2147
+ * The subtitle of the song.
2156
2148
  */
2157
- Prebend = 6,
2149
+ subTitle: string;
2158
2150
  /**
2159
- * A bend that is already started before the note is played and
2160
- * bends even further, then it is held until the end.
2151
+ * The title of the song.
2161
2152
  */
2162
- PrebendBend = 7,
2153
+ title: string;
2163
2154
  /**
2164
- * A bend that is already started before the note is played and
2165
- * then releases the bend to a lower note where it is held until the end.
2155
+ * The author of the song lyrics
2166
2156
  */
2167
- PrebendRelease = 8
2168
- }
2169
-
2170
- /**
2171
- * Lists all dynamics.
2172
- */
2173
- declare enum DynamicValue {
2157
+ words: string;
2174
2158
  /**
2175
- * pianississimo (very very soft)
2159
+ * The author of this tablature.
2176
2160
  */
2177
- PPP = 0,
2161
+ tab: string;
2178
2162
  /**
2179
- * pianissimo (very soft)
2163
+ * Gets or sets the global tempo of the song in BPM. The tempo might change via {@link MasterBar.tempo}.
2180
2164
  */
2181
- PP = 1,
2165
+ tempo: number;
2182
2166
  /**
2183
- * piano (soft)
2167
+ * Gets or sets the name/label of the tempo.
2184
2168
  */
2185
- P = 2,
2169
+ tempoLabel: string;
2186
2170
  /**
2187
- * mezzo-piano (half soft)
2171
+ * Gets or sets a list of all masterbars contained in this song.
2172
+ * @json_add addMasterBar
2188
2173
  */
2189
- MP = 3,
2174
+ masterBars: MasterBar[];
2190
2175
  /**
2191
- * mezzo-forte (half loud)
2176
+ * Gets or sets a list of all tracks contained in this song.
2177
+ * @json_add addTrack
2192
2178
  */
2193
- MF = 4,
2179
+ tracks: Track[];
2194
2180
  /**
2195
- * forte (loud)
2181
+ * Gets or sets the rendering stylesheet for this song.
2196
2182
  */
2197
- F = 5,
2183
+ stylesheet: RenderStylesheet;
2184
+ rebuildRepeatGroups(): void;
2185
+ addMasterBar(bar: MasterBar): void;
2186
+ addTrack(track: Track): void;
2187
+ finish(settings: Settings): void;
2188
+ }
2189
+
2190
+ /**
2191
+ * This public class is used to describe the beginning of a
2192
+ * section within a song. It acts like a marker.
2193
+ * @json
2194
+ * @json_strict
2195
+ */
2196
+ declare class Section {
2198
2197
  /**
2199
- * fortissimo (very loud)
2198
+ * Gets or sets the marker ID for this section.
2200
2199
  */
2201
- FF = 6,
2200
+ marker: string;
2202
2201
  /**
2203
- * fortississimo (very very loud)
2202
+ * Gets or sets the descriptional text of this section.
2204
2203
  */
2205
- FFF = 7
2204
+ text: string;
2206
2205
  }
2207
2206
 
2208
2207
  /**
2209
- * Lists all fingers.
2208
+ * This public enumeration lists all feels of triplets.
2210
2209
  */
2211
- declare enum Fingers {
2210
+ declare enum TripletFeel {
2212
2211
  /**
2213
- * Unknown type (not documented)
2212
+ * No triplet feel
2214
2213
  */
2215
- Unknown = -2,
2214
+ NoTripletFeel = 0,
2216
2215
  /**
2217
- * No finger, dead note
2216
+ * Triplet 16th
2218
2217
  */
2219
- NoOrDead = -1,
2218
+ Triplet16th = 1,
2220
2219
  /**
2221
- * The thumb
2220
+ * Triplet 8th
2222
2221
  */
2223
- Thumb = 0,
2222
+ Triplet8th = 2,
2224
2223
  /**
2225
- * The index finger
2224
+ * Dotted 16th
2226
2225
  */
2227
- IndexFinger = 1,
2226
+ Dotted16th = 3,
2228
2227
  /**
2229
- * The middle finger
2228
+ * Dotted 8th
2230
2229
  */
2231
- MiddleFinger = 2,
2230
+ Dotted8th = 4,
2232
2231
  /**
2233
- * The annular finger
2232
+ * Scottish 16th
2234
2233
  */
2235
- AnnularFinger = 3,
2234
+ Scottish16th = 5,
2236
2235
  /**
2237
- * The little finger
2236
+ * Scottish 8th
2238
2237
  */
2239
- LittleFinger = 4
2238
+ Scottish8th = 6
2240
2239
  }
2241
2240
 
2242
2241
  /**
2243
- * Lists all harmonic types.
2242
+ * The MasterBar stores information about a bar which affects
2243
+ * all tracks.
2244
+ * @json
2245
+ * @json_strict
2244
2246
  */
2245
- declare enum HarmonicType {
2247
+ declare class MasterBar {
2248
+ static readonly MaxAlternateEndings: number;
2246
2249
  /**
2247
- * No harmonics.
2250
+ * Gets or sets the bitflag for the alternate endings. Each bit defines for which repeat counts
2251
+ * the bar is played.
2248
2252
  */
2249
- None = 0,
2253
+ alternateEndings: number;
2250
2254
  /**
2251
- * Natural harmonic
2255
+ * Gets or sets the next masterbar in the song.
2256
+ * @json_ignore
2252
2257
  */
2253
- Natural = 1,
2258
+ nextMasterBar: MasterBar | null;
2254
2259
  /**
2255
- * Artificial harmonic
2260
+ * Gets or sets the next masterbar in the song.
2261
+ * @json_ignore
2256
2262
  */
2257
- Artificial = 2,
2263
+ previousMasterBar: MasterBar | null;
2258
2264
  /**
2259
- * Pinch harmonics
2265
+ * Gets the zero based index of the masterbar.
2266
+ * @json_ignore
2260
2267
  */
2261
- Pinch = 3,
2268
+ index: number;
2262
2269
  /**
2263
- * Tap harmonics
2270
+ * Gets or sets the key signature used on all bars.
2264
2271
  */
2265
- Tap = 4,
2272
+ keySignature: KeySignature;
2266
2273
  /**
2267
- * Semi harmonics
2274
+ * Gets or sets the type of key signature (major/minor)
2268
2275
  */
2269
- Semi = 5,
2276
+ keySignatureType: KeySignatureType;
2270
2277
  /**
2271
- * Feedback harmonics
2278
+ * Gets or sets whether a double bar is shown for this masterbar.
2272
2279
  */
2273
- Feedback = 6
2274
- }
2275
-
2276
- /**
2277
- * Lists the modes how accidentals are handled for notes
2278
- */
2279
- declare enum NoteAccidentalMode {
2280
+ isDoubleBar: boolean;
2280
2281
  /**
2281
- * Accidentals are calculated automatically.
2282
+ * Gets or sets whether a repeat section starts on this masterbar.
2282
2283
  */
2283
- Default = 0,
2284
+ isRepeatStart: boolean;
2285
+ get isRepeatEnd(): boolean;
2284
2286
  /**
2285
- * This will try to ensure that no accidental is shown.
2287
+ * Gets or sets the number of repeats for the current repeat section.
2286
2288
  */
2287
- ForceNone = 1,
2289
+ repeatCount: number;
2288
2290
  /**
2289
- * This will move the note one line down and applies a Naturalize.
2291
+ * Gets or sets the repeat group this bar belongs to.
2292
+ * @json_ignore
2290
2293
  */
2291
- ForceNatural = 2,
2294
+ repeatGroup: RepeatGroup;
2292
2295
  /**
2293
- * This will move the note one line down and applies a Sharp.
2296
+ * Gets or sets the time signature numerator.
2294
2297
  */
2295
- ForceSharp = 3,
2298
+ timeSignatureNumerator: number;
2296
2299
  /**
2297
- * This will move the note to be shown 2 half-notes deeper with a double sharp symbol
2300
+ * Gets or sets the time signature denominiator.
2298
2301
  */
2299
- ForceDoubleSharp = 4,
2302
+ timeSignatureDenominator: number;
2300
2303
  /**
2301
- * This will move the note one line up and applies a Flat.
2304
+ * Gets or sets whether this is bar has a common time signature.
2302
2305
  */
2303
- ForceFlat = 5,
2306
+ timeSignatureCommon: boolean;
2304
2307
  /**
2305
- * This will move the note two half notes up with a double flag symbol.
2308
+ * Gets or sets the triplet feel that is valid for this bar.
2306
2309
  */
2307
- ForceDoubleFlat = 6
2308
- }
2309
-
2310
- /**
2311
- * This public enum lists all different types of finger slide-ins on a string.
2312
- */
2313
- declare enum SlideInType {
2310
+ tripletFeel: TripletFeel;
2314
2311
  /**
2315
- * No slide.
2312
+ * Gets or sets the new section information for this bar.
2316
2313
  */
2317
- None = 0,
2314
+ section: Section | null;
2315
+ get isSectionStart(): boolean;
2318
2316
  /**
2319
- * Slide into the note from below on the same string.
2317
+ * Gets or sets the tempo automation for this bar.
2320
2318
  */
2321
- IntoFromBelow = 1,
2319
+ tempoAutomation: Automation | null;
2322
2320
  /**
2323
- * Slide into the note from above on the same string.
2321
+ * Gets or sets the reference to the score this song belongs to.
2322
+ * @json_ignore
2324
2323
  */
2325
- IntoFromAbove = 2
2326
- }
2327
-
2328
- /**
2329
- * This public enum lists all different types of finger slide-outs on a string.
2330
- */
2331
- declare enum SlideOutType {
2324
+ score: Score;
2332
2325
  /**
2333
- * No slide.
2326
+ * Gets or sets the fermatas for this bar. The key is the offset of the fermata in midi ticks.
2327
+ * @json_add addFermata
2334
2328
  */
2335
- None = 0,
2329
+ fermata: Map<number, Fermata> | null;
2336
2330
  /**
2337
- * Shift slide to next note on same string
2331
+ * The timeline position of the voice within the whole score. (unit: midi ticks)
2338
2332
  */
2339
- Shift = 1,
2333
+ start: number;
2340
2334
  /**
2341
- * Legato slide to next note on same string.
2335
+ * Gets or sets a value indicating whether the master bar is an anacrusis (aka. pickup bar)
2342
2336
  */
2343
- Legato = 2,
2337
+ isAnacrusis: boolean;
2344
2338
  /**
2345
- * Slide out from the note from upwards on the same string.
2339
+ * Calculates the time spent in this bar. (unit: midi ticks)
2346
2340
  */
2347
- OutUp = 3,
2341
+ calculateDuration(respectAnacrusis?: boolean): number;
2348
2342
  /**
2349
- * Slide out from the note from downwards on the same string.
2343
+ * Adds a fermata to the masterbar.
2344
+ * @param offset The offset of the fermata within the bar in midi ticks.
2345
+ * @param fermata The fermata.
2350
2346
  */
2351
- OutDown = 4,
2347
+ addFermata(offset: number, fermata: Fermata): void;
2352
2348
  /**
2353
- * Pickslide down on this note
2349
+ * Gets the fermata for a given beat.
2350
+ * @param beat The beat to get the fermata for.
2351
+ * @returns
2354
2352
  */
2355
- PickSlideDown = 5,
2353
+ getFermata(beat: Beat): Fermata | null;
2354
+ }
2355
+
2356
+ /**
2357
+ * Lists all ottavia.
2358
+ */
2359
+ declare enum Ottavia {
2356
2360
  /**
2357
- * Pickslide up on this note
2361
+ * 2 octaves higher
2358
2362
  */
2359
- PickSlideUp = 6
2363
+ _15ma = 0,
2364
+ /**
2365
+ * 1 octave higher
2366
+ */
2367
+ _8va = 1,
2368
+ /**
2369
+ * Normal
2370
+ */
2371
+ Regular = 2,
2372
+ /**
2373
+ * 1 octave lower
2374
+ */
2375
+ _8vb = 3,
2376
+ /**
2377
+ * 2 octaves lower.
2378
+ */
2379
+ _15mb = 4
2360
2380
  }
2361
2381
 
2362
2382
  /**
2363
- * This public enum lists all vibrato types that can be performed.
2383
+ * Lists all simile mark types as they are assigned to bars.
2364
2384
  */
2365
- declare enum VibratoType {
2385
+ declare enum SimileMark {
2366
2386
  /**
2367
- * No vibrato.
2387
+ * No simile mark is applied
2368
2388
  */
2369
2389
  None = 0,
2370
2390
  /**
2371
- * A slight vibrato.
2391
+ * A simple simile mark. The previous bar is repeated.
2372
2392
  */
2373
- Slight = 1,
2393
+ Simple = 1,
2374
2394
  /**
2375
- * A wide vibrato.
2395
+ * A double simile mark. This value is assigned to the first
2396
+ * bar of the 2 repeat bars.
2376
2397
  */
2377
- Wide = 2
2398
+ FirstOfDouble = 2,
2399
+ /**
2400
+ * A double simile mark. This value is assigned to the second
2401
+ * bar of the 2 repeat bars.
2402
+ */
2403
+ SecondOfDouble = 3
2378
2404
  }
2379
2405
 
2380
2406
  /**
2381
- * A note is a single played sound on a fretted instrument.
2382
- * It consists of a fret offset and a string on which the note is played on.
2383
- * It also can be modified by a lot of different effects.
2384
- * @cloneable
2407
+ * A voice represents a group of beats
2408
+ * that can be played during a bar.
2385
2409
  * @json
2410
+ * @json_strict
2386
2411
  */
2387
- declare class Note {
2388
- static GlobalNoteId: number;
2412
+ declare class Voice {
2413
+ private _beatLookup;
2414
+ private static _globalBarId;
2389
2415
  /**
2390
- * Gets or sets the unique id of this note.
2391
- * @clone_ignore
2416
+ * Gets or sets the unique id of this bar.
2392
2417
  */
2393
2418
  id: number;
2394
2419
  /**
2395
- * Gets or sets the zero-based index of this note within the beat.
2420
+ * Gets or sets the zero-based index of this voice within the bar.
2396
2421
  * @json_ignore
2397
2422
  */
2398
2423
  index: number;
2399
2424
  /**
2400
- * Gets or sets the accentuation of this note.
2425
+ * Gets or sets the reference to the bar this voice belongs to.
2426
+ * @json_ignore
2401
2427
  */
2402
- accentuated: AccentuationType;
2428
+ bar: Bar;
2403
2429
  /**
2404
- * Gets or sets the bend type for this note.
2430
+ * Gets or sets the list of beats contained in this voice.
2431
+ * @json_add addBeat
2405
2432
  */
2406
- bendType: BendType;
2433
+ beats: Beat[];
2407
2434
  /**
2408
- * Gets or sets the bend style for this note.
2435
+ * Gets or sets a value indicating whether this voice is empty.
2409
2436
  */
2410
- bendStyle: BendStyle;
2437
+ isEmpty: boolean;
2438
+ insertBeat(after: Beat, newBeat: Beat): void;
2439
+ addBeat(beat: Beat): void;
2440
+ private chain;
2441
+ addGraceBeat(beat: Beat): void;
2442
+ getBeatAtPlaybackStart(playbackStart: number): Beat | null;
2443
+ finish(settings: Settings, sharedDataBag: Map<string, unknown>): void;
2444
+ calculateDuration(): number;
2445
+ }
2446
+
2447
+ /**
2448
+ * A bar is a single block within a track, also known as Measure.
2449
+ * @json
2450
+ * @json_strict
2451
+ */
2452
+ declare class Bar {
2453
+ private static _globalBarId;
2411
2454
  /**
2412
- * Gets or sets the note from which this note continues the bend.
2413
- * @clone_ignore
2455
+ * Gets or sets the unique id of this bar.
2456
+ */
2457
+ id: number;
2458
+ /**
2459
+ * Gets or sets the zero-based index of this bar within the staff.
2414
2460
  * @json_ignore
2415
2461
  */
2416
- bendOrigin: Note | null;
2462
+ index: number;
2417
2463
  /**
2418
- * Gets or sets whether this note continues a bend from a previous note.
2464
+ * Gets or sets the next bar that comes after this bar.
2465
+ * @json_ignore
2419
2466
  */
2420
- isContinuedBend: boolean;
2467
+ nextBar: Bar | null;
2421
2468
  /**
2422
- * Gets or sets a list of the points defining the bend behavior.
2423
- * @clone_add addBendPoint
2424
- * @json_add addBendPoint
2469
+ * Gets or sets the previous bar that comes before this bar.
2470
+ * @json_ignore
2425
2471
  */
2426
- bendPoints: BendPoint[];
2472
+ previousBar: Bar | null;
2427
2473
  /**
2428
- * Gets or sets the bend point with the highest bend value.
2429
- * @clone_ignore
2474
+ * Gets or sets the clef on this bar.
2475
+ */
2476
+ clef: Clef;
2477
+ /**
2478
+ * Gets or sets the ottava applied to the clef.
2479
+ */
2480
+ clefOttava: Ottavia;
2481
+ /**
2482
+ * Gets or sets the reference to the parent staff.
2430
2483
  * @json_ignore
2431
2484
  */
2432
- maxBendPoint: BendPoint | null;
2433
- get hasBend(): boolean;
2434
- get isStringed(): boolean;
2485
+ staff: Staff;
2435
2486
  /**
2436
- * Gets or sets the fret on which this note is played on the instrument.
2487
+ * Gets or sets the list of voices contained in this bar.
2488
+ * @json_add addVoice
2437
2489
  */
2438
- fret: number;
2490
+ voices: Voice[];
2439
2491
  /**
2440
- * Gets or sets the string number where the note is placed.
2441
- * 1 is the lowest string on the guitar and the bottom line on the tablature.
2442
- * It then increases the the number of strings on available on the track.
2492
+ * Gets or sets the simile mark on this bar.
2443
2493
  */
2444
- string: number;
2445
- get isPiano(): boolean;
2494
+ simileMark: SimileMark;
2446
2495
  /**
2447
- * Gets or sets the octave on which this note is played.
2496
+ * Gets a value indicating whether this bar contains multiple voices with notes.
2497
+ * @json_ignore
2448
2498
  */
2449
- octave: number;
2499
+ isMultiVoice: boolean;
2500
+ get masterBar(): MasterBar;
2501
+ get isEmpty(): boolean;
2502
+ addVoice(voice: Voice): void;
2503
+ finish(settings: Settings, sharedDataBag: Map<string, unknown>): void;
2504
+ calculateDuration(): number;
2505
+ }
2506
+
2507
+ /**
2508
+ * This public class represents a predefined string tuning.
2509
+ * @json
2510
+ * @json_strict
2511
+ */
2512
+ declare class Tuning {
2513
+ private static _sevenStrings;
2514
+ private static _sixStrings;
2515
+ private static _fiveStrings;
2516
+ private static _fourStrings;
2517
+ private static _defaultTunings;
2518
+ static readonly defaultAccidentals: string[];
2519
+ static readonly defaultSteps: string[];
2520
+ static getTextForTuning(tuning: number, includeOctave: boolean): string;
2521
+ static getTextPartsForTuning(tuning: number, octaveShift?: number): string[];
2450
2522
  /**
2451
- * Gets or sets the tone of this note within the octave.
2523
+ * Gets the default tuning for the given string count.
2524
+ * @param stringCount The string count.
2525
+ * @returns The tuning for the given string count or null if the string count is not defined.
2452
2526
  */
2453
- tone: number;
2454
- get isPercussion(): boolean;
2527
+ static getDefaultTuningFor(stringCount: number): Tuning | null;
2455
2528
  /**
2456
- * Gets or sets the percusson element.
2457
- * @deprecated
2529
+ * Gets a list of all tuning presets for a given stirng count.
2530
+ * @param stringCount The string count.
2531
+ * @returns The list of known tunings for the given string count or an empty list if the string count is not defined.
2458
2532
  */
2459
- get element(): number;
2533
+ static getPresetsFor(stringCount: number): Tuning[];
2534
+ static initialize(): void;
2460
2535
  /**
2461
- * Gets or sets the variation of this note.
2462
- * @deprecated
2536
+ * Tries to find a known tuning by a given list of tuning values.
2537
+ * @param strings The values defining the tuning.
2538
+ * @returns The known tuning.
2463
2539
  */
2464
- get variation(): number;
2540
+ static findTuning(strings: number[]): Tuning | null;
2465
2541
  /**
2466
- * Gets or sets the index of percussion articulation in the related `track.percussionArticulations`.
2467
- * If the articulation is not listed in `track.percussionArticulations` the following list based on GP7 applies:
2468
- * - 029 Ride (choke)
2469
- * - 030 Cymbal (hit)
2470
- * - 031 Snare (side stick)
2471
- * - 033 Snare (side stick)
2472
- * - 034 Snare (hit)
2473
- * - 035 Kick (hit)
2474
- * - 036 Kick (hit)
2475
- * - 037 Snare (side stick)
2476
- * - 038 Snare (hit)
2477
- * - 039 Hand Clap (hit)
2478
- * - 040 Snare (hit)
2479
- * - 041 Low Floor Tom (hit)
2480
- * - 042 Hi-Hat (closed)
2481
- * - 043 Very Low Tom (hit)
2482
- * - 044 Pedal Hi-Hat (hit)
2483
- * - 045 Low Tom (hit)
2484
- * - 046 Hi-Hat (open)
2485
- * - 047 Mid Tom (hit)
2486
- * - 048 High Tom (hit)
2487
- * - 049 Crash high (hit)
2488
- * - 050 High Floor Tom (hit)
2489
- * - 051 Ride (middle)
2490
- * - 052 China (hit)
2491
- * - 053 Ride (bell)
2492
- * - 054 Tambourine (hit)
2493
- * - 055 Splash (hit)
2494
- * - 056 Cowbell medium (hit)
2495
- * - 057 Crash medium (hit)
2496
- * - 058 Vibraslap (hit)
2497
- * - 059 Ride (edge)
2498
- * - 060 Hand (hit)
2499
- * - 061 Hand (hit)
2500
- * - 062 Conga high (mute)
2501
- * - 063 Conga high (hit)
2502
- * - 064 Conga low (hit)
2503
- * - 065 Timbale high (hit)
2504
- * - 066 Timbale low (hit)
2505
- * - 067 Agogo high (hit)
2506
- * - 068 Agogo tow (hit)
2507
- * - 069 Cabasa (hit)
2508
- * - 070 Left Maraca (hit)
2509
- * - 071 Whistle high (hit)
2510
- * - 072 Whistle low (hit)
2511
- * - 073 Guiro (hit)
2512
- * - 074 Guiro (scrap-return)
2513
- * - 075 Claves (hit)
2514
- * - 076 Woodblock high (hit)
2515
- * - 077 Woodblock low (hit)
2516
- * - 078 Cuica (mute)
2517
- * - 079 Cuica (open)
2518
- * - 080 Triangle (rnute)
2519
- * - 081 Triangle (hit)
2520
- * - 082 Shaker (hit)
2521
- * - 083 Tinkle Bell (hat)
2522
- * - 083 Jingle Bell (hit)
2523
- * - 084 Bell Tree (hit)
2524
- * - 085 Castanets (hit)
2525
- * - 086 Surdo (hit)
2526
- * - 087 Surdo (mute)
2527
- * - 091 Snare (rim shot)
2528
- * - 092 Hi-Hat (half)
2529
- * - 093 Ride (edge)
2530
- * - 094 Ride (choke)
2531
- * - 095 Splash (choke)
2532
- * - 096 China (choke)
2533
- * - 097 Crash high (choke)
2534
- * - 098 Crash medium (choke)
2535
- * - 099 Cowbell low (hit)
2536
- * - 100 Cowbell low (tip)
2537
- * - 101 Cowbell medium (tip)
2538
- * - 102 Cowbell high (hit)
2539
- * - 103 Cowbell high (tip)
2540
- * - 104 Hand (mute)
2541
- * - 105 Hand (slap)
2542
- * - 106 Hand (mute)
2543
- * - 107 Hand (slap)
2544
- * - 108 Conga low (slap)
2545
- * - 109 Conga low (mute)
2546
- * - 110 Conga high (slap)
2547
- * - 111 Tambourine (return)
2548
- * - 112 Tambourine (roll)
2549
- * - 113 Tambourine (hand)
2550
- * - 114 Grancassa (hit)
2551
- * - 115 Piatti (hat)
2552
- * - 116 Piatti (hand)
2553
- * - 117 Cabasa (return)
2554
- * - 118 Left Maraca (return)
2555
- * - 119 Right Maraca (hit)
2556
- * - 120 Right Maraca (return)
2557
- * - 122 Shaker (return)
2558
- * - 123 Bell Tee (return)
2559
- * - 124 Golpe (thumb)
2560
- * - 125 Golpe (finger)
2561
- * - 126 Ride (middle)
2562
- * - 127 Ride (bell)
2563
- */
2564
- percussionArticulation: number;
2565
- /**
2566
- * Gets or sets whether this note is visible on the music sheet.
2542
+ * Gets or sets whether this is the standard tuning for this number of strings.
2567
2543
  */
2568
- isVisible: boolean;
2544
+ isStandard: boolean;
2569
2545
  /**
2570
- * Gets a value indicating whether the note is left hand tapped.
2546
+ * Gets or sets the name of the tuning.
2571
2547
  */
2572
- isLeftHandTapped: boolean;
2548
+ name: string;
2573
2549
  /**
2574
- * Gets or sets whether this note starts a hammeron or pulloff.
2550
+ * Gets or sets the values for each string of the instrument.
2575
2551
  */
2576
- isHammerPullOrigin: boolean;
2577
- get isHammerPullDestination(): boolean;
2552
+ tunings: number[];
2578
2553
  /**
2579
- * Gets the origin note id of the hammeron/pull-off of this note.
2554
+ * Initializes a new instance of the {@link Tuning} class.
2555
+ * @param name The name.
2556
+ * @param tuning The tuning.
2557
+ * @param isStandard if set to`true`[is standard].
2580
2558
  */
2581
- hammerPullOriginNoteId: number;
2559
+ constructor(name?: string, tuning?: number[] | null, isStandard?: boolean);
2582
2560
  /**
2583
- * Gets the origin of the hammeron/pulloff of this note.
2561
+ * Tries to detect the name and standard flag of the tuning from a known tuning list based
2562
+ * on the string values.
2584
2563
  */
2585
- get hammerPullOrigin(): Note | null;
2564
+ finish(): void;
2565
+ }
2566
+
2567
+ /**
2568
+ * This class describes a single staff within a track. There are instruments like pianos
2569
+ * where a single track can contain multiple staffs.
2570
+ * @json
2571
+ * @json_strict
2572
+ */
2573
+ declare class Staff {
2586
2574
  /**
2587
- * Gets the destination note id of the hammeron/pull-off of this note.
2575
+ * Gets or sets the zero-based index of this staff within the track.
2576
+ * @json_ignore
2588
2577
  */
2589
- hammerPullDestinationNoteId: number;
2578
+ index: number;
2590
2579
  /**
2591
- * Gets the destination for the hammeron/pullof started by this note.
2580
+ * Gets or sets the reference to the track this staff belongs to.
2581
+ * @json_ignore
2592
2582
  */
2593
- get hammerPullDestination(): Note | null;
2594
- get isSlurOrigin(): boolean;
2583
+ track: Track;
2595
2584
  /**
2596
- * Gets or sets whether this note finishes a slur.
2585
+ * Gets or sets a list of all bars contained in this staff.
2586
+ * @json_add addBar
2597
2587
  */
2598
- isSlurDestination: boolean;
2588
+ bars: Bar[];
2599
2589
  /**
2600
- * Gets the note id where the slur of this note starts.
2590
+ * Gets or sets a list of all chords defined for this staff. {@link Beat.chordId} refers to entries in this lookup.
2591
+ * @json_add addChord
2601
2592
  */
2602
- slurOriginNoteId: number;
2593
+ chords: Map<string, Chord> | null;
2603
2594
  /**
2604
- * Gets or sets the note where the slur of this note starts.
2595
+ * Gets or sets the fret on which a capo is set.
2605
2596
  */
2606
- get slurOrigin(): Note | null;
2597
+ capo: number;
2607
2598
  /**
2608
- * Gets or sets the note id where the slur of this note ends.
2599
+ * Gets or sets the number of semitones this track should be
2600
+ * transposed. This applies to rendering and playback.
2609
2601
  */
2610
- slurDestinationNoteId: number;
2602
+ transpositionPitch: number;
2611
2603
  /**
2612
- * Gets or sets the note where the slur of this note ends.
2604
+ * Gets or sets the number of semitones this track should be
2605
+ * transposed. This applies only to rendering.
2613
2606
  */
2614
- get slurDestination(): Note | null;
2615
- get isHarmonic(): boolean;
2607
+ displayTranspositionPitch: number;
2616
2608
  /**
2617
- * Gets or sets the harmonic type applied to this note.
2609
+ * Get or set the guitar tuning of the guitar. This tuning also indicates the number of strings shown in the
2610
+ * guitar tablature. Unlike the {@link Note.string} property this array directly represents
2611
+ * the order of the tracks shown in the tablature. The first item is the most top tablature line.
2618
2612
  */
2619
- harmonicType: HarmonicType;
2613
+ stringTuning: Tuning;
2620
2614
  /**
2621
- * Gets or sets the value defining the harmonic pitch.
2615
+ * Get or set the values of the related guitar tuning.
2622
2616
  */
2623
- harmonicValue: number;
2617
+ get tuning(): number[];
2624
2618
  /**
2625
- * Gets or sets whether the note is a ghost note and shown in parenthesis. Also this will make the note a bit more silent.
2619
+ * Gets or sets the name of the tuning.
2626
2620
  */
2627
- isGhost: boolean;
2621
+ get tuningName(): string;
2622
+ get isStringed(): boolean;
2628
2623
  /**
2629
- * Gets or sets whether this note has a let-ring effect.
2624
+ * Gets or sets whether the tabs are shown.
2630
2625
  */
2631
- isLetRing: boolean;
2626
+ showTablature: boolean;
2632
2627
  /**
2633
- * Gets or sets the destination note for the let-ring effect.
2634
- * @clone_ignore
2635
- * @json_ignore
2628
+ * Gets or sets whether the standard notation is shown.
2636
2629
  */
2637
- letRingDestination: Note | null;
2630
+ showStandardNotation: boolean;
2638
2631
  /**
2639
- * Gets or sets whether this note has a palm-mute effect.
2632
+ * Gets or sets whether the staff contains percussion notation
2640
2633
  */
2641
- isPalmMute: boolean;
2634
+ isPercussion: boolean;
2642
2635
  /**
2643
- * Gets or sets the destination note for the palm-mute effect.
2644
- * @clone_ignore
2645
- * @json_ignore
2636
+ * The number of lines shown for the standard notation.
2637
+ * For some percussion instruments this number might vary.
2646
2638
  */
2647
- palmMuteDestination: Note | null;
2639
+ standardNotationLineCount: number;
2640
+ finish(settings: Settings, sharedDataBag: Map<string, unknown>): void;
2641
+ addChord(chordId: string, chord: Chord): void;
2642
+ hasChord(chordId: string): boolean;
2643
+ getChord(chordId: string): Chord | null;
2644
+ addBar(bar: Bar): void;
2645
+ }
2646
+
2647
+ /**
2648
+ * A chord definition.
2649
+ * @json
2650
+ * @json_strict
2651
+ */
2652
+ declare class Chord {
2648
2653
  /**
2649
- * Gets or sets whether the note is shown and played as dead note.
2654
+ * Gets or sets the name of the chord
2650
2655
  */
2651
- isDead: boolean;
2656
+ name: string;
2652
2657
  /**
2653
- * Gets or sets whether the note is played as staccato.
2658
+ * Indicates the first fret of the chord diagram.
2654
2659
  */
2655
- isStaccato: boolean;
2660
+ firstFret: number;
2656
2661
  /**
2657
- * Gets or sets the slide-in type this note is played with.
2662
+ * Gets or sets the frets played on the individual strings for this chord.
2663
+ * - The order in this list goes from the highest string to the lowest string.
2664
+ * - -1 indicates that the string is not played.
2658
2665
  */
2659
- slideInType: SlideInType;
2666
+ strings: number[];
2660
2667
  /**
2661
- * Gets or sets the slide-out type this note is played with.
2668
+ * Gets or sets a list of frets where the finger should hold a barre
2662
2669
  */
2663
- slideOutType: SlideOutType;
2670
+ barreFrets: number[];
2664
2671
  /**
2665
- * Gets or sets the target note for several slide types.
2666
- * @clone_ignore
2672
+ * Gets or sets the staff the chord belongs to.
2667
2673
  * @json_ignore
2668
2674
  */
2669
- slideTarget: Note | null;
2675
+ staff: Staff;
2670
2676
  /**
2671
- * Gets or sets the source note for several slide types.
2672
- * @clone_ignore
2673
- * @json_ignore
2677
+ * Gets or sets whether the chord name is shown above the chord diagram.
2674
2678
  */
2675
- slideOrigin: Note | null;
2679
+ showName: boolean;
2676
2680
  /**
2677
- * Gets or sets whether a vibrato is played on the note.
2681
+ * Gets or sets whether the chord diagram is shown.
2678
2682
  */
2679
- vibrato: VibratoType;
2683
+ showDiagram: boolean;
2680
2684
  /**
2681
- * Gets the origin note id of the tied if this note is tied.
2685
+ * Gets or sets whether the fingering is shown below the chord diagram.
2682
2686
  */
2683
- tieOriginNoteId: number;
2687
+ showFingering: boolean;
2688
+ }
2689
+
2690
+ /**
2691
+ * Lists all Crescendo and Decrescendo types.
2692
+ */
2693
+ declare enum CrescendoType {
2684
2694
  /**
2685
- * Gets the origin of the tied if this note is tied.
2695
+ * No crescendo applied.
2686
2696
  */
2687
- get tieOrigin(): Note | null;
2697
+ None = 0,
2688
2698
  /**
2689
- * Gets the desination note id of the tie.
2699
+ * Normal crescendo applied.
2690
2700
  */
2691
- tieDestinationNoteId: number;
2701
+ Crescendo = 1,
2692
2702
  /**
2693
- * Gets the desination of the tie.
2703
+ * Normal decrescendo applied.
2694
2704
  */
2695
- get tieDestination(): Note | null;
2705
+ Decrescendo = 2
2706
+ }
2707
+
2708
+ /**
2709
+ * Lists all dynamics.
2710
+ */
2711
+ declare enum DynamicValue {
2696
2712
  /**
2697
- * Gets or sets whether this note is ends a tied note.
2713
+ * pianississimo (very very soft)
2698
2714
  */
2699
- isTieDestination: boolean;
2700
- get isTieOrigin(): boolean;
2715
+ PPP = 0,
2701
2716
  /**
2702
- * Gets or sets the fingers used for this note on the left hand.
2717
+ * pianissimo (very soft)
2703
2718
  */
2704
- leftHandFinger: Fingers;
2719
+ PP = 1,
2705
2720
  /**
2706
- * Gets or sets the fingers used for this note on the right hand.
2721
+ * piano (soft)
2707
2722
  */
2708
- rightHandFinger: Fingers;
2723
+ P = 2,
2709
2724
  /**
2710
- * Gets or sets whether this note has fingering defined.
2725
+ * mezzo-piano (half soft)
2711
2726
  */
2712
- isFingering: boolean;
2727
+ MP = 3,
2713
2728
  /**
2714
- * Gets or sets the target note value for the trill effect.
2729
+ * mezzo-forte (half loud)
2715
2730
  */
2716
- trillValue: number;
2717
- get trillFret(): number;
2718
- get isTrill(): boolean;
2731
+ MF = 4,
2719
2732
  /**
2720
- * Gets or sets the speed of the trill effect.
2733
+ * forte (loud)
2721
2734
  */
2722
- trillSpeed: Duration;
2735
+ F = 5,
2723
2736
  /**
2724
- * Gets or sets the percentual duration of the note relative to the overall beat duration .
2737
+ * fortissimo (very loud)
2725
2738
  */
2726
- durationPercent: number;
2739
+ FF = 6,
2727
2740
  /**
2728
- * Gets or sets how accidetnals for this note should be handled.
2741
+ * fortississimo (very very loud)
2729
2742
  */
2730
- accidentalMode: NoteAccidentalMode;
2743
+ FFF = 7
2744
+ }
2745
+
2746
+ /**
2747
+ * Lists all types of grace notes
2748
+ */
2749
+ declare enum GraceType {
2731
2750
  /**
2732
- * Gets or sets the reference to the parent beat to which this note belongs to.
2733
- * @clone_ignore
2734
- * @json_ignore
2751
+ * No grace, normal beat.
2735
2752
  */
2736
- beat: Beat;
2753
+ None = 0,
2737
2754
  /**
2738
- * Gets or sets the dynamics for this note.
2755
+ * The beat contains on-beat grace notes.
2739
2756
  */
2740
- dynamics: DynamicValue;
2757
+ OnBeat = 1,
2741
2758
  /**
2742
- * @clone_ignore
2743
- * @json_ignore
2759
+ * The beat contains before-beat grace notes.
2744
2760
  */
2745
- isEffectSlurOrigin: boolean;
2761
+ BeforeBeat = 2,
2746
2762
  /**
2747
- * @clone_ignore
2748
- * @json_ignore
2763
+ * The beat contains very special bend-grace notes used in SongBook style displays.
2749
2764
  */
2750
- hasEffectSlur: boolean;
2751
- get isEffectSlurDestination(): boolean;
2765
+ BendGrace = 3
2766
+ }
2767
+
2768
+ /**
2769
+ * Lists all types of note acceuntations
2770
+ */
2771
+ declare enum AccentuationType {
2752
2772
  /**
2753
- * @clone_ignore
2754
- * @json_ignore
2773
+ * No accentuation
2755
2774
  */
2756
- effectSlurOrigin: Note | null;
2775
+ None = 0,
2757
2776
  /**
2758
- * @clone_ignore
2759
- * @json_ignore
2777
+ * Normal accentuation
2760
2778
  */
2761
- effectSlurDestination: Note | null;
2762
- get stringTuning(): number;
2763
- static getStringTuning(staff: Staff, noteString: number): number;
2764
- get realValue(): number;
2765
- get realValueWithoutHarmonic(): number;
2766
- get harmonicPitch(): number;
2767
- get initialBendValue(): number;
2768
- get displayValue(): number;
2769
- get displayValueWithoutBend(): number;
2770
- get hasQuarterToneOffset(): boolean;
2771
- addBendPoint(point: BendPoint): void;
2772
- finish(settings: Settings): void;
2773
- private static readonly MaxOffsetForSameLineSearch;
2774
- static nextNoteOnSameLine(note: Note): Note | null;
2775
- static findHammerPullDestination(note: Note): Note | null;
2776
- static findTieOrigin(note: Note): Note | null;
2777
- chain(): void;
2779
+ Normal = 1,
2780
+ /**
2781
+ * Heavy accentuation
2782
+ */
2783
+ Heavy = 2
2778
2784
  }
2779
2785
 
2780
2786
  /**
2781
- * The score is the root node of the complete
2782
- * model. It stores the basic information of
2783
- * a song and stores the sub components.
2784
- * @json
2787
+ * Lists all types of bends
2785
2788
  */
2786
- declare class Score {
2787
- private _noteByIdLookup;
2788
- private _currentRepeatGroup;
2789
- /**
2790
- * The album of this song.
2791
- */
2792
- album: string;
2789
+ declare enum BendType {
2793
2790
  /**
2794
- * The artist who performs this song.
2791
+ * No bend at all
2795
2792
  */
2796
- artist: string;
2793
+ None = 0,
2797
2794
  /**
2798
- * The owner of the copyright of this song.
2795
+ * Individual points define the bends in a flexible manner.
2796
+ * This system was mainly used in Guitar Pro 3-5
2799
2797
  */
2800
- copyright: string;
2798
+ Custom = 1,
2801
2799
  /**
2802
- * Additional instructions
2800
+ * Simple Bend from an unbended string to a higher note.
2803
2801
  */
2804
- instructions: string;
2802
+ Bend = 2,
2805
2803
  /**
2806
- * The author of the music.
2804
+ * Release of a bend that was started on an earlier note.
2807
2805
  */
2808
- music: string;
2806
+ Release = 3,
2809
2807
  /**
2810
- * Some additional notes about the song.
2808
+ * A bend that starts from an unbended string,
2809
+ * and also releases the bend after some time.
2811
2810
  */
2812
- notices: string;
2811
+ BendRelease = 4,
2813
2812
  /**
2814
- * The subtitle of the song.
2813
+ * Holds a bend that was started on an earlier note
2815
2814
  */
2816
- subTitle: string;
2815
+ Hold = 5,
2817
2816
  /**
2818
- * The title of the song.
2817
+ * A bend that is already started before the note is played then it is held until the end.
2819
2818
  */
2820
- title: string;
2819
+ Prebend = 6,
2821
2820
  /**
2822
- * The author of the song lyrics
2821
+ * A bend that is already started before the note is played and
2822
+ * bends even further, then it is held until the end.
2823
2823
  */
2824
- words: string;
2824
+ PrebendBend = 7,
2825
2825
  /**
2826
- * The author of this tablature.
2826
+ * A bend that is already started before the note is played and
2827
+ * then releases the bend to a lower note where it is held until the end.
2827
2828
  */
2828
- tab: string;
2829
+ PrebendRelease = 8
2830
+ }
2831
+
2832
+ /**
2833
+ * Lists all fingers.
2834
+ */
2835
+ declare enum Fingers {
2829
2836
  /**
2830
- * Gets or sets the global tempo of the song in BPM. The tempo might change via {@link MasterBar.tempo}.
2837
+ * Unknown type (not documented)
2831
2838
  */
2832
- tempo: number;
2839
+ Unknown = -2,
2833
2840
  /**
2834
- * Gets or sets the name/label of the tempo.
2841
+ * No finger, dead note
2835
2842
  */
2836
- tempoLabel: string;
2843
+ NoOrDead = -1,
2837
2844
  /**
2838
- * Gets or sets a list of all masterbars contained in this song.
2839
- * @json_add addMasterBar
2845
+ * The thumb
2840
2846
  */
2841
- masterBars: MasterBar[];
2847
+ Thumb = 0,
2842
2848
  /**
2843
- * Gets or sets a list of all tracks contained in this song.
2844
- * @json_add addTrack
2849
+ * The index finger
2845
2850
  */
2846
- tracks: Track[];
2851
+ IndexFinger = 1,
2847
2852
  /**
2848
- * Gets or sets the rendering stylesheet for this song.
2853
+ * The middle finger
2849
2854
  */
2850
- stylesheet: RenderStylesheet;
2851
- rebuildRepeatGroups(): void;
2852
- addMasterBar(bar: MasterBar): void;
2853
- addTrack(track: Track): void;
2854
- finish(settings: Settings): void;
2855
- registerNote(note: Note): void;
2856
- getNoteById(noteId: number): Note | null;
2857
- }
2858
-
2859
- /**
2860
- * This public class is used to describe the beginning of a
2861
- * section within a song. It acts like a marker.
2862
- * @json
2863
- */
2864
- declare class Section {
2855
+ MiddleFinger = 2,
2865
2856
  /**
2866
- * Gets or sets the marker ID for this section.
2857
+ * The annular finger
2867
2858
  */
2868
- marker: string;
2859
+ AnnularFinger = 3,
2869
2860
  /**
2870
- * Gets or sets the descriptional text of this section.
2861
+ * The little finger
2871
2862
  */
2872
- text: string;
2863
+ LittleFinger = 4
2873
2864
  }
2874
2865
 
2875
2866
  /**
2876
- * This public enumeration lists all feels of triplets.
2867
+ * Lists all harmonic types.
2877
2868
  */
2878
- declare enum TripletFeel {
2869
+ declare enum HarmonicType {
2879
2870
  /**
2880
- * No triplet feel
2871
+ * No harmonics.
2881
2872
  */
2882
- NoTripletFeel = 0,
2873
+ None = 0,
2883
2874
  /**
2884
- * Triplet 16th
2875
+ * Natural harmonic
2885
2876
  */
2886
- Triplet16th = 1,
2877
+ Natural = 1,
2887
2878
  /**
2888
- * Triplet 8th
2879
+ * Artificial harmonic
2889
2880
  */
2890
- Triplet8th = 2,
2881
+ Artificial = 2,
2891
2882
  /**
2892
- * Dotted 16th
2883
+ * Pinch harmonics
2893
2884
  */
2894
- Dotted16th = 3,
2885
+ Pinch = 3,
2895
2886
  /**
2896
- * Dotted 8th
2887
+ * Tap harmonics
2897
2888
  */
2898
- Dotted8th = 4,
2889
+ Tap = 4,
2899
2890
  /**
2900
- * Scottish 16th
2891
+ * Semi harmonics
2901
2892
  */
2902
- Scottish16th = 5,
2893
+ Semi = 5,
2903
2894
  /**
2904
- * Scottish 8th
2895
+ * Feedback harmonics
2905
2896
  */
2906
- Scottish8th = 6
2897
+ Feedback = 6
2907
2898
  }
2908
2899
 
2909
2900
  /**
2910
- * The MasterBar stores information about a bar which affects
2911
- * all tracks.
2912
- * @json
2901
+ * Lists the modes how accidentals are handled for notes
2913
2902
  */
2914
- declare class MasterBar {
2915
- static readonly MaxAlternateEndings: number;
2903
+ declare enum NoteAccidentalMode {
2916
2904
  /**
2917
- * Gets or sets the bitflag for the alternate endings. Each bit defines for which repeat counts
2918
- * the bar is played.
2905
+ * Accidentals are calculated automatically.
2919
2906
  */
2920
- alternateEndings: number;
2907
+ Default = 0,
2921
2908
  /**
2922
- * Gets or sets the next masterbar in the song.
2923
- * @json_ignore
2909
+ * This will try to ensure that no accidental is shown.
2924
2910
  */
2925
- nextMasterBar: MasterBar | null;
2911
+ ForceNone = 1,
2926
2912
  /**
2927
- * Gets or sets the next masterbar in the song.
2928
- * @json_ignore
2913
+ * This will move the note one line down and applies a Naturalize.
2929
2914
  */
2930
- previousMasterBar: MasterBar | null;
2915
+ ForceNatural = 2,
2931
2916
  /**
2932
- * Gets the zero based index of the masterbar.
2933
- * @json_ignore
2917
+ * This will move the note one line down and applies a Sharp.
2934
2918
  */
2935
- index: number;
2919
+ ForceSharp = 3,
2936
2920
  /**
2937
- * Gets or sets the key signature used on all bars.
2921
+ * This will move the note to be shown 2 half-notes deeper with a double sharp symbol
2938
2922
  */
2939
- keySignature: KeySignature;
2923
+ ForceDoubleSharp = 4,
2940
2924
  /**
2941
- * Gets or sets the type of key signature (major/minor)
2925
+ * This will move the note one line up and applies a Flat.
2942
2926
  */
2943
- keySignatureType: KeySignatureType;
2927
+ ForceFlat = 5,
2944
2928
  /**
2945
- * Gets or sets whether a double bar is shown for this masterbar.
2929
+ * This will move the note two half notes up with a double flag symbol.
2946
2930
  */
2947
- isDoubleBar: boolean;
2931
+ ForceDoubleFlat = 6
2932
+ }
2933
+
2934
+ /**
2935
+ * This public enum lists all different types of finger slide-ins on a string.
2936
+ */
2937
+ declare enum SlideInType {
2948
2938
  /**
2949
- * Gets or sets whether a repeat section starts on this masterbar.
2939
+ * No slide.
2950
2940
  */
2951
- isRepeatStart: boolean;
2952
- get isRepeatEnd(): boolean;
2941
+ None = 0,
2953
2942
  /**
2954
- * Gets or sets the number of repeats for the current repeat section.
2943
+ * Slide into the note from below on the same string.
2955
2944
  */
2956
- repeatCount: number;
2945
+ IntoFromBelow = 1,
2957
2946
  /**
2958
- * Gets or sets the repeat group this bar belongs to.
2959
- * @json_ignore
2947
+ * Slide into the note from above on the same string.
2960
2948
  */
2961
- repeatGroup: RepeatGroup;
2949
+ IntoFromAbove = 2
2950
+ }
2951
+
2952
+ /**
2953
+ * This public enum lists all different types of finger slide-outs on a string.
2954
+ */
2955
+ declare enum SlideOutType {
2962
2956
  /**
2963
- * Gets or sets the time signature numerator.
2957
+ * No slide.
2964
2958
  */
2965
- timeSignatureNumerator: number;
2959
+ None = 0,
2966
2960
  /**
2967
- * Gets or sets the time signature denominiator.
2961
+ * Shift slide to next note on same string
2968
2962
  */
2969
- timeSignatureDenominator: number;
2963
+ Shift = 1,
2970
2964
  /**
2971
- * Gets or sets whether this is bar has a common time signature.
2965
+ * Legato slide to next note on same string.
2972
2966
  */
2973
- timeSignatureCommon: boolean;
2974
- /**
2975
- * Gets or sets the triplet feel that is valid for this bar.
2976
- */
2977
- tripletFeel: TripletFeel;
2978
- /**
2979
- * Gets or sets the new section information for this bar.
2980
- */
2981
- section: Section | null;
2982
- get isSectionStart(): boolean;
2983
- /**
2984
- * Gets or sets the tempo automation for this bar.
2985
- */
2986
- tempoAutomation: Automation | null;
2987
- /**
2988
- * Gets or sets the reference to the score this song belongs to.
2989
- * @json_ignore
2990
- */
2991
- score: Score;
2992
- /**
2993
- * Gets or sets the fermatas for this bar. The key is the offset of the fermata in midi ticks.
2994
- */
2995
- fermata: Map<number, Fermata>;
2996
- /**
2997
- * The timeline position of the voice within the whole score. (unit: midi ticks)
2998
- */
2999
- start: number;
2967
+ Legato = 2,
3000
2968
  /**
3001
- * Gets or sets a value indicating whether the master bar is an anacrusis (aka. pickup bar)
2969
+ * Slide out from the note from upwards on the same string.
3002
2970
  */
3003
- isAnacrusis: boolean;
2971
+ OutUp = 3,
3004
2972
  /**
3005
- * Calculates the time spent in this bar. (unit: midi ticks)
2973
+ * Slide out from the note from downwards on the same string.
3006
2974
  */
3007
- calculateDuration(respectAnacrusis?: boolean): number;
2975
+ OutDown = 4,
3008
2976
  /**
3009
- * Adds a fermata to the masterbar.
3010
- * @param offset The offset of the fermata within the bar in midi ticks.
3011
- * @param fermata The fermata.
2977
+ * Pickslide down on this note
3012
2978
  */
3013
- addFermata(offset: number, fermata: Fermata): void;
2979
+ PickSlideDown = 5,
3014
2980
  /**
3015
- * Gets the fermata for a given beat.
3016
- * @param beat The beat to get the fermata for.
3017
- * @returns
2981
+ * Pickslide up on this note
3018
2982
  */
3019
- getFermata(beat: Beat): Fermata | null;
2983
+ PickSlideUp = 6
3020
2984
  }
3021
2985
 
3022
2986
  /**
3023
- * Lists all ottavia.
2987
+ * This public enum lists all vibrato types that can be performed.
3024
2988
  */
3025
- declare enum Ottavia {
3026
- /**
3027
- * 2 octaves higher
3028
- */
3029
- _15ma = 0,
3030
- /**
3031
- * 1 octave higher
3032
- */
3033
- _8va = 1,
2989
+ declare enum VibratoType {
3034
2990
  /**
3035
- * Normal
2991
+ * No vibrato.
3036
2992
  */
3037
- Regular = 2,
2993
+ None = 0,
3038
2994
  /**
3039
- * 1 octave lower
2995
+ * A slight vibrato.
3040
2996
  */
3041
- _8vb = 3,
2997
+ Slight = 1,
3042
2998
  /**
3043
- * 2 octaves lower.
2999
+ * A wide vibrato.
3044
3000
  */
3045
- _15mb = 4
3001
+ Wide = 2
3046
3002
  }
3047
3003
 
3048
3004
  /**
3049
- * Lists all simile mark types as they are assigned to bars.
3005
+ * A note is a single played sound on a fretted instrument.
3006
+ * It consists of a fret offset and a string on which the note is played on.
3007
+ * It also can be modified by a lot of different effects.
3008
+ * @cloneable
3009
+ * @json
3010
+ * @json_strict
3050
3011
  */
3051
- declare enum SimileMark {
3012
+ declare class Note {
3013
+ static GlobalNoteId: number;
3052
3014
  /**
3053
- * No simile mark is applied
3015
+ * Gets or sets the unique id of this note.
3016
+ * @clone_ignore
3054
3017
  */
3055
- None = 0,
3018
+ id: number;
3056
3019
  /**
3057
- * A simple simile mark. The previous bar is repeated.
3020
+ * Gets or sets the zero-based index of this note within the beat.
3021
+ * @json_ignore
3058
3022
  */
3059
- Simple = 1,
3023
+ index: number;
3060
3024
  /**
3061
- * A double simile mark. This value is assigned to the first
3062
- * bar of the 2 repeat bars.
3025
+ * Gets or sets the accentuation of this note.
3063
3026
  */
3064
- FirstOfDouble = 2,
3027
+ accentuated: AccentuationType;
3065
3028
  /**
3066
- * A double simile mark. This value is assigned to the second
3067
- * bar of the 2 repeat bars.
3029
+ * Gets or sets the bend type for this note.
3068
3030
  */
3069
- SecondOfDouble = 3
3070
- }
3071
-
3072
- /**
3073
- * A voice represents a group of beats
3074
- * that can be played during a bar.
3075
- * @json
3076
- */
3077
- declare class Voice {
3078
- private _beatLookup;
3079
- private static _globalBarId;
3031
+ bendType: BendType;
3080
3032
  /**
3081
- * Gets or sets the unique id of this bar.
3033
+ * Gets or sets the bend style for this note.
3082
3034
  */
3083
- id: number;
3035
+ bendStyle: BendStyle;
3084
3036
  /**
3085
- * Gets or sets the zero-based index of this voice within the bar.
3037
+ * Gets or sets the note from which this note continues the bend.
3038
+ * @clone_ignore
3086
3039
  * @json_ignore
3087
3040
  */
3088
- index: number;
3041
+ bendOrigin: Note | null;
3089
3042
  /**
3090
- * Gets or sets the reference to the bar this voice belongs to.
3091
- * @json_ignore
3043
+ * Gets or sets whether this note continues a bend from a previous note.
3092
3044
  */
3093
- bar: Bar;
3045
+ isContinuedBend: boolean;
3094
3046
  /**
3095
- * Gets or sets the list of beats contained in this voice.
3096
- * @json_add addBeat
3047
+ * Gets or sets a list of the points defining the bend behavior.
3048
+ * @clone_add addBendPoint
3049
+ * @json_add addBendPoint
3097
3050
  */
3098
- beats: Beat[];
3051
+ bendPoints: BendPoint[] | null;
3099
3052
  /**
3100
- * Gets or sets a value indicating whether this voice is empty.
3053
+ * Gets or sets the bend point with the highest bend value.
3054
+ * @clone_ignore
3055
+ * @json_ignore
3101
3056
  */
3102
- isEmpty: boolean;
3103
- insertBeat(after: Beat, newBeat: Beat): void;
3104
- addBeat(beat: Beat): void;
3105
- private chain;
3106
- addGraceBeat(beat: Beat): void;
3107
- getBeatAtPlaybackStart(playbackStart: number): Beat | null;
3108
- finish(settings: Settings): void;
3109
- calculateDuration(): number;
3110
- }
3111
-
3112
- /**
3113
- * A bar is a single block within a track, also known as Measure.
3114
- * @json
3115
- */
3116
- declare class Bar {
3117
- private static _globalBarId;
3057
+ maxBendPoint: BendPoint | null;
3058
+ get hasBend(): boolean;
3059
+ get isStringed(): boolean;
3118
3060
  /**
3119
- * Gets or sets the unique id of this bar.
3061
+ * Gets or sets the fret on which this note is played on the instrument.
3120
3062
  */
3121
- id: number;
3063
+ fret: number;
3122
3064
  /**
3123
- * Gets or sets the zero-based index of this bar within the staff.
3124
- * @json_ignore
3065
+ * Gets or sets the string number where the note is placed.
3066
+ * 1 is the lowest string on the guitar and the bottom line on the tablature.
3067
+ * It then increases the the number of strings on available on the track.
3125
3068
  */
3126
- index: number;
3069
+ string: number;
3070
+ get isPiano(): boolean;
3127
3071
  /**
3128
- * Gets or sets the next bar that comes after this bar.
3129
- * @json_ignore
3072
+ * Gets or sets the octave on which this note is played.
3130
3073
  */
3131
- nextBar: Bar | null;
3074
+ octave: number;
3132
3075
  /**
3133
- * Gets or sets the previous bar that comes before this bar.
3134
- * @json_ignore
3076
+ * Gets or sets the tone of this note within the octave.
3135
3077
  */
3136
- previousBar: Bar | null;
3078
+ tone: number;
3079
+ get isPercussion(): boolean;
3137
3080
  /**
3138
- * Gets or sets the clef on this bar.
3081
+ * Gets or sets the percusson element.
3082
+ * @deprecated
3139
3083
  */
3140
- clef: Clef;
3084
+ get element(): number;
3141
3085
  /**
3142
- * Gets or sets the ottava applied to the clef.
3086
+ * Gets or sets the variation of this note.
3087
+ * @deprecated
3143
3088
  */
3144
- clefOttava: Ottavia;
3089
+ get variation(): number;
3145
3090
  /**
3146
- * Gets or sets the reference to the parent staff.
3147
- * @json_ignore
3091
+ * Gets or sets the index of percussion articulation in the related `track.percussionArticulations`.
3092
+ * If the articulation is not listed in `track.percussionArticulations` the following list based on GP7 applies:
3093
+ * - 029 Ride (choke)
3094
+ * - 030 Cymbal (hit)
3095
+ * - 031 Snare (side stick)
3096
+ * - 033 Snare (side stick)
3097
+ * - 034 Snare (hit)
3098
+ * - 035 Kick (hit)
3099
+ * - 036 Kick (hit)
3100
+ * - 037 Snare (side stick)
3101
+ * - 038 Snare (hit)
3102
+ * - 039 Hand Clap (hit)
3103
+ * - 040 Snare (hit)
3104
+ * - 041 Low Floor Tom (hit)
3105
+ * - 042 Hi-Hat (closed)
3106
+ * - 043 Very Low Tom (hit)
3107
+ * - 044 Pedal Hi-Hat (hit)
3108
+ * - 045 Low Tom (hit)
3109
+ * - 046 Hi-Hat (open)
3110
+ * - 047 Mid Tom (hit)
3111
+ * - 048 High Tom (hit)
3112
+ * - 049 Crash high (hit)
3113
+ * - 050 High Floor Tom (hit)
3114
+ * - 051 Ride (middle)
3115
+ * - 052 China (hit)
3116
+ * - 053 Ride (bell)
3117
+ * - 054 Tambourine (hit)
3118
+ * - 055 Splash (hit)
3119
+ * - 056 Cowbell medium (hit)
3120
+ * - 057 Crash medium (hit)
3121
+ * - 058 Vibraslap (hit)
3122
+ * - 059 Ride (edge)
3123
+ * - 060 Hand (hit)
3124
+ * - 061 Hand (hit)
3125
+ * - 062 Conga high (mute)
3126
+ * - 063 Conga high (hit)
3127
+ * - 064 Conga low (hit)
3128
+ * - 065 Timbale high (hit)
3129
+ * - 066 Timbale low (hit)
3130
+ * - 067 Agogo high (hit)
3131
+ * - 068 Agogo tow (hit)
3132
+ * - 069 Cabasa (hit)
3133
+ * - 070 Left Maraca (hit)
3134
+ * - 071 Whistle high (hit)
3135
+ * - 072 Whistle low (hit)
3136
+ * - 073 Guiro (hit)
3137
+ * - 074 Guiro (scrap-return)
3138
+ * - 075 Claves (hit)
3139
+ * - 076 Woodblock high (hit)
3140
+ * - 077 Woodblock low (hit)
3141
+ * - 078 Cuica (mute)
3142
+ * - 079 Cuica (open)
3143
+ * - 080 Triangle (rnute)
3144
+ * - 081 Triangle (hit)
3145
+ * - 082 Shaker (hit)
3146
+ * - 083 Tinkle Bell (hat)
3147
+ * - 083 Jingle Bell (hit)
3148
+ * - 084 Bell Tree (hit)
3149
+ * - 085 Castanets (hit)
3150
+ * - 086 Surdo (hit)
3151
+ * - 087 Surdo (mute)
3152
+ * - 091 Snare (rim shot)
3153
+ * - 092 Hi-Hat (half)
3154
+ * - 093 Ride (edge)
3155
+ * - 094 Ride (choke)
3156
+ * - 095 Splash (choke)
3157
+ * - 096 China (choke)
3158
+ * - 097 Crash high (choke)
3159
+ * - 098 Crash medium (choke)
3160
+ * - 099 Cowbell low (hit)
3161
+ * - 100 Cowbell low (tip)
3162
+ * - 101 Cowbell medium (tip)
3163
+ * - 102 Cowbell high (hit)
3164
+ * - 103 Cowbell high (tip)
3165
+ * - 104 Hand (mute)
3166
+ * - 105 Hand (slap)
3167
+ * - 106 Hand (mute)
3168
+ * - 107 Hand (slap)
3169
+ * - 108 Conga low (slap)
3170
+ * - 109 Conga low (mute)
3171
+ * - 110 Conga high (slap)
3172
+ * - 111 Tambourine (return)
3173
+ * - 112 Tambourine (roll)
3174
+ * - 113 Tambourine (hand)
3175
+ * - 114 Grancassa (hit)
3176
+ * - 115 Piatti (hat)
3177
+ * - 116 Piatti (hand)
3178
+ * - 117 Cabasa (return)
3179
+ * - 118 Left Maraca (return)
3180
+ * - 119 Right Maraca (hit)
3181
+ * - 120 Right Maraca (return)
3182
+ * - 122 Shaker (return)
3183
+ * - 123 Bell Tee (return)
3184
+ * - 124 Golpe (thumb)
3185
+ * - 125 Golpe (finger)
3186
+ * - 126 Ride (middle)
3187
+ * - 127 Ride (bell)
3148
3188
  */
3149
- staff: Staff;
3189
+ percussionArticulation: number;
3150
3190
  /**
3151
- * Gets or sets the list of voices contained in this bar.
3152
- * @json_add addVoice
3191
+ * Gets or sets whether this note is visible on the music sheet.
3153
3192
  */
3154
- voices: Voice[];
3193
+ isVisible: boolean;
3155
3194
  /**
3156
- * Gets or sets the simile mark on this bar.
3195
+ * Gets a value indicating whether the note is left hand tapped.
3157
3196
  */
3158
- simileMark: SimileMark;
3197
+ isLeftHandTapped: boolean;
3159
3198
  /**
3160
- * Gets a value indicating whether this bar contains multiple voices with notes.
3161
- * @json_ignore
3199
+ * Gets or sets whether this note starts a hammeron or pulloff.
3162
3200
  */
3163
- isMultiVoice: boolean;
3164
- get masterBar(): MasterBar;
3165
- get isEmpty(): boolean;
3166
- addVoice(voice: Voice): void;
3167
- finish(settings: Settings): void;
3168
- calculateDuration(): number;
3169
- }
3170
-
3171
- /**
3172
- * This public class represents a predefined string tuning.
3173
- * @json
3174
- */
3175
- declare class Tuning {
3176
- private static _sevenStrings;
3177
- private static _sixStrings;
3178
- private static _fiveStrings;
3179
- private static _fourStrings;
3180
- private static _defaultTunings;
3181
- static readonly defaultAccidentals: string[];
3182
- static readonly defaultSteps: string[];
3183
- static getTextForTuning(tuning: number, includeOctave: boolean): string;
3184
- static getTextPartsForTuning(tuning: number, octaveShift?: number): string[];
3185
- /**
3186
- * Gets the default tuning for the given string count.
3187
- * @param stringCount The string count.
3188
- * @returns The tuning for the given string count or null if the string count is not defined.
3201
+ isHammerPullOrigin: boolean;
3202
+ get isHammerPullDestination(): boolean;
3203
+ /**
3204
+ * Gets the origin of the hammeron/pulloff of this note.
3205
+ * @clone_ignore
3206
+ * @json_ignore
3189
3207
  */
3190
- static getDefaultTuningFor(stringCount: number): Tuning | null;
3208
+ hammerPullOrigin: Note | null;
3191
3209
  /**
3192
- * Gets a list of all tuning presets for a given stirng count.
3193
- * @param stringCount The string count.
3194
- * @returns The list of known tunings for the given string count or an empty list if the string count is not defined.
3210
+ * Gets the destination for the hammeron/pullof started by this note.
3211
+ * @clone_ignore
3212
+ * @json_ignore
3195
3213
  */
3196
- static getPresetsFor(stringCount: number): Tuning[];
3197
- static initialize(): void;
3214
+ hammerPullDestination: Note | null;
3215
+ get isSlurOrigin(): boolean;
3198
3216
  /**
3199
- * Tries to find a known tuning by a given list of tuning values.
3200
- * @param strings The values defining the tuning.
3201
- * @returns The known tuning.
3217
+ * Gets or sets whether this note finishes a slur.
3202
3218
  */
3203
- static findTuning(strings: number[]): Tuning | null;
3219
+ isSlurDestination: boolean;
3204
3220
  /**
3205
- * Gets or sets whether this is the standard tuning for this number of strings.
3221
+ * Gets or sets the note where the slur of this note starts.
3222
+ * @clone_ignore
3223
+ * @json_ignore
3206
3224
  */
3207
- isStandard: boolean;
3225
+ slurOrigin: Note | null;
3208
3226
  /**
3209
- * Gets or sets the name of the tuning.
3227
+ * Gets or sets the note where the slur of this note ends.
3228
+ * @clone_ignore
3229
+ * @json_ignore
3210
3230
  */
3211
- name: string;
3231
+ slurDestination: Note | null;
3232
+ get isHarmonic(): boolean;
3212
3233
  /**
3213
- * Gets or sets the values for each string of the instrument.
3234
+ * Gets or sets the harmonic type applied to this note.
3214
3235
  */
3215
- tunings: number[];
3236
+ harmonicType: HarmonicType;
3216
3237
  /**
3217
- * Initializes a new instance of the {@link Tuning} class.
3218
- * @param name The name.
3219
- * @param tuning The tuning.
3220
- * @param isStandard if set to`true`[is standard].
3238
+ * Gets or sets the value defining the harmonic pitch.
3221
3239
  */
3222
- constructor(name?: string, tuning?: number[] | null, isStandard?: boolean);
3240
+ harmonicValue: number;
3223
3241
  /**
3224
- * Tries to detect the name and standard flag of the tuning from a known tuning list based
3225
- * on the string values.
3242
+ * Gets or sets whether the note is a ghost note and shown in parenthesis. Also this will make the note a bit more silent.
3226
3243
  */
3227
- finish(): void;
3228
- }
3229
-
3230
- /**
3231
- * This class describes a single staff within a track. There are instruments like pianos
3232
- * where a single track can contain multiple staffs.
3233
- * @json
3234
- */
3235
- declare class Staff {
3244
+ isGhost: boolean;
3236
3245
  /**
3237
- * Gets or sets the zero-based index of this staff within the track.
3238
- * @json_ignore
3246
+ * Gets or sets whether this note has a let-ring effect.
3239
3247
  */
3240
- index: number;
3248
+ isLetRing: boolean;
3241
3249
  /**
3242
- * Gets or sets the reference to the track this staff belongs to.
3250
+ * Gets or sets the destination note for the let-ring effect.
3251
+ * @clone_ignore
3243
3252
  * @json_ignore
3244
3253
  */
3245
- track: Track;
3254
+ letRingDestination: Note | null;
3246
3255
  /**
3247
- * Gets or sets a list of all bars contained in this staff.
3248
- * @json_add addBar
3256
+ * Gets or sets whether this note has a palm-mute effect.
3249
3257
  */
3250
- bars: Bar[];
3258
+ isPalmMute: boolean;
3251
3259
  /**
3252
- * Gets or sets a list of all chords defined for this staff. {@link Beat.chordId} refers to entries in this lookup.
3253
- * @json_add addChord
3260
+ * Gets or sets the destination note for the palm-mute effect.
3261
+ * @clone_ignore
3262
+ * @json_ignore
3254
3263
  */
3255
- chords: Map<string, Chord>;
3264
+ palmMuteDestination: Note | null;
3256
3265
  /**
3257
- * Gets or sets the fret on which a capo is set.
3266
+ * Gets or sets whether the note is shown and played as dead note.
3258
3267
  */
3259
- capo: number;
3268
+ isDead: boolean;
3260
3269
  /**
3261
- * Gets or sets the number of semitones this track should be
3262
- * transposed. This applies to rendering and playback.
3270
+ * Gets or sets whether the note is played as staccato.
3263
3271
  */
3264
- transpositionPitch: number;
3272
+ isStaccato: boolean;
3265
3273
  /**
3266
- * Gets or sets the number of semitones this track should be
3267
- * transposed. This applies only to rendering.
3274
+ * Gets or sets the slide-in type this note is played with.
3268
3275
  */
3269
- displayTranspositionPitch: number;
3276
+ slideInType: SlideInType;
3270
3277
  /**
3271
- * Get or set the guitar tuning of the guitar. This tuning also indicates the number of strings shown in the
3272
- * guitar tablature. Unlike the {@link Note.string} property this array directly represents
3273
- * the order of the tracks shown in the tablature. The first item is the most top tablature line.
3278
+ * Gets or sets the slide-out type this note is played with.
3274
3279
  */
3275
- stringTuning: Tuning;
3280
+ slideOutType: SlideOutType;
3276
3281
  /**
3277
- * Get or set the values of the related guitar tuning.
3282
+ * Gets or sets the target note for several slide types.
3283
+ * @clone_ignore
3284
+ * @json_ignore
3278
3285
  */
3279
- get tuning(): number[];
3286
+ slideTarget: Note | null;
3280
3287
  /**
3281
- * Gets or sets the name of the tuning.
3288
+ * Gets or sets the source note for several slide types.
3289
+ * @clone_ignore
3290
+ * @json_ignore
3282
3291
  */
3283
- get tuningName(): string;
3284
- get isStringed(): boolean;
3292
+ slideOrigin: Note | null;
3285
3293
  /**
3286
- * Gets or sets whether the tabs are shown.
3294
+ * Gets or sets whether a vibrato is played on the note.
3287
3295
  */
3288
- showTablature: boolean;
3296
+ vibrato: VibratoType;
3289
3297
  /**
3290
- * Gets or sets whether the standard notation is shown.
3298
+ * Gets the origin of the tied if this note is tied.
3299
+ * @clone_ignore
3300
+ * @json_ignore
3291
3301
  */
3292
- showStandardNotation: boolean;
3302
+ tieOrigin: Note | null;
3293
3303
  /**
3294
- * Gets or sets whether the staff contains percussion notation
3304
+ * Gets the desination of the tie.
3305
+ * @clone_ignore
3306
+ * @json_ignore
3295
3307
  */
3296
- isPercussion: boolean;
3308
+ tieDestination: Note | null;
3297
3309
  /**
3298
- * The number of lines shown for the standard notation.
3299
- * For some percussion instruments this number might vary.
3310
+ * Gets or sets whether this note is ends a tied note.
3300
3311
  */
3301
- standardNotationLineCount: number;
3302
- finish(settings: Settings): void;
3303
- addChord(chordId: string, chord: Chord): void;
3304
- addBar(bar: Bar): void;
3305
- }
3306
-
3307
- /**
3308
- * A chord definition.
3309
- * @json
3310
- */
3311
- declare class Chord {
3312
+ isTieDestination: boolean;
3313
+ get isTieOrigin(): boolean;
3312
3314
  /**
3313
- * Gets or sets the name of the chord
3315
+ * Gets or sets the fingers used for this note on the left hand.
3314
3316
  */
3315
- name: string;
3317
+ leftHandFinger: Fingers;
3316
3318
  /**
3317
- * Indicates the first fret of the chord diagram.
3319
+ * Gets or sets the fingers used for this note on the right hand.
3318
3320
  */
3319
- firstFret: number;
3321
+ rightHandFinger: Fingers;
3320
3322
  /**
3321
- * Gets or sets the frets played on the individual strings for this chord.
3322
- * - The order in this list goes from the highest string to the lowest string.
3323
- * - -1 indicates that the string is not played.
3323
+ * Gets or sets whether this note has fingering defined.
3324
3324
  */
3325
- strings: number[];
3325
+ isFingering: boolean;
3326
3326
  /**
3327
- * Gets or sets a list of frets where the finger should hold a barre
3327
+ * Gets or sets the target note value for the trill effect.
3328
3328
  */
3329
- barreFrets: number[];
3329
+ trillValue: number;
3330
+ get trillFret(): number;
3331
+ get isTrill(): boolean;
3330
3332
  /**
3331
- * Gets or sets the staff the chord belongs to.
3332
- * @json_ignore
3333
+ * Gets or sets the speed of the trill effect.
3333
3334
  */
3334
- staff: Staff;
3335
+ trillSpeed: Duration;
3335
3336
  /**
3336
- * Gets or sets whether the chord name is shown above the chord diagram.
3337
+ * Gets or sets the percentual duration of the note relative to the overall beat duration .
3337
3338
  */
3338
- showName: boolean;
3339
+ durationPercent: number;
3339
3340
  /**
3340
- * Gets or sets whether the chord diagram is shown.
3341
+ * Gets or sets how accidetnals for this note should be handled.
3341
3342
  */
3342
- showDiagram: boolean;
3343
+ accidentalMode: NoteAccidentalMode;
3343
3344
  /**
3344
- * Gets or sets whether the fingering is shown below the chord diagram.
3345
+ * Gets or sets the reference to the parent beat to which this note belongs to.
3346
+ * @clone_ignore
3347
+ * @json_ignore
3345
3348
  */
3346
- showFingering: boolean;
3347
- }
3348
-
3349
- /**
3350
- * Lists all Crescendo and Decrescendo types.
3351
- */
3352
- declare enum CrescendoType {
3349
+ beat: Beat;
3353
3350
  /**
3354
- * No crescendo applied.
3351
+ * Gets or sets the dynamics for this note.
3355
3352
  */
3356
- None = 0,
3353
+ dynamics: DynamicValue;
3357
3354
  /**
3358
- * Normal crescendo applied.
3355
+ * @clone_ignore
3356
+ * @json_ignore
3359
3357
  */
3360
- Crescendo = 1,
3358
+ isEffectSlurOrigin: boolean;
3361
3359
  /**
3362
- * Normal decrescendo applied.
3360
+ * @clone_ignore
3361
+ * @json_ignore
3363
3362
  */
3364
- Decrescendo = 2
3365
- }
3366
-
3367
- /**
3368
- * Lists all types of grace notes
3369
- */
3370
- declare enum GraceType {
3363
+ hasEffectSlur: boolean;
3364
+ get isEffectSlurDestination(): boolean;
3371
3365
  /**
3372
- * No grace, normal beat.
3366
+ * @clone_ignore
3367
+ * @json_ignore
3373
3368
  */
3374
- None = 0,
3369
+ effectSlurOrigin: Note | null;
3375
3370
  /**
3376
- * The beat contains on-beat grace notes.
3371
+ * @clone_ignore
3372
+ * @json_ignore
3377
3373
  */
3378
- OnBeat = 1,
3374
+ effectSlurDestination: Note | null;
3375
+ get stringTuning(): number;
3376
+ static getStringTuning(staff: Staff, noteString: number): number;
3377
+ get realValue(): number;
3378
+ get realValueWithoutHarmonic(): number;
3379
+ get harmonicPitch(): number;
3380
+ get initialBendValue(): number;
3381
+ get displayValue(): number;
3382
+ get displayValueWithoutBend(): number;
3383
+ get hasQuarterToneOffset(): boolean;
3384
+ addBendPoint(point: BendPoint): void;
3385
+ finish(settings: Settings, sharedDataBag: Map<string, unknown>): void;
3386
+ private static readonly MaxOffsetForSameLineSearch;
3387
+ static nextNoteOnSameLine(note: Note): Note | null;
3388
+ static findHammerPullDestination(note: Note): Note | null;
3389
+ static findTieOrigin(note: Note): Note | null;
3390
+ private static NoteIdLookupKey;
3391
+ private _noteIdBag;
3392
+ chain(sharedDataBag: Map<string, unknown>): void;
3379
3393
  /**
3380
- * The beat contains before-beat grace notes.
3394
+ * @internal
3381
3395
  */
3382
- BeforeBeat = 2,
3396
+ toJson(o: Map<string, unknown>): void;
3383
3397
  /**
3384
- * The beat contains very special bend-grace notes used in SongBook style displays.
3398
+ * @internal
3385
3399
  */
3386
- BendGrace = 3
3400
+ setProperty(property: string, v: unknown): boolean;
3387
3401
  }
3388
3402
 
3389
3403
  /**
@@ -3526,6 +3540,7 @@ declare enum BeatBeamingMode {
3526
3540
  * A beat is a single block within a bar. A beat is a combination
3527
3541
  * of several notes played at the same time.
3528
3542
  * @json
3543
+ * @json_strict
3529
3544
  * @cloneable
3530
3545
  */
3531
3546
  declare class Beat {
@@ -3714,7 +3729,7 @@ declare class Beat {
3714
3729
  * @json_add addWhammyBarPoint
3715
3730
  * @clone_add addWhammyBarPoint
3716
3731
  */
3717
- whammyBarPoints: BendPoint[];
3732
+ whammyBarPoints: BendPoint[] | null;
3718
3733
  /**
3719
3734
  * Gets or sets the highest point with for the highest whammy bar value.
3720
3735
  * @json_ignore
@@ -3830,7 +3845,7 @@ declare class Beat {
3830
3845
  private calculateDuration;
3831
3846
  updateDurations(): void;
3832
3847
  finishTuplet(): void;
3833
- finish(settings: Settings): void;
3848
+ finish(settings: Settings, sharedDataBag: Map<string, unknown>): void;
3834
3849
  /**
3835
3850
  * Checks whether the current beat is timewise before the given beat.
3836
3851
  * @param beat
@@ -3845,7 +3860,7 @@ declare class Beat {
3845
3860
  isAfter(beat: Beat): boolean;
3846
3861
  hasNoteOnString(noteString: number): boolean;
3847
3862
  getNoteWithRealValue(noteRealValue: number): Note | null;
3848
- chain(): void;
3863
+ chain(sharedDataBag: Map<string, unknown>): void;
3849
3864
  }
3850
3865
 
3851
3866
  /**
@@ -3978,6 +3993,18 @@ declare class Cursors {
3978
3993
  * provided whenever a part of of the music sheet is rendered.
3979
3994
  */
3980
3995
  declare class RenderFinishedEventArgs {
3996
+ /**
3997
+ * Gets or sets the unique id of this event args.
3998
+ */
3999
+ id: string;
4000
+ /**
4001
+ * Gets or sets the x position of the current rendering result.
4002
+ */
4003
+ x: number;
4004
+ /**
4005
+ * Gets or sets the y position of the current rendering result.
4006
+ */
4007
+ y: number;
3981
4008
  /**
3982
4009
  * Gets or sets the width of the current rendering result.
3983
4010
  */
@@ -4329,7 +4356,13 @@ interface IScoreRenderer {
4329
4356
  * @param score The score defining the tracks.
4330
4357
  * @param trackIndexes The indexes of the tracks to draw.
4331
4358
  */
4332
- renderScore(score: Score, trackIndexes: number[]): void;
4359
+ renderScore(score: Score | null, trackIndexes: number[] | null): void;
4360
+ /**
4361
+ * Initiates the rendering of a partial render result which the renderer
4362
+ * should have layed out already.
4363
+ * @param resultId the result ID as provided by the {@link partialLayoutFinished} event.
4364
+ */
4365
+ renderResult(resultId: string): void;
4333
4366
  /**
4334
4367
  * Updates the settings to the given object.
4335
4368
  * @param settings
@@ -4351,6 +4384,10 @@ interface IScoreRenderer {
4351
4384
  * Occurs whenever a part of the whole music sheet is rendered and can be displayed.
4352
4385
  */
4353
4386
  readonly partialRenderFinished: IEventEmitterOfT<RenderFinishedEventArgs>;
4387
+ /**
4388
+ * Occurs whenever a part of the whole music sheet is layed out but not yet rendered.
4389
+ */
4390
+ readonly partialLayoutFinished: IEventEmitterOfT<RenderFinishedEventArgs>;
4354
4391
  /**
4355
4392
  * Occurs when the whole rendering and layout process finished.
4356
4393
  */
@@ -4411,10 +4448,17 @@ interface IUiFacade<TSettings> {
4411
4448
  */
4412
4449
  initialRender(): void;
4413
4450
  /**
4414
- * Tells the UI layer to append the given render results to the UI.
4451
+ * Tells the UI layer to append the given render results to the UI. At this point
4452
+ * the partial result is not actually rendered yet, only the layouting process
4453
+ * completed.
4415
4454
  * @param renderResults The rendered partial that should be added to the UI.
4416
4455
  */
4417
4456
  beginAppendRenderResults(renderResults: RenderFinishedEventArgs | null): void;
4457
+ /**
4458
+ * Tells the UI layer to update the given render results within the UI.
4459
+ * @param renderResults The rendered partial that should be updated within the UI.
4460
+ */
4461
+ beginUpdateRenderResults(renderResults: RenderFinishedEventArgs): void;
4418
4462
  /**
4419
4463
  * Tells the UI layer to create the worker renderer. This method is the UI layer supports worker rendering and worker rendering is not disabled via setting.
4420
4464
  * @returns
@@ -4583,6 +4627,7 @@ declare class AlphaTabApiBase<TSettings> {
4583
4627
  */
4584
4628
  private triggerResize;
4585
4629
  private appendRenderResult;
4630
+ private updateRenderResult;
4586
4631
  /**
4587
4632
  * Tells alphaTab to render the given alphaTex.
4588
4633
  * @param tex The alphaTex code to render.
@@ -4685,6 +4730,7 @@ declare class AlphaTabApiBase<TSettings> {
4685
4730
  private _previousTick;
4686
4731
  private _playerState;
4687
4732
  private _currentBeat;
4733
+ private _currentBarBounds;
4688
4734
  private _previousStateForCursor;
4689
4735
  private _previousCursorCache;
4690
4736
  private _lastScroll;
@@ -4694,12 +4740,18 @@ declare class AlphaTabApiBase<TSettings> {
4694
4740
  * updates the cursors to highlight the beat at the specified tick position
4695
4741
  * @param tick
4696
4742
  * @param stop
4743
+ * @param shouldScroll whether we should scroll to the bar (if scrolling is active)
4697
4744
  */
4698
4745
  private cursorUpdateTick;
4699
4746
  /**
4700
4747
  * updates the cursors to highlight the specified beat
4701
4748
  */
4702
4749
  private cursorUpdateBeat;
4750
+ /**
4751
+ * Initiates a scroll to the cursor
4752
+ */
4753
+ scrollToCursor(): void;
4754
+ internalScrollToCursor(barBoundings: MasterBarBounds): void;
4703
4755
  private internalCursorUpdateBeat;
4704
4756
  playedBeatChanged: IEventEmitterOfT<Beat>;
4705
4757
  private onPlayedBeatChanged;
@@ -4855,7 +4907,7 @@ declare class ScoreLoader {
4855
4907
  */
4856
4908
  declare class UnsupportedFormatError extends AlphaTabError {
4857
4909
  inner: Error | null;
4858
- constructor(message?: string, inner?: Error | null);
4910
+ constructor(message?: string | null, inner?: Error | null);
4859
4911
  }
4860
4912
 
4861
4913
  type index_d$5_ScoreImporter = ScoreImporter;
@@ -6106,7 +6158,7 @@ declare class StaveGroup {
6106
6158
  paint(cx: number, cy: number, canvas: ICanvas): void;
6107
6159
  paintPartial(cx: number, cy: number, canvas: ICanvas, startIndex: number, count: number): void;
6108
6160
  finalizeGroup(): void;
6109
- private buildBoundingsLookup;
6161
+ buildBoundingsLookup(cx: number, cy: number): void;
6110
6162
  getBarX(index: number): number;
6111
6163
  }
6112
6164
 
@@ -6383,7 +6435,7 @@ declare class TuningContainerGlyph extends RowContainerGlyph {
6383
6435
  }
6384
6436
 
6385
6437
  /**
6386
- * This is the base public class for creating new layouting engines for the score renderer.
6438
+ * This is the base class for creating new layouting engines for the score renderer.
6387
6439
  */
6388
6440
  declare abstract class ScoreLayout {
6389
6441
  private _barRendererLookup;
@@ -6395,9 +6447,15 @@ declare abstract class ScoreLayout {
6395
6447
  protected chordDiagrams: ChordDiagramContainerGlyph | null;
6396
6448
  protected tuningGlyph: TuningContainerGlyph | null;
6397
6449
  protected constructor(renderer: ScoreRenderer);
6450
+ abstract get firstBarX(): number;
6398
6451
  abstract get supportsResize(): boolean;
6399
- abstract resize(): void;
6452
+ resize(): void;
6453
+ abstract doResize(): void;
6400
6454
  layoutAndRender(): void;
6455
+ private _lazyPartials;
6456
+ protected registerPartial(args: RenderFinishedEventArgs, callback: (canvas: ICanvas) => void): void;
6457
+ private internalRenderLazyPartial;
6458
+ renderLazyPartial(resultId: string): void;
6401
6459
  protected abstract doLayoutAndRender(): void;
6402
6460
  private createScoreInfoGlyphs;
6403
6461
  get scale(): number;
@@ -6407,7 +6465,7 @@ declare abstract class ScoreLayout {
6407
6465
  registerBarRenderer(key: string, renderer: BarRendererBase): void;
6408
6466
  unregisterBarRenderer(key: string, renderer: BarRendererBase): void;
6409
6467
  getRendererForBar(key: string, bar: Bar): BarRendererBase | null;
6410
- renderAnnotation(): void;
6468
+ layoutAndRenderAnnotation(y: number): number;
6411
6469
  }
6412
6470
 
6413
6471
  /**
@@ -6421,6 +6479,9 @@ declare class ScoreRenderer implements IScoreRenderer {
6421
6479
  canvas: ICanvas | null;
6422
6480
  score: Score | null;
6423
6481
  tracks: Track[] | null;
6482
+ /**
6483
+ * @internal
6484
+ */
6424
6485
  layout: ScoreLayout | null;
6425
6486
  settings: Settings;
6426
6487
  boundsLookup: BoundsLookup | null;
@@ -6433,19 +6494,21 @@ declare class ScoreRenderer implements IScoreRenderer {
6433
6494
  destroy(): void;
6434
6495
  private recreateCanvas;
6435
6496
  private recreateLayout;
6436
- renderScore(score: Score, trackIndexes: number[]): void;
6497
+ renderScore(score: Score | null, trackIndexes: number[] | null): void;
6437
6498
  /**
6438
6499
  * Initiates rendering fof the given tracks.
6439
6500
  * @param tracks The tracks to render.
6440
6501
  */
6441
6502
  renderTracks(tracks: Track[]): void;
6442
6503
  updateSettings(settings: Settings): void;
6504
+ renderResult(resultId: string): void;
6443
6505
  render(): void;
6444
6506
  resizeRender(): void;
6445
6507
  private layoutAndRender;
6446
6508
  readonly preRender: IEventEmitterOfT<boolean>;
6447
6509
  readonly renderFinished: IEventEmitterOfT<RenderFinishedEventArgs>;
6448
6510
  readonly partialRenderFinished: IEventEmitterOfT<RenderFinishedEventArgs>;
6511
+ readonly partialLayoutFinished: IEventEmitterOfT<RenderFinishedEventArgs>;
6449
6512
  readonly postRenderFinished: IEventEmitter;
6450
6513
  readonly error: IEventEmitterOfT<Error>;
6451
6514
  private onRenderFinished;