From 00f98151c1e5d3cf8be0fc057403c03e19bbdf8a Mon Sep 17 00:00:00 2001 From: GitBluub Date: Thu, 18 Jan 2024 03:56:05 +0100 Subject: [PATCH] list compreeeheeension --- scorometer/chroma_case/song_check.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/scorometer/chroma_case/song_check.py b/scorometer/chroma_case/song_check.py index 40d46bb..7be6040 100644 --- a/scorometer/chroma_case/song_check.py +++ b/scorometer/chroma_case/song_check.py @@ -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)