From 3d543601e670de95bfc89992b45ec85401decc95 Mon Sep 17 00:00:00 2001 From: Miika Alonen Date: Thu, 2 Mar 2023 01:07:05 +0200 Subject: [PATCH] Fix for some chord issues --- ziffers/classes.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/ziffers/classes.py b/ziffers/classes.py index 266d95d..6a97713 100644 --- a/ziffers/classes.py +++ b/ziffers/classes.py @@ -355,14 +355,15 @@ class Chord(Event): self.pitch_classes = new_pitches - def update_notes(self, options, force=False): + def update_notes(self, options=None): """Update notes""" pitches, notes, freqs, octaves, durations, beats = ([] for _ in range(6)) # Update notes for pitch in self.pitch_classes: - pitch.update_options(options) - pitch.update_note() + if options is not None: + pitch.update_options(options) + pitch.update_note(True) # Sort by generated notes self.pitch_classes = sorted(self.pitch_classes, key=lambda x: x.note) @@ -651,6 +652,7 @@ class Sequence(Meta): Pitch( pitch_class=pitch_dict["pitch_class"], note=note, + freq=midi_to_freq(note), kwargs=(options | pitch_dict), ) )