asigalov61 commited on
Commit
f16b04e
1 Parent(s): ff7362d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -1
app.py CHANGED
@@ -144,7 +144,14 @@ def GenerateMIDI(num_tok, idrums, iinstr):
144
  if 1280 <= ss1 < 2816:
145
  channel = (ss1 - 1280) // 128
146
  pitch = (ss1 - 1280) % 128
147
- event = ['note', ctime, dur, channel, pitch, vel, list_of_MIDI_patches[channel]]
 
 
 
 
 
 
 
148
  output[-1].append(event)
149
 
150
  midi_data = TMIDIX.score2midi(output, text_encoding)
 
144
  if 1280 <= ss1 < 2816:
145
  channel = (ss1 - 1280) // 128
146
  pitch = (ss1 - 1280) % 128
147
+
148
+ if channel != 9:
149
+ pat = list_of_MIDI_patches[channel]
150
+ else:
151
+ pat = 128
152
+
153
+ event = ['note', ctime, dur, channel, pitch, vel, pat]
154
+
155
  output[-1].append(event)
156
 
157
  midi_data = TMIDIX.score2midi(output, text_encoding)