asigalov61 commited on
Commit
f63089f
1 Parent(s): 510fa10

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +36 -0
app.py CHANGED
@@ -128,6 +128,42 @@ def Generate_Chords_Progression(total_song_length_in_chords_chunks,
128
  print('Done!')
129
  print('=' * 70)
130
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
131
  #========================================================
132
 
133
  print('-' * 70)
 
128
  print('Done!')
129
  print('=' * 70)
130
 
131
+ #===============================================================================
132
+ print('Rendering results...')
133
+
134
+ print('=' * 70)
135
+
136
+ fn1 = "Melody2Song-Seq2Seq-Music-Transformer-Composition"
137
+
138
+ detailed_stats = TMIDIX.Tegridy_ms_SONG_to_MIDI_Converter(song_f,
139
+ output_signature = 'Melody2Song Seq2Seq Music Transformer',
140
+ output_file_name = fn1,
141
+ track_name='Project Los Angeles',
142
+ list_of_MIDI_patches=patches
143
+ )
144
+
145
+ new_fn = fn1+'.mid'
146
+
147
+
148
+ audio = midi_to_colab_audio(new_fn,
149
+ soundfont_path=soundfont,
150
+ sample_rate=16000,
151
+ volume_scale=10,
152
+ output_for_gradio=True
153
+ )
154
+
155
+ print('Done!')
156
+ print('=' * 70)
157
+
158
+ #========================================================
159
+
160
+ output_midi_title = str(fn1)
161
+ output_midi_summary = str(song_f[:3])
162
+ output_midi = str(new_fn)
163
+ output_audio = (16000, audio)
164
+
165
+ output_plot = TMIDIX.plot_ms_SONG(song_f, plot_title=output_midi, return_plt=True)
166
+
167
  #========================================================
168
 
169
  print('-' * 70)