Spaces:
Running
Running
asigalov61
commited on
Commit
•
99b3591
1
Parent(s):
7a88549
Update app.py
Browse files
app.py
CHANGED
@@ -39,13 +39,11 @@ def run(search_prompt, mid=None, progress=gr.Progress()):
|
|
39 |
x.append(s[1] / mid_seq_ticks)
|
40 |
y.append(s[4])
|
41 |
c.append(colors[s[3]])
|
42 |
-
|
43 |
-
plot = gr.ScatterPlot(x=x, y=y, color=c)
|
44 |
|
45 |
with open(f"output.mid", 'wb') as f:
|
46 |
f.write(MIDI.score2midi([mid_seq_ticks, mid_seq]))
|
47 |
audio = synthesis(MIDI.score2opus([mid_seq_ticks, mid_seq]), soundfont_path)
|
48 |
-
yield mdata, "output.mid", (44100, audio),
|
49 |
|
50 |
if __name__ == "__main__":
|
51 |
parser = argparse.ArgumentParser()
|
|
|
39 |
x.append(s[1] / mid_seq_ticks)
|
40 |
y.append(s[4])
|
41 |
c.append(colors[s[3]])
|
|
|
|
|
42 |
|
43 |
with open(f"output.mid", 'wb') as f:
|
44 |
f.write(MIDI.score2midi([mid_seq_ticks, mid_seq]))
|
45 |
audio = synthesis(MIDI.score2opus([mid_seq_ticks, mid_seq]), soundfont_path)
|
46 |
+
yield mdata, "output.mid", (44100, audio), x, y, c
|
47 |
|
48 |
if __name__ == "__main__":
|
49 |
parser = argparse.ArgumentParser()
|