Update app.py
Browse files
app.py
CHANGED
|
@@ -117,11 +117,15 @@ def render_midi(input_midi, render_type, soundfont_bank, render_sample_rate, cus
|
|
| 117 |
|
| 118 |
min_pitch = min([e[4] for e in escore if e[3] != 9])
|
| 119 |
|
| 120 |
-
|
| 121 |
|
| 122 |
-
delta_min_pitch = min_pitch - min([e[4] for e in
|
| 123 |
|
| 124 |
-
output_score =
|
|
|
|
|
|
|
|
|
|
|
|
|
| 125 |
|
| 126 |
elif render_type == 'Repair':
|
| 127 |
output_score = []
|
|
|
|
| 117 |
|
| 118 |
min_pitch = min([e[4] for e in escore if e[3] != 9])
|
| 119 |
|
| 120 |
+
fliped_score_pitches = [127 - e[4] if e[3] != 9 else e[4] for e in escore]
|
| 121 |
|
| 122 |
+
delta_min_pitch = min_pitch - min([e[4] for e in fliped_score_pitches if e[3] != 9])
|
| 123 |
|
| 124 |
+
output_score = copy.deepcopy(escore)
|
| 125 |
+
|
| 126 |
+
for e in output_score:
|
| 127 |
+
if e[3] != 9:
|
| 128 |
+
e[4] (127 - e[4])+delta_min_pitch
|
| 129 |
|
| 130 |
elif render_type == 'Repair':
|
| 131 |
output_score = []
|