Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- song_length = 68000
- offset = 105
- bpm_list = [
- # (x, y), = bpm, beats
- (126, 3),
- (180, 2),
- (236, 1),
- (126, 1),
- (102, 1),
- ]
- timing_points = [(offset, bpm_list[0][0])]
- current_time = offset
- index = 0
- while True:
- bpm, beats = bpm_list[index]
- beat_duration = 60000 / bpm
- segment_duration = beat_duration * beats
- next_time = current_time + segment_duration
- if next_time > song_length:
- break
- index = (index + 1) % len(bpm_list)
- next_bpm = bpm_list[index][0]
- timing_points.append((next_time, next_bpm))
- current_time = next_time
- print("TimingPoints:")
- for start_time, bpm in timing_points:
- print(f"- StartTime: {start_time:.0f}") # Changed it from .6f to .0f (cus Heki wanted me to remove all decimals: https://two.quavergame.com/mapsets/41293/ranking#rs-comment34783)
- print(f" Bpm: {bpm}")
Advertisement
Add Comment
Please, Sign In to add comment