From cce560031a1f6a7856fbbf33758fc19d9fa6bd82 Mon Sep 17 00:00:00 2001 From: Arthur Jamet Date: Thu, 4 May 2023 13:06:15 +0100 Subject: [PATCH] Front: Partition View: Set arbitrary bpm if not found in musicxml --- front/components/PartitionView.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/front/components/PartitionView.tsx b/front/components/PartitionView.tsx index af86aee..33e8192 100644 --- a/front/components/PartitionView.tsx +++ b/front/components/PartitionView.tsx @@ -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(); });