asigalov61
commited on
Commit
•
96122eb
1
Parent(s):
9363e59
Update app.py
Browse files
app.py
CHANGED
@@ -140,12 +140,16 @@ def GenerateMIDI(progress=gr.Progress()):
|
|
140 |
f.write(midi_data)
|
141 |
|
142 |
output1 = []
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
|
|
|
|
|
|
|
|
|
147 |
|
148 |
-
audio = synthesis(output1
|
149 |
|
150 |
yield output1, "Allegro-Music-Transformer-Music-Composition.mid", (44100, audio)
|
151 |
|
|
|
140 |
f.write(midi_data)
|
141 |
|
142 |
output1 = []
|
143 |
+
itrack = 1
|
144 |
+
|
145 |
+
opus = TMIDIX.score2opus(output):
|
146 |
+
|
147 |
+
while itrack < len(opus):
|
148 |
+
for event in opus[itrack]:
|
149 |
+
if event[0] == 'note':
|
150 |
+
output1.append(o)
|
151 |
|
152 |
+
audio = synthesis(output1, 'SGM-v2.01-YamahaGrand-Guit-Bass-v2.7.sf2')
|
153 |
|
154 |
yield output1, "Allegro-Music-Transformer-Music-Composition.mid", (44100, audio)
|
155 |
|