asigalov61 commited on
Commit
819a468
1 Parent(s): 30f9405

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -90,6 +90,7 @@ def run(search_prompt, mid=None):
90
 
91
  for m in meta_data:
92
  mid_seq.extend(m[1][17:])
 
93
  break
94
 
95
  elif mid is not None:
@@ -106,7 +107,7 @@ def run(search_prompt, mid=None):
106
 
107
  with open(f"output.mid", 'wb') as f:
108
  f.write(MIDI.score2midi(mid_seq))
109
- audio = synthesis(MIDI.score2opus(mid_seq), soundfont_path)
110
  yield mid_seq, "output.mid", (44100, audio), [create_msg("visualizer_end", None)]
111
 
112
 
 
90
 
91
  for m in meta_data:
92
  mid_seq.extend(m[1][17:])
93
+ mid_seq_ticks = m[1][16][1]
94
  break
95
 
96
  elif mid is not None:
 
107
 
108
  with open(f"output.mid", 'wb') as f:
109
  f.write(MIDI.score2midi(mid_seq))
110
+ audio = synthesis(MIDI.score2opus([mid_seq_ticks, [mid_seq]]), soundfont_path)
111
  yield mid_seq, "output.mid", (44100, audio), [create_msg("visualizer_end", None)]
112
 
113