Update app.py
Browse files
app.py
CHANGED
|
@@ -143,13 +143,16 @@ def Render_MIDI(input_midi,
|
|
| 143 |
output_score = TMIDIX.reverse_enhanced_score_notes(escore)
|
| 144 |
|
| 145 |
elif render_type == 'Repair Durations':
|
| 146 |
-
output_score = TMIDIX.fix_escore_notes_durations(escore)
|
| 147 |
|
| 148 |
elif render_type == 'Repair Chords':
|
| 149 |
fixed_cscore = TMIDIX.advanced_check_and_fix_chords_in_chordified_score(cscore)[0]
|
| 150 |
output_score = TMIDIX.flatten(fixed_cscore)
|
| 151 |
|
| 152 |
-
elif render_type ==
|
|
|
|
|
|
|
|
|
|
| 153 |
nd_escore = [e for e in escore if e[3] != 9]
|
| 154 |
nd_escore = TMIDIX.augment_enhanced_score_notes(nd_escore)
|
| 155 |
output_score = TMIDIX.advanced_add_drums_to_escore_notes(nd_escore)
|
|
@@ -393,10 +396,11 @@ if __name__ == "__main__":
|
|
| 393 |
"Reverse",
|
| 394 |
"Repair Durations",
|
| 395 |
"Repair Chords",
|
|
|
|
| 396 |
"Longest Repeating Phrase",
|
| 397 |
"Multi-Instrumental Summary",
|
| 398 |
"Solo Piano Summary",
|
| 399 |
-
"Add
|
| 400 |
],
|
| 401 |
label="Render type",
|
| 402 |
value="Render as-is"
|
|
|
|
| 143 |
output_score = TMIDIX.reverse_enhanced_score_notes(escore)
|
| 144 |
|
| 145 |
elif render_type == 'Repair Durations':
|
| 146 |
+
output_score = TMIDIX.fix_escore_notes_durations(escore, min_notes_gap=0)
|
| 147 |
|
| 148 |
elif render_type == 'Repair Chords':
|
| 149 |
fixed_cscore = TMIDIX.advanced_check_and_fix_chords_in_chordified_score(cscore)[0]
|
| 150 |
output_score = TMIDIX.flatten(fixed_cscore)
|
| 151 |
|
| 152 |
+
elif render_type == 'Remove Duplicate Pitches':
|
| 153 |
+
output_score = TMIDIX.remove_duplicate_pitches_from_escore_notes(escore)
|
| 154 |
+
|
| 155 |
+
elif render_type == "Add Drum Track":
|
| 156 |
nd_escore = [e for e in escore if e[3] != 9]
|
| 157 |
nd_escore = TMIDIX.augment_enhanced_score_notes(nd_escore)
|
| 158 |
output_score = TMIDIX.advanced_add_drums_to_escore_notes(nd_escore)
|
|
|
|
| 396 |
"Reverse",
|
| 397 |
"Repair Durations",
|
| 398 |
"Repair Chords",
|
| 399 |
+
"Remove Duplicate Pitches"
|
| 400 |
"Longest Repeating Phrase",
|
| 401 |
"Multi-Instrumental Summary",
|
| 402 |
"Solo Piano Summary",
|
| 403 |
+
"Add Drum Track"
|
| 404 |
],
|
| 405 |
label="Render type",
|
| 406 |
value="Render as-is"
|