|
@@ -46,7 +46,7 @@ export class PlaybackManager implements IPlaybackParametersListener {
|
|
|
public addListener(listener: IPlaybackListener): void {
|
|
|
this.listeners.push(listener);
|
|
|
}
|
|
|
- private readonly percussionChannel: number = 9; // this is a definition of the midi interface (cannot be changed)
|
|
|
+ private readonly percussionChannel: number = 10; // this is a definition of the midi interface (cannot be changed)
|
|
|
private messageViewer: IMessageViewer;
|
|
|
private audioMetronomePlayer: IAudioMetronomePlayer;
|
|
|
private audioPlayer: IAudioPlayer<any>;
|
|
@@ -115,6 +115,7 @@ export class PlaybackManager implements IPlaybackParametersListener {
|
|
|
public MoveCursorDuringPrecount: boolean = true;
|
|
|
private fermataActive: boolean;
|
|
|
private doPreCount: boolean = true;
|
|
|
+ public IgnoreFixedInstrumentKeysForPercussion: boolean = true;
|
|
|
|
|
|
constructor (timingSource: ITimingSource, audioMetronomePlayer: IAudioMetronomePlayer, audioPlayer: IAudioPlayer<any>, messageViewer: IMessageViewer) {
|
|
|
const metronomeLabel: string = TextTranslation.translateText("Playback/LabelMetronome", "Metronome");
|
|
@@ -282,7 +283,7 @@ export class PlaybackManager implements IPlaybackParametersListener {
|
|
|
|
|
|
this.audioPlayer.open(uniqueMidiInstruments, 16);
|
|
|
// set drums:
|
|
|
- this.audioPlayer.setSound(this.percussionChannel, 115);
|
|
|
+ this.audioPlayer.setSound(this.percussionChannel, MidiInstrument.Percussion);
|
|
|
}
|
|
|
|
|
|
this.currentReferenceBPM = this.sheetStartBPM = musicSheet.getExpressionsStartTempoInBPM();
|
|
@@ -746,7 +747,7 @@ export class PlaybackManager implements IPlaybackParametersListener {
|
|
|
const notePlaybackInstrument: SubInstrument =
|
|
|
instrument.getSubInstrument(note.ParentNote.PlaybackInstrumentId);
|
|
|
if (notePlaybackInstrument !== undefined) {
|
|
|
- if (notePlaybackInstrument.fixedKey >= 0) {
|
|
|
+ if (notePlaybackInstrument.fixedKey >= 0 && !(isPercussion && this.IgnoreFixedInstrumentKeysForPercussion)) {
|
|
|
key = notePlaybackInstrument.fixedKey;
|
|
|
}
|
|
|
}
|