Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -225,10 +225,9 @@ def Generate_Drums(input_midi,
|
|
225 |
|
226 |
def gen_drums(seq):
|
227 |
|
228 |
-
y =
|
229 |
-
seq.append((128*128)+38+256) # Drum pitch
|
230 |
|
231 |
-
while y >
|
232 |
|
233 |
x = torch.LongTensor(seq).to(device_type)
|
234 |
|
@@ -260,6 +259,9 @@ def Generate_Drums(input_midi,
|
|
260 |
|
261 |
final_song.extend(chords[i])
|
262 |
|
|
|
|
|
|
|
263 |
final_song = gen_drums(final_song)
|
264 |
|
265 |
#==================================================================
|
|
|
225 |
|
226 |
def gen_drums(seq):
|
227 |
|
228 |
+
y = 16640
|
|
|
229 |
|
230 |
+
while y > 16640:
|
231 |
|
232 |
x = torch.LongTensor(seq).to(device_type)
|
233 |
|
|
|
259 |
|
260 |
final_song.extend(chords[i])
|
261 |
|
262 |
+
if i == 0:
|
263 |
+
final_song.append((128*128)+38+256) # Drum pitch
|
264 |
+
|
265 |
final_song = gen_drums(final_song)
|
266 |
|
267 |
#==================================================================
|