Fix output to preserve internal tuple order
- Remove sorted_by_frequency from write functions - Output now uses internal chord._pitches order instead of sorted
This commit is contained in:
parent
ccf90d19e1
commit
2b422d55fe
|
|
@ -843,7 +843,7 @@ def write_chord_sequence(seq: list[Chord], path: str) -> None:
|
|||
serializable = []
|
||||
for chord in seq:
|
||||
chord_data = []
|
||||
for pitch in chord.sorted_by_frequency():
|
||||
for pitch in chord._pitches:
|
||||
chord_data.append(
|
||||
{
|
||||
"hs_array": list(pitch.hs_array),
|
||||
|
|
@ -868,7 +868,7 @@ def write_chord_sequence_readable(seq: list[Chord], path: str) -> None:
|
|||
with open(path, "w") as f:
|
||||
f.write("(\n")
|
||||
for i, chord in enumerate(seq):
|
||||
arrays = tuple(p.hs_array for p in chord.sorted_by_frequency())
|
||||
arrays = tuple(p.hs_array for p in chord._pitches)
|
||||
f.write(f" {arrays},\n")
|
||||
f.write(")\n")
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue