asigalov61
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -110,10 +110,11 @@ def render_midi(input_midi, render_options):
|
|
110 |
if patches[e[3]] == -1:
|
111 |
patches[e[3]] = e[6]
|
112 |
else:
|
113 |
-
if
|
114 |
-
|
115 |
-
|
116 |
-
|
|
|
117 |
|
118 |
detailed_stats = TMIDIX.Tegridy_ms_SONG_to_MIDI_Converter(output_score,
|
119 |
output_signature = 'Advanced MIDI Renderer',
|
|
|
110 |
if patches[e[3]] == -1:
|
111 |
patches[e[3]] = e[6]
|
112 |
else:
|
113 |
+
if patches[e[3]] != e[6]:
|
114 |
+
if -1 in patches:
|
115 |
+
patches[patches.index(-1)] = e[6]
|
116 |
+
else:
|
117 |
+
patches[-1] = e[6]
|
118 |
|
119 |
detailed_stats = TMIDIX.Tegridy_ms_SONG_to_MIDI_Converter(output_score,
|
120 |
output_signature = 'Advanced MIDI Renderer',
|