Adapt files other than sound_process to accomodate changes

This commit is contained in:
Thibaud 2024-06-01 17:17:57 +02:00
parent d499dee0de
commit fc719fac68
2 changed files with 2 additions and 3 deletions

View File

@ -13,7 +13,7 @@ def main():
offset = timing.offset offset = timing.offset
print(beatmap.audio_filename) print(beatmap.audio_filename)
timings, amplitudes = sound_process.process_song(beatmap.audio_filename, bpm, offset0=offset, n_iter_2=-1) timings, amplitudes = sound_process.process_song(beatmap.audio_filename, bpm, offset=offset, n_iter_2=-1)
# NOTE : remove n_iter_2 to map the whole music # NOTE : remove n_iter_2 to map the whole music
beatmap._hit_objects = place.greedy(bpm, offset, timings, amplitudes) beatmap._hit_objects = place.greedy(bpm, offset, timings, amplitudes)

View File

@ -103,8 +103,7 @@ def get_freq(song_name, offset, step, songlen, data, display=False):
times = [] times = []
current_time = offset current_time = offset
k = 0 k = 0
subprocess.run(["ffmpeg", "-ss", str(offset), "-t", str(offset+songlen),"-i",song_name, "crop.wav"])
subprocess.run(["ffmpeg", "-ss", str(offset), "-t", str(offset+songlen), "-i", song_name, "crop.wav"])
sample_rate, global_data = wavfile.read("crop.wav") sample_rate, global_data = wavfile.read("crop.wav")
#blit = int(len(global_data) / len(data)) #blit = int(len(global_data) / len(data))