Spaces:
Running
Running
asigalov61
commited on
Commit
•
4016ab4
1
Parent(s):
91d5e8a
Update app.py
Browse files
app.py
CHANGED
@@ -171,7 +171,7 @@ def find_midi(title, artist):
|
|
171 |
output = output_header + [patch_list + song_f]
|
172 |
|
173 |
with open(f"MIDI-Search-Sample.mid", 'wb') as f:
|
174 |
-
f.write(MIDI.score2midi(output)
|
175 |
audio = synthesis(MIDI.score2opus(output), soundfont_path)
|
176 |
yield AUX_DATA[search_index][0], "MIDI-Search-Sample.mid", (44100, audio), plt
|
177 |
|
@@ -212,7 +212,7 @@ if __name__ == "__main__":
|
|
212 |
|
213 |
gr.Markdown("# Search results")
|
214 |
|
215 |
-
output_midi_seq = gr.Textbox(label="
|
216 |
output_audio = gr.Audio(label="Output MIDI search sample audio", format="mp3", elem_id="midi_audio")
|
217 |
output_plot = gr.Plot(label="Output MIDI search sample plot")
|
218 |
output_midi = gr.File(label="Output MIDI search sample MIDI", file_types=[".mid"])
|
|
|
171 |
output = output_header + [patch_list + song_f]
|
172 |
|
173 |
with open(f"MIDI-Search-Sample.mid", 'wb') as f:
|
174 |
+
f.write(MIDI.score2midi(output))
|
175 |
audio = synthesis(MIDI.score2opus(output), soundfont_path)
|
176 |
yield AUX_DATA[search_index][0], "MIDI-Search-Sample.mid", (44100, audio), plt
|
177 |
|
|
|
212 |
|
213 |
gr.Markdown("# Search results")
|
214 |
|
215 |
+
output_midi_seq = gr.Textbox(label="Found MIDI search title")
|
216 |
output_audio = gr.Audio(label="Output MIDI search sample audio", format="mp3", elem_id="midi_audio")
|
217 |
output_plot = gr.Plot(label="Output MIDI search sample plot")
|
218 |
output_midi = gr.File(label="Output MIDI search sample MIDI", file_types=[".mid"])
|