Commit 4fde9f84 authored by Jackson Garner's avatar Jackson Garner

Stuff

parent 5cefa8c4
......@@ -112,7 +112,7 @@ if not playing:
frame_at = -1
while t - origin < len(wav_data) / rate:
while frame_at < len(wav_data):
frame_at += 1
ret, frame = cap.read()
if load_from_file == True:
......@@ -131,7 +131,8 @@ while t - origin < len(wav_data) / rate:
if not playing:
t = time.time()
beat_distance = beat_times[nextBeat] - frame_at * timestep
if nextBeat + 1 < len(beat_times):
beat_distance = beat_times[nextBeat + 1] - frame_at * timestep
second = wav_data[math.floor((frame_at * timestep) * rate) : math.floor(((frame_at + 1) * timestep) * rate)]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment