|
@@ -737,7 +737,9 @@ export class PlaybackManager implements IPlaybackParametersListener {
|
|
|
}
|
|
|
|
|
|
// recalculate Volume for this instrument:
|
|
|
- volume = notePlaybackInstrument.volume * staff.Volume * voiceEntry.ParentVoice.Volume;
|
|
|
+ const instrumentVolume: number = notePlaybackInstrument?.volume ?? 1;
|
|
|
+ // TODO notePlaybackInstrument can be undefined, e.g. issue 42
|
|
|
+ volume = instrumentVolume * staff.Volume * voiceEntry.ParentVoice.Volume;
|
|
|
|
|
|
// attenuate if in Solo mode an this voice is not soloed:
|
|
|
if (soloAttenuate) {
|