Skip to content

Commit

Permalink
Changed to compute by segments instead of beats
Browse files Browse the repository at this point in the history
  • Loading branch information
mulfordjc committed Mar 26, 2015
1 parent da62d8f commit 7966e7d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion beatshift.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ def main(input_filename, start_beat, shift_length, shift_magnitude, output_filen
beat_count = 0

audiofile = audio.LocalAudioFile(input_filename)
beats = audiofile.analysis.beats
beats = audiofile.analysis.segments
collect = []

for beat in beats:
Expand Down
4 changes: 2 additions & 2 deletions songmix.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def main(first_filename, second_filename, start_beat, shift_length, second_start
beat_count = 0

audiofile1 = audio.LocalAudioFile(first_filename)
beats1 = audiofile1.analysis.beats
beats1 = audiofile1.analysis.segments
collect = []

while (beat_count < start_beat + shift_length and beat_count < len(beats1)):
Expand All @@ -53,7 +53,7 @@ def main(first_filename, second_filename, start_beat, shift_length, second_start
beat_count = second_start

audiofile2 = audio.LocalAudioFile(second_filename)
beats2 = audiofile2.analysis.beats
beats2 = audiofile2.analysis.segments

while (beat_count < len(beats2)):
beat_audio = beats2[beat_count].render()
Expand Down

0 comments on commit 7966e7d

Please sign in to comment.