list compreeeheeension
This commit is contained in:
@@ -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)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user