diff --git a/UltraSinger.py b/UltraSinger.py index b34b327..f79a26f 100644 --- a/UltraSinger.py +++ b/UltraSinger.py @@ -105,7 +105,7 @@ def get_bpm_from_data(data, sr): onset_env = librosa.onset.onset_strength(y=data, sr=sr) wav_tempo = librosa.beat.tempo(onset_envelope=onset_env, sr=sr) - print("{} BPM is {}".format(PRINT_ULTRASTAR, print_blue_highlighted_text(str(wav_tempo[0])))) + print("{} BPM is {}".format(PRINT_ULTRASTAR, print_blue_highlighted_text(str(round(wav_tempo[0], 2))))) return wav_tempo[0] diff --git a/moduls/Ultrastar/ultrastar_writer.py b/moduls/Ultrastar/ultrastar_writer.py index 435ab01..b3105f3 100644 --- a/moduls/Ultrastar/ultrastar_writer.py +++ b/moduls/Ultrastar/ultrastar_writer.py @@ -39,7 +39,7 @@ def create_ultrastar_txt_from_automation(transcribed_data, note_numbers, ultrast f.write('#LANGUAGE:' + get_language_name(language) + '\n') f.write('#MP3:' + title + '.mp3\n') f.write('#VIDEO:' + title + '.mp4\n') - f.write('#BPM:' + str(ultrastar_bpm) + '\n') # not the real BPM! + f.write('#BPM:' + str(round(ultrastar_bpm, 2)) + '\n') # not the real BPM! f.write('#GAP:' + str(int(gap * 1000)) + '\n') # Write the singing part