Spaces:
Running
on
Zero
Running
on
Zero
asigalov61
commited on
Commit
•
f6c94d2
1
Parent(s):
656e3b1
Update app.py
Browse files
app.py
CHANGED
@@ -138,10 +138,16 @@ def GenerateMIDI(progress=gr.Progress()):
|
|
138 |
|
139 |
with open(f"Allegro-Music-Transformer-Music-Composition.mid", 'wb') as f:
|
140 |
f.write(midi_data)
|
|
|
|
|
|
|
|
|
|
|
|
|
141 |
|
142 |
-
audio = synthesis(TMIDIX.score2opus(
|
143 |
|
144 |
-
yield
|
145 |
|
146 |
#=================================================================================================
|
147 |
|
|
|
138 |
|
139 |
with open(f"Allegro-Music-Transformer-Music-Composition.mid", 'wb') as f:
|
140 |
f.write(midi_data)
|
141 |
+
|
142 |
+
output1 = []
|
143 |
+
|
144 |
+
for o in output:
|
145 |
+
if o[0] == 'note':
|
146 |
+
output1.append(o)
|
147 |
|
148 |
+
audio = synthesis(TMIDIX.score2opus(output1), 'SGM-v2.01-YamahaGrand-Guit-Bass-v2.7.sf2')
|
149 |
|
150 |
+
yield output1, "Allegro-Music-Transformer-Music-Composition.mid", (44100, audio)
|
151 |
|
152 |
#=================================================================================================
|
153 |
|