Spaces:
Running
Running
asigalov61
commited on
Commit
•
e52c59a
1
Parent(s):
d356604
Update app.py
Browse files
app.py
CHANGED
@@ -288,13 +288,13 @@ def Mix_Melody(input_midi,
|
|
288 |
if input_remove_drums:
|
289 |
mixed_song = [e for e in mixed_song if e[3] != 9]
|
290 |
|
291 |
-
if input_output_tempo == '
|
292 |
|
293 |
time_k = mel_avg_time / mix_avg_time
|
294 |
|
295 |
mixed_song = TMIDIX.adjust_escore_notes_timings(mixed_song, time_k)
|
296 |
|
297 |
-
elif input_output_tempo == '
|
298 |
|
299 |
time_k = mel_avg_time / mix_mel_avg_time
|
300 |
|
@@ -391,7 +391,7 @@ if __name__ == "__main__":
|
|
391 |
input_adjust_accompaniment_notes_durations = gr.Checkbox(label="Adjust accompaniment notes durations", value=False)
|
392 |
input_output_as_solo_piano = gr.Checkbox(label="Output as Solo Piano", value=False)
|
393 |
input_remove_drums = gr.Checkbox(label="Remove drums from output", value=False)
|
394 |
-
input_output_tempo = gr.Radio(["Mix", "Source Melody", "Mix
|
395 |
|
396 |
run_btn = gr.Button("mix melody", variant="primary")
|
397 |
|
@@ -415,8 +415,8 @@ if __name__ == "__main__":
|
|
415 |
[output_midi_title, output_midi_summary, output_midi, output_audio, output_plot])
|
416 |
|
417 |
gr.Examples(
|
418 |
-
[["Abracadabra-Sample-Melody.mid", True, True, True, False, False, "Mix"],
|
419 |
-
["Sparks-Fly-Sample-Melody.mid", True, True, True, False, False, "Mix"],
|
420 |
],
|
421 |
[input_midi,
|
422 |
input_find_best_match,
|
|
|
288 |
if input_remove_drums:
|
289 |
mixed_song = [e for e in mixed_song if e[3] != 9]
|
290 |
|
291 |
+
if input_output_tempo == 'Mix':
|
292 |
|
293 |
time_k = mel_avg_time / mix_avg_time
|
294 |
|
295 |
mixed_song = TMIDIX.adjust_escore_notes_timings(mixed_song, time_k)
|
296 |
|
297 |
+
elif input_output_tempo == 'Source Melody':
|
298 |
|
299 |
time_k = mel_avg_time / mix_mel_avg_time
|
300 |
|
|
|
391 |
input_adjust_accompaniment_notes_durations = gr.Checkbox(label="Adjust accompaniment notes durations", value=False)
|
392 |
input_output_as_solo_piano = gr.Checkbox(label="Output as Solo Piano", value=False)
|
393 |
input_remove_drums = gr.Checkbox(label="Remove drums from output", value=False)
|
394 |
+
input_output_tempo = gr.Radio(["Mix Melody", "Source Melody", "Mix"], value="Mix Melody", label="Output tempo")
|
395 |
|
396 |
run_btn = gr.Button("mix melody", variant="primary")
|
397 |
|
|
|
415 |
[output_midi_title, output_midi_summary, output_midi, output_audio, output_plot])
|
416 |
|
417 |
gr.Examples(
|
418 |
+
[["Abracadabra-Sample-Melody.mid", True, True, True, False, False, "Mix Melody"],
|
419 |
+
["Sparks-Fly-Sample-Melody.mid", True, True, True, False, False, "Mix Melody"],
|
420 |
],
|
421 |
[input_midi,
|
422 |
input_find_best_match,
|