Front: Partition View: Set arbitrary bpm if not found in musicxml

This commit is contained in:
Arthur Jamet
2023-05-04 13:06:15 +01:00
parent f6226ce127
commit cce560031a

View File

@@ -60,7 +60,8 @@ const PartitionView = (props: PartitionViewProps) => {
setSoundPlayer(player);
_osmd.render();
// Ty https://github.com/jimutt/osmd-audio-player/blob/ec205a6e46ee50002c1fa8f5999389447bba7bbf/src/PlaybackEngine.ts#LL77C12-L77C63
setWholeNoteLength(Math.round((60 / _osmd.Sheet.getExpressionsStartTempoInBPM()) * 4000))
const bpm = _osmd.Sheet.HasBPMInfo ? _osmd.Sheet.getExpressionsStartTempoInBPM() : 60;
setWholeNoteLength(Math.round((60 / bpm) * 4000))
props.onPartitionReady();
_osmd.cursor.show();
});