list compreeeheeension

This commit is contained in:
GitBluub
2024-01-18 03:56:05 +01:00
committed by Zoe Roux
parent 5d78d8b5dd
commit 00f98151c1

View File

@@ -10,10 +10,7 @@ from mido import MidiFile
RATIO = 1.0
def getPartition(midiFile: str, cursors) -> Partition:
notes = []
for cursor in cursors:
for i in cursor["notes"]:
notes += [Key(i["note"], cursor["timestamp"], i["duration"])]
notes = [Key(i["note"], cursor["timestamp"], i["duration"]) for cursor in cursors for i in cursor["notes"]]
'''
s = 0
notes_on = {}
@@ -33,7 +30,7 @@ def getPartition(midiFile: str, cursors) -> Partition:
note_start = notes_on[d["note"]]
notes.append(Key(d["note"], note_start, duration - 10))
notes_on[d["note"]] = s # 500
'''
'''
return Partition(midiFile, notes)