Start preparing object placement
This commit is contained in:
parent
ea5ba44e34
commit
f545e0df3c
|
@ -0,0 +1,27 @@
|
||||||
|
from tkinter import filedialog as fd
|
||||||
|
import slider as sl
|
||||||
|
from datetime import timedelta
|
||||||
|
|
||||||
|
def alexandre_process(bpm, offset, filename):
|
||||||
|
pass
|
||||||
|
|
||||||
|
def main():
|
||||||
|
filename = fd.askopenfilename()
|
||||||
|
beatmap = sl.Beatmap.from_path(filename)
|
||||||
|
timing = beatmap.timing_points[0]
|
||||||
|
bpm = timing.bpm
|
||||||
|
offset = timing.offset
|
||||||
|
beatmap._hit_objects = [sl.Circle(sl.Position(0, 0), timedelta(milliseconds=3), 0)]
|
||||||
|
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")
|
||||||
|
|
||||||
|
#timings, intensities = alexandre_process(bpm, offset, beatmap.audio_filename)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
print(bpm)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
main()
|
11
place.py
11
place.py
|
@ -1,8 +1,13 @@
|
||||||
import numpy as np
|
import numpy as np
|
||||||
|
import slider as sl
|
||||||
|
from datetime import timedelta
|
||||||
|
|
||||||
|
def beatify(bpm:float, offset:int, time_ms:int):
|
||||||
|
return bpm/60000 * (time_ms - offset)
|
||||||
|
|
||||||
|
def demusicify(bpm:float, offset:int, beat:int):
|
||||||
|
return (beat*60000/bpm) + offset
|
||||||
|
|
||||||
"""
|
|
||||||
whle
|
|
||||||
"""
|
|
||||||
|
|
||||||
def f(intensity): return np.pi/2 - np.arctan(2*intensity - 5)
|
def f(intensity): return np.pi/2 - np.arctan(2*intensity - 5)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue