Permalink
Browse files

Revert "change CountChordChanges to look at the last chord and the fi…

…rst chord"

This reverts commit ff189dd.
  • Loading branch information...
1 parent 657a1f1 commit 08fecb4894cf5dc63ade088f5d89b69ec4600744 Raphael Sofaer committed Jan 7, 2012
Showing with 1 addition and 9 deletions.
  1. +1 −9 scripts/chordEnergy.py
View
@@ -98,22 +98,14 @@ def count_chord_changes(self):
total_chord_change_map = {}
previous_moment = None
for table in self.tables:
- for time in range(0, len(table[0])):
+ for time in range(1, len(table[0])):
moment = tuple(map(lambda v: v[time], table))
if not previous_moment in total_chord_change_map:
total_chord_change_map[previous_moment] = {}
if not moment in total_chord_change_map[previous_moment]:
total_chord_change_map[previous_moment][moment] = 0
total_chord_change_map[previous_moment][moment] += 1
previous_moment = moment
-
-
- if not previous_moment in total_chord_change_map:
- total_chord_change_map[previous_moment] = {}
- moment = None
- if not moment in total_chord_change_map[previous_moment]:
- total_chord_change_map[previous_moment][moment] = 0
- total_chord_change_map[previous_moment][moment] += 1
self.chordChanges = total_chord_change_map
def count_chords(self):

0 comments on commit 08fecb4

Please sign in to comment.