Merge pull request #32 from rakuri255/round_bpm

- Round bpm
This commit is contained in:
Vadim Rangnau authored and GitHub committed 2023-05-27 16:37:07 +02:00
commit db6df8beb1
2 files changed
+2 -2

No files matched your search

+1 -1
View File
@@ -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]
+1 -1
View File
@@ -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