Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -130,16 +130,18 @@ def render_midi(input_midi, render_type, soundfont_bank, render_sample_rate, mel
|
|
130 |
|
131 |
new_tones_chord = TMIDIX.check_and_fix_tones_chord(tones_chord)
|
132 |
|
133 |
-
if
|
134 |
if len(c) > 1:
|
135 |
output_score.extend([c[0]])
|
136 |
-
for cc in c[1:]
|
137 |
if cc[3] != 9 and (cc[4] % 12) in new_tones_chord:
|
138 |
output_score.extend([cc])
|
139 |
output_score.extend(drums_events)
|
140 |
else:
|
141 |
|
142 |
output_score.extend([c[0]] + drums_events)
|
|
|
|
|
143 |
|
144 |
print('Done processing!')
|
145 |
print('=' * 70)
|
|
|
130 |
|
131 |
new_tones_chord = TMIDIX.check_and_fix_tones_chord(tones_chord)
|
132 |
|
133 |
+
if new_tones_chord:
|
134 |
if len(c) > 1:
|
135 |
output_score.extend([c[0]])
|
136 |
+
for cc in c[1:]:
|
137 |
if cc[3] != 9 and (cc[4] % 12) in new_tones_chord:
|
138 |
output_score.extend([cc])
|
139 |
output_score.extend(drums_events)
|
140 |
else:
|
141 |
|
142 |
output_score.extend([c[0]] + drums_events)
|
143 |
+
else:
|
144 |
+
output_score.extend(c)
|
145 |
|
146 |
print('Done processing!')
|
147 |
print('=' * 70)
|