Basic circle placement according to beat
this doesn't work because sound_process code seems to break for files other than tetris for me...
This commit is contained in:
parent
b1687d5d1c
commit
21ea707712
12
main.py
12
main.py
|
@ -1,6 +1,8 @@
|
||||||
from tkinter import filedialog as fd
|
from tkinter import filedialog as fd
|
||||||
import slider as sl
|
import slider as sl
|
||||||
from datetime import timedelta
|
from datetime import timedelta
|
||||||
|
import place
|
||||||
|
import sound_process
|
||||||
|
|
||||||
def alexandre_process(bpm, offset, filename):
|
def alexandre_process(bpm, offset, filename):
|
||||||
pass
|
pass
|
||||||
|
@ -10,9 +12,13 @@ def main():
|
||||||
beatmap = sl.Beatmap.from_path(filename)
|
beatmap = sl.Beatmap.from_path(filename)
|
||||||
timing = beatmap.timing_points[0]
|
timing = beatmap.timing_points[0]
|
||||||
bpm = timing.bpm
|
bpm = timing.bpm
|
||||||
offset = timing.offset
|
offset = timing.offset.total_seconds() * 10e3
|
||||||
beatmap._hit_objects = [sl.Circle(sl.Position(0, 0), timedelta(milliseconds=3), 0)]
|
print(beatmap.audio_filename)
|
||||||
beatmap._hit_objects = [sl.Slider(sl.Position(0, 0), timedelta(milliseconds=3), timedelta(milliseconds=130), 0, sl.curve.Linear([sl.Position(0, 0), sl.Position(100, 100)], 100), 100, 2, 1, 1, 1, timing.ms_per_beat, [], [],)]
|
|
||||||
|
timings, amplitudes, freqs = sound_process.process_song(beatmap.audio_filename, offset, bpm)
|
||||||
|
|
||||||
|
beatmap._hit_objects = place.greedy(bpm, offset, timings, amplitudes)
|
||||||
|
#beatmap._hit_objects = [sl.Slider(sl.Position(0, 0), timedelta(milliseconds=3), timedelta(milliseconds=130), 0, sl.curve.Linear([sl.Position(0, 0), sl.Position(100, 100)], 100), 100, 2, 1, 1, 1, timing.ms_per_beat, [], [],)]
|
||||||
beatmap.write_path("rewrite.osu")
|
beatmap.write_path("rewrite.osu")
|
||||||
|
|
||||||
#timings, intensities = alexandre_process(bpm, offset, beatmap.audio_filename)
|
#timings, intensities = alexandre_process(bpm, offset, beatmap.audio_filename)
|
||||||
|
|
Loading…
Reference in New Issue