asigalov61
commited on
Commit
•
4f225bc
1
Parent(s):
9ff4066
Update app.py
Browse files
app.py
CHANGED
@@ -159,6 +159,7 @@ def Harmonize_Melody(input_src_midi,
|
|
159 |
print('dead chord', i, dev)
|
160 |
else:
|
161 |
print('DEAD END!!!')
|
|
|
162 |
break
|
163 |
|
164 |
|
@@ -310,12 +311,14 @@ if __name__ == "__main__":
|
|
310 |
|
311 |
source_melody_transpose_value = gr.Slider(-6, 6, value=0, step=1, label="Source melody transpose value", info="You can transpose source melody by specified number of semitones if the original melody key does not harmonize well")
|
312 |
harmonizer_melody_chunk_size = gr.Slider(4, 16, value=8, step=2, label="Hamonizer melody chunk size", info="Larger chunk sizes result in better harmonization at the cost of speed and harminzation length")
|
313 |
-
harmonizer_max_matches_count = gr.Slider(-1, 20, value=
|
314 |
|
315 |
melody_MIDI_patch_number = gr.Slider(0, 127, value=40, step=1, label="Source melody MIDI patch number")
|
316 |
harmonized_accompaniment_MIDI_patch_number = gr.Slider(0, 127, value=0, step=1, label="Harmonized accompaniment MIDI patch number")
|
317 |
base_MIDI_patch_number = gr.Slider(-1, 127, value=35, step=1, label="Base MIDI patch number")
|
318 |
|
|
|
|
|
319 |
run_btn = gr.Button("harmonize melody", variant="primary")
|
320 |
|
321 |
gr.Markdown("## Harmonization results")
|
|
|
159 |
print('dead chord', i, dev)
|
160 |
else:
|
161 |
print('DEAD END!!!')
|
162 |
+
song.append([mel_pitches[0]+48])
|
163 |
break
|
164 |
|
165 |
|
|
|
311 |
|
312 |
source_melody_transpose_value = gr.Slider(-6, 6, value=0, step=1, label="Source melody transpose value", info="You can transpose source melody by specified number of semitones if the original melody key does not harmonize well")
|
313 |
harmonizer_melody_chunk_size = gr.Slider(4, 16, value=8, step=2, label="Hamonizer melody chunk size", info="Larger chunk sizes result in better harmonization at the cost of speed and harminzation length")
|
314 |
+
harmonizer_max_matches_count = gr.Slider(-1, 20, value=0, step=1, label="Harmonizer max matches count", info="Maximum number of harmonized chords per melody note to collect and to select from")
|
315 |
|
316 |
melody_MIDI_patch_number = gr.Slider(0, 127, value=40, step=1, label="Source melody MIDI patch number")
|
317 |
harmonized_accompaniment_MIDI_patch_number = gr.Slider(0, 127, value=0, step=1, label="Harmonized accompaniment MIDI patch number")
|
318 |
base_MIDI_patch_number = gr.Slider(-1, 127, value=35, step=1, label="Base MIDI patch number")
|
319 |
|
320 |
+
gr.Markdown("## PLEASE NOTE: Harmonization may take a long time and it is dependent on the selected harmonization settings")
|
321 |
+
|
322 |
run_btn = gr.Button("harmonize melody", variant="primary")
|
323 |
|
324 |
gr.Markdown("## Harmonization results")
|