Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -120,7 +120,13 @@ def load_midi(input_midi, melody_patch=-1):
|
|
120 |
zscore = TMIDIX.recalculate_score_timings(sp_escore_notes)
|
121 |
|
122 |
else:
|
123 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
124 |
|
125 |
cscore = TMIDIX.chordify_score([1000, zscore])
|
126 |
|
|
|
120 |
zscore = TMIDIX.recalculate_score_timings(sp_escore_notes)
|
121 |
|
122 |
else:
|
123 |
+
mel_score = [e for e in sp_escore_notes if e[6] == melody_patch]
|
124 |
+
|
125 |
+
if mel_score:
|
126 |
+
zscore = TMIDIX.recalculate_score_timings(mel_score)
|
127 |
+
|
128 |
+
else:
|
129 |
+
zscore = TMIDIX.recalculate_score_timings(sp_escore_notes)
|
130 |
|
131 |
cscore = TMIDIX.chordify_score([1000, zscore])
|
132 |
|