asigalov61
commited on
Commit
•
33d78dd
1
Parent(s):
7bdfa70
Update app.py
Browse files
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
|
320 |
print('=' * 70)
|
321 |
-
|
322 |
|
323 |
print('=' * 70)
|
324 |
-
print('
|
325 |
print('=' * 70)
|
326 |
-
print('Loading
|
327 |
|
328 |
-
|
|
|
329 |
|
330 |
-
|
|
|
|
|
331 |
|
332 |
print('Done!')
|
333 |
print('=' * 70)
|
334 |
-
print('Total
|
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 |
#===============================================================================
|