asigalov61 commited on
Commit
19b530f
1 Parent(s): f63089f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +14 -35
app.py CHANGED
@@ -34,47 +34,24 @@ def Generate_Chords_Progression(total_song_length_in_chords_chunks,
34
  start_time = reqtime.time()
35
 
36
  print('=' * 70)
37
-
38
- print('=' * 70)
39
- print('Ultimate MIDI Classifier')
 
 
 
 
40
  print('=' * 70)
41
 
42
- print('Input MIDI file name:', fn)
43
-
44
- print('=' * 70)
45
-
46
- print('Done!')
47
- print('=' * 70)
48
-
49
- classification_summary_string = '=' * 70
50
- classification_summary_string += '\n'
51
-
52
- samples_overlap = 340 - chunk_size // input_sampling_resolution // 3
53
-
54
- print('Composition has', notes_counter, 'notes')
55
- print('=' * 70)
56
- print('Composition was split into' , len(input_data), 'samples', 'of 340 notes each with', samples_overlap, 'notes overlap')
57
- print('=' * 70)
58
- print('Number of notes in all composition samples:', len(input_data) * 340)
59
- print('=' * 70)
60
-
61
- classification_summary_string += 'Composition has ' + str(notes_counter) + ' notes\n'
62
- classification_summary_string += '=' * 70
63
- classification_summary_string += '\n'
64
- classification_summary_string += 'Composition was split into ' + 'samples of 340 notes each with ' + str(samples_overlap) + ' notes overlap\n'
65
- classification_summary_string += 'Number of notes in all composition samples: ' + str(len(input_data) * 340) + '\n'
66
- classification_summary_string += '=' * 70
67
- classification_summary_string += '\n'
68
 
69
  #==================================================================
70
 
71
  print('=' * 70)
72
- print('Ultimate MIDI Classifier')
73
- print('=' * 70)
74
-
75
- print('=' * 70)
76
- print('Done!')
77
  print('=' * 70)
 
78
 
79
  result_toks = [final_result[0]-512, final_result[1]-512]
80
  mc_song_artist = song_artist_tokens_to_song_artist(result_toks)
@@ -183,8 +160,10 @@ if __name__ == "__main__":
183
  print('App start time: {:%Y-%m-%d %H:%M:%S}'.format(datetime.datetime.now(PDT)))
184
  print('=' * 70)
185
 
 
 
186
  print('=' * 70)
187
- print('Loading Ultimate MIDI Classifier labels...')
188
  print('=' * 70)
189
  good_chords_chunks = TMIDIX.Tegridy_Any_Pickle_File_Reader('pitches_chords_progressions_5_3_15')
190
 
 
34
  start_time = reqtime.time()
35
 
36
  print('=' * 70)
37
+ print('Requested settings:')
38
+ print('Total song length in chords chunks:', total_song_length_in_chords_chunks)
39
+ print('Chords chunks memory length:', chords_chunks_memory_length)
40
+ print('Chord time step:', chord_time_step)
41
+ print('Melody MIDI patch number:', melody_MIDI_patch_number)
42
+ print('Chords progression MIDI patch number:', chords_progression_MIDI_patch_number)
43
+ print('Base MIDI patch number:', base_MIDI_patch_number)
44
  print('=' * 70)
45
 
46
+ chords_progression_summary_string = '=' * 70
47
+ chords_progression_summary_string += '\n'
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
48
 
49
  #==================================================================
50
 
51
  print('=' * 70)
52
+ print('Pitches Chords Progressions Generator')
 
 
 
 
53
  print('=' * 70)
54
+
55
 
56
  result_toks = [final_result[0]-512, final_result[1]-512]
57
  mc_song_artist = song_artist_tokens_to_song_artist(result_toks)
 
160
  print('App start time: {:%Y-%m-%d %H:%M:%S}'.format(datetime.datetime.now(PDT)))
161
  print('=' * 70)
162
 
163
+ soundfont = "SGM-v2.01-YamahaGrand-Guit-Bass-v2.7.sf2"
164
+
165
  print('=' * 70)
166
+ print('Loading Pitches Chords Progressions dataset...')
167
  print('=' * 70)
168
  good_chords_chunks = TMIDIX.Tegridy_Any_Pickle_File_Reader('pitches_chords_progressions_5_3_15')
169