@coderline/alphatab 1.3.0-alpha.849 → 1.3.0-alpha.854

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.
@@ -2399,6 +2399,7 @@ declare class Note {
2399
2399
  get isStringed(): boolean;
2400
2400
  /**
2401
2401
  * Gets or sets the fret on which this note is played on the instrument.
2402
+ * 0 is the nut.
2402
2403
  */
2403
2404
  fret: number;
2404
2405
  /**
@@ -2716,6 +2717,13 @@ declare class Note {
2716
2717
  static getStringTuning(staff: Staff, noteString: number): number;
2717
2718
  get realValue(): number;
2718
2719
  get realValueWithoutHarmonic(): number;
2720
+ /**
2721
+ * Calculates the real note value of this note as midi key respecting the given options.
2722
+ * @param applyTranspositionPitch Whether or not to apply the transposition pitch of the current staff.
2723
+ * @param applyHarmonic Whether or not to apply harmonic pitches to the note.
2724
+ * @returns The calculated note value as midi key.
2725
+ */
2726
+ calculateRealValue(applyTranspositionPitch: boolean, applyHarmonic: boolean): number;
2719
2727
  get harmonicPitch(): number;
2720
2728
  get initialBendValue(): number;
2721
2729
  get displayValue(): number;
@@ -5992,6 +6000,11 @@ interface IAlphaSynth {
5992
6000
  * @param midi
5993
6001
  */
5994
6002
  loadMidiFile(midi: MidiFile): void;
6003
+ /**
6004
+ * Applies the given transposition pitches to be used during playback.
6005
+ * @param transpositionPitches a map defining the transposition pitches for midi channel.
6006
+ */
6007
+ applyTranspositionPitches(transpositionPitches: Map<number, number>): void;
5995
6008
  /**
5996
6009
  * Sets the mute state of a channel.
5997
6010
  * @param channel The channel number
@@ -6817,6 +6830,14 @@ declare class MidiFileGenerator {
6817
6830
  * at a given midi tick position.
6818
6831
  */
6819
6832
  readonly tickLookup: MidiTickLookup;
6833
+ /**
6834
+ * Gets or sets whether transposition pitches should be applied to the individual midi events or not.
6835
+ */
6836
+ applyTranspositionPitches: boolean;
6837
+ /**
6838
+ * Gets the transposition pitches for the individual midi channels.
6839
+ */
6840
+ readonly transpositionPitches: Map<number, number>;
6820
6841
  /**
6821
6842
  * Initializes a new instance of the {@link MidiFileGenerator} class.
6822
6843
  * @param score The score for which the midi file should be generated.
@@ -6830,6 +6851,7 @@ declare class MidiFileGenerator {
6830
6851
  generate(): void;
6831
6852
  private generateTrack;
6832
6853
  private addProgramChange;
6854
+ static buildTranspositionPitches(score: Score, settings: Settings): Map<number, number>;
6833
6855
  private generateChannel;
6834
6856
  private static toChannelShort;
6835
6857
  private generateMasterBar;
@@ -7186,6 +7208,7 @@ declare class AlphaSynth implements IAlphaSynth {
7186
7208
  * @param midi The midi file to load
7187
7209
  */
7188
7210
  loadMidiFile(midi: MidiFile): void;
7211
+ applyTranspositionPitches(transpositionPitches: Map<number, number>): void;
7189
7212
  setChannelMute(channel: number, mute: boolean): void;
7190
7213
  resetChannelStates(): void;
7191
7214
  setChannelSolo(channel: number, solo: boolean): void;
@@ -7300,6 +7323,7 @@ declare class AlphaSynthWebWorkerApi implements IAlphaSynth {
7300
7323
  loadSoundFontFromUrl(url: string, append: boolean, progress: (e: ProgressEventArgs) => void): void;
7301
7324
  resetSoundFonts(): void;
7302
7325
  loadMidiFile(midi: MidiFile): void;
7326
+ applyTranspositionPitches(transpositionPitches: Map<number, number>): void;
7303
7327
  setChannelMute(channel: number, mute: boolean): void;
7304
7328
  resetChannelStates(): void;
7305
7329
  setChannelSolo(channel: number, solo: boolean): void;