diff --git a/mingus/containers/bar.py b/mingus/containers/bar.py index 3557b502..a48d5908 100644 --- a/mingus/containers/bar.py +++ b/mingus/containers/bar.py @@ -104,7 +104,7 @@ def place_notes_at(self, notes, at): """Place notes at the given index.""" for x in self.bar: if x[0] == at: - x[0][2] += notes + x[2] += notes def place_rest(self, duration): """Place a rest of given duration on the current_beat. @@ -133,15 +133,16 @@ def is_full(self): def change_note_duration(self, at, to): """Change the note duration at the given index to the given duration.""" - if valid_beat_duration(to): + if _meter.valid_beat_duration(to): diff = 0 for x in self.bar: if diff != 0: - x[0][0] -= diff + x[0] -= diff if x[0] == at: - cur = x[0][1] - x[0][1] = to + cur = x[1] + x[1] = to diff = 1 / cur - 1 / to + self.current_beat -= diff def get_range(self): """Return the highest and the lowest note in a tuple."""