Update app.py
Browse files
app.py
CHANGED
|
@@ -336,11 +336,11 @@ def save_midi(tokens):
|
|
| 336 |
if 0 <= m < 128:
|
| 337 |
time += m * 32
|
| 338 |
|
| 339 |
-
elif
|
| 340 |
-
pitch = (m-
|
| 341 |
|
| 342 |
-
elif
|
| 343 |
-
dur = (m-
|
| 344 |
song_f.append(['note', time, dur, 0, pitch, max(40, pitch), 0])
|
| 345 |
|
| 346 |
if song_f is not None and song_f:
|
|
|
|
| 336 |
if 0 <= m < 128:
|
| 337 |
time += m * 32
|
| 338 |
|
| 339 |
+
elif 461 < m < 589:
|
| 340 |
+
pitch = (m-461)
|
| 341 |
|
| 342 |
+
elif 589 < m < 717:
|
| 343 |
+
dur = (m-589) * 32
|
| 344 |
song_f.append(['note', time, dur, 0, pitch, max(40, pitch), 0])
|
| 345 |
|
| 346 |
if song_f is not None and song_f:
|