asigalov61 commited on
Commit
a9ed318
1 Parent(s): 1801257

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -3
app.py CHANGED
@@ -97,9 +97,10 @@ def run(search_prompt, mid=None):
97
  mid_seq = MIDI.midi2score(mid)
98
 
99
  init_msgs = [create_msg("visualizer_clear", None)]
100
- # for events in mid_seq:
101
- # init_msgs.append(create_msg("visualizer_append", events))
102
- # yield mid_seq, None, None, init_msgs
 
103
 
104
  for i in range(len(mid_seq)-1):
105
  if mid_seq[i][0] == 'note':
 
97
  mid_seq = MIDI.midi2score(mid)
98
 
99
  init_msgs = [create_msg("visualizer_clear", None)]
100
+ for event in mid_seq:
101
+ if event[0] == 'note':
102
+ init_msgs.append(create_msg("visualizer_append", event))
103
+ yield mid_seq, None, None, init_msgs
104
 
105
  for i in range(len(mid_seq)-1):
106
  if mid_seq[i][0] == 'note':