asigalov61 commited on
Commit
33d78dd
1 Parent(s): 7bdfa70

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +11 -7
app.py CHANGED
@@ -18,6 +18,7 @@ import math
18
  from tqdm import tqdm
19
 
20
  import TMIDIX
 
21
 
22
  from midi_to_colab_audio import midi_to_colab_audio
23
 
@@ -316,22 +317,25 @@ if __name__ == "__main__":
316
 
317
  soundfont = "SGM-v2.01-YamahaGrand-Guit-Bass-v2.7.sf2"
318
 
319
- print('Loading processed Pitches Chords Progressions dataset data...')
320
  print('=' * 70)
321
- long_tones_chords_dict, all_long_chords_tokens_chunks, all_long_good_chords_chunks = TMIDIX.Tegridy_Any_Pickle_File_Reader('processed_chords_progressions_chunks_data')
322
 
323
  print('=' * 70)
324
- print('Resulting chords dictionary size:', len(long_tones_chords_dict))
325
  print('=' * 70)
326
- print('Loading chords chunks...')
327
 
328
- chunk_size = 4
 
329
 
330
- src_long_chunks = np.array([a[:chunk_size] for a in all_long_chords_tokens_chunks])
 
 
331
 
332
  print('Done!')
333
  print('=' * 70)
334
- print('Total chords chunks count:', len(all_long_good_chords_chunks))
335
  print('=' * 70)
336
 
337
  #===============================================================================
 
18
  from tqdm import tqdm
19
 
20
  import TMIDIX
21
+ import HaystackSearch
22
 
23
  from midi_to_colab_audio import midi_to_colab_audio
24
 
 
317
 
318
  soundfont = "SGM-v2.01-YamahaGrand-Guit-Bass-v2.7.sf2"
319
 
320
+ print('Loading Monster Harmonized Melodies MIDI Dataset...')
321
  print('=' * 70)
322
+ all_chords_chunks = TMIDIX.Tegridy_Any_Pickle_File_Reader('Monster_Harmonized_Melodies_MIDI_Dataset')
323
 
324
  print('=' * 70)
325
+ print('Total number of harmonized melodies:', len(all_chords_chunks))
326
  print('=' * 70)
327
+ print('Loading melodies...')
328
 
329
+ long_mels_chunks_mult = []
330
+ long_chords_chunks_mult = []
331
 
332
+ for c in tqdm(all_chords_chunks):
333
+ long_mels_chunks_mult.append([p % 12 for p in c[0]])
334
+ long_chords_chunks_mult.append(c[1])
335
 
336
  print('Done!')
337
  print('=' * 70)
338
+ print('Total loaded melodies count:', len(long_mels_chunks_mult))
339
  print('=' * 70)
340
 
341
  #===============================================================================