Update app.py
Browse files
app.py
CHANGED
@@ -40,7 +40,7 @@ def Generate_Chords_Progression(total_song_length_in_chords_chunks,
|
|
40 |
print('Total song length in chords chunks:', total_song_length_in_chords_chunks)
|
41 |
print('Chords chunks memory length:', chords_chunks_memory_length)
|
42 |
print('Chord time step:', chord_time_step)
|
43 |
-
print('Merge chords notes:', merge_chords_notes)
|
44 |
print('Melody MIDI patch number:', melody_MIDI_patch_number)
|
45 |
print('Chords progression MIDI patch number:', chords_progression_MIDI_patch_number)
|
46 |
print('Base MIDI patch number:', base_MIDI_patch_number)
|
@@ -177,7 +177,7 @@ def Generate_Chords_Progression(total_song_length_in_chords_chunks,
|
|
177 |
if melody_MIDI_patch_number > -1:
|
178 |
output_score = TMIDIX.add_melody_to_enhanced_score_notes(output_score, melody_patch=melody_MIDI_patch_number)
|
179 |
|
180 |
-
if merge_chords_notes:
|
181 |
escore_matrix = TMIDIX.escore_notes_to_escore_matrix(output_score)
|
182 |
output_score = TMIDIX.escore_matrix_to_merged_escore_notes(escore_matrix, max_note_duration=chord_time_step*4)
|
183 |
|
@@ -339,7 +339,7 @@ if __name__ == "__main__":
|
|
339 |
total_song_length_in_chords_chunks = gr.Slider(4, 10, value=8, step=1, label="Total song length in chords chunks")
|
340 |
chords_chunks_memory_length = gr.Slider(-1, 12, value=-1, step=1, label="Chords chunks memory length")
|
341 |
chord_time_step = gr.Slider(100, 1000, value=500, step=50, label="Chord time step")
|
342 |
-
merge_chords_notes = gr.
|
343 |
melody_MIDI_patch_number = gr.Slider(0, 127, value=40, step=1, label="Melody MIDI patch number")
|
344 |
chords_progression_MIDI_patch_number = gr.Slider(0, 127, value=0, step=1, label="Chords progression MIDI patch number")
|
345 |
base_MIDI_patch_number = gr.Slider(0, 127, value=35, step=1, label="Base MIDI patch number")
|
|
|
40 |
print('Total song length in chords chunks:', total_song_length_in_chords_chunks)
|
41 |
print('Chords chunks memory length:', chords_chunks_memory_length)
|
42 |
print('Chord time step:', chord_time_step)
|
43 |
+
print('Merge chords notes max time:', merge_chords_notes)
|
44 |
print('Melody MIDI patch number:', melody_MIDI_patch_number)
|
45 |
print('Chords progression MIDI patch number:', chords_progression_MIDI_patch_number)
|
46 |
print('Base MIDI patch number:', base_MIDI_patch_number)
|
|
|
177 |
if melody_MIDI_patch_number > -1:
|
178 |
output_score = TMIDIX.add_melody_to_enhanced_score_notes(output_score, melody_patch=melody_MIDI_patch_number)
|
179 |
|
180 |
+
if merge_chords_notes > 0:
|
181 |
escore_matrix = TMIDIX.escore_notes_to_escore_matrix(output_score)
|
182 |
output_score = TMIDIX.escore_matrix_to_merged_escore_notes(escore_matrix, max_note_duration=chord_time_step*4)
|
183 |
|
|
|
339 |
total_song_length_in_chords_chunks = gr.Slider(4, 10, value=8, step=1, label="Total song length in chords chunks")
|
340 |
chords_chunks_memory_length = gr.Slider(-1, 12, value=-1, step=1, label="Chords chunks memory length")
|
341 |
chord_time_step = gr.Slider(100, 1000, value=500, step=50, label="Chord time step")
|
342 |
+
merge_chords_notes = gr.Slider(0, 4000, value=0, step=100, label="Merged chords notes max time")
|
343 |
melody_MIDI_patch_number = gr.Slider(0, 127, value=40, step=1, label="Melody MIDI patch number")
|
344 |
chords_progression_MIDI_patch_number = gr.Slider(0, 127, value=0, step=1, label="Chords progression MIDI patch number")
|
345 |
base_MIDI_patch_number = gr.Slider(0, 127, value=35, step=1, label="Base MIDI patch number")
|