Update app.py
Browse files
app.py
CHANGED
|
@@ -22,40 +22,21 @@ import matplotlib.pyplot as plt
|
|
| 22 |
|
| 23 |
# =================================================================================================
|
| 24 |
|
| 25 |
-
def Generate_Melody(
|
| 26 |
-
|
| 27 |
-
|
| 28 |
-
input_adjust_accompaniment_notes_durations,
|
| 29 |
-
input_output_as_solo_piano,
|
| 30 |
-
input_remove_drums,
|
| 31 |
-
input_output_tempo,
|
| 32 |
-
input_transform,
|
| 33 |
-
input_transpose_to_C4,
|
| 34 |
-
input_transpose_value
|
| 35 |
):
|
| 36 |
|
| 37 |
print('=' * 70)
|
| 38 |
print('Req start time: {:%Y-%m-%d %H:%M:%S}'.format(datetime.datetime.now(PDT)))
|
| 39 |
start_time = reqtime.time()
|
| 40 |
|
| 41 |
-
print('=' * 70)
|
| 42 |
-
|
| 43 |
-
fn = os.path.basename(input_midi.name)
|
| 44 |
-
fn1 = fn.split('.')[0]
|
| 45 |
-
|
| 46 |
print('-' * 70)
|
| 47 |
print('Requested settings:')
|
| 48 |
print('-' * 70)
|
| 49 |
-
print('
|
| 50 |
-
print('
|
| 51 |
-
print('
|
| 52 |
-
print('Adjust accompaniment notes durations:', input_adjust_accompaniment_notes_durations)
|
| 53 |
-
print('Output as Solo Piano:', input_output_as_solo_piano)
|
| 54 |
-
print('Remove drums:', input_remove_drums)
|
| 55 |
-
print('Output tempo:', input_output_tempo)
|
| 56 |
-
print('Transform:', input_transform)
|
| 57 |
-
print('Transpose to C4:', input_transpose_to_C4)
|
| 58 |
-
print('Transpose value:', input_transpose_value)
|
| 59 |
print('-' * 70)
|
| 60 |
|
| 61 |
#===============================================================================
|
|
|
|
| 22 |
|
| 23 |
# =================================================================================================
|
| 24 |
|
| 25 |
+
def Generate_Melody(input_parsons_code,
|
| 26 |
+
input_first_note_duration,
|
| 27 |
+
iinput_first_note_MIDI_pitch,
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 28 |
):
|
| 29 |
|
| 30 |
print('=' * 70)
|
| 31 |
print('Req start time: {:%Y-%m-%d %H:%M:%S}'.format(datetime.datetime.now(PDT)))
|
| 32 |
start_time = reqtime.time()
|
| 33 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 34 |
print('-' * 70)
|
| 35 |
print('Requested settings:')
|
| 36 |
print('-' * 70)
|
| 37 |
+
print('Parsons code:', input_parsons_code)
|
| 38 |
+
print('First note duration:', input_first_note_duration)
|
| 39 |
+
print('First note MIDI pitch:', iinput_first_note_MIDI_pitch)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 40 |
print('-' * 70)
|
| 41 |
|
| 42 |
#===============================================================================
|