asigalov61 commited on
Commit
c7f5e17
·
verified ·
1 Parent(s): 12a60b3

Upload TMIDIX.py

Browse files
Files changed (1) hide show
  1. TMIDIX.py +4 -2
TMIDIX.py CHANGED
@@ -9617,10 +9617,12 @@ def escore_notes_to_text_description(escore_notes, song_name='', artist_name='')
9617
  mood = 'Major'
9618
 
9619
  most_common_tones_chords = [check_and_fix_tones_chord(list(c[0])) for c in tones_chords.most_common(10)]
 
 
9620
 
9621
- mood_scale = statistics.mode(tones_chords_to_types(most_common_tones_chords, return_chord_type_index=True)) % 3
9622
 
9623
- mood = MOOD_SCALES[mood_scale]
9624
 
9625
  #==============================================================================
9626
 
 
9617
  mood = 'Major'
9618
 
9619
  most_common_tones_chords = [check_and_fix_tones_chord(list(c[0])) for c in tones_chords.most_common(10)]
9620
+
9621
+ if most_common_tones_chords
9622
 
9623
+ mood_scale = statistics.mode(tones_chords_to_types(most_common_tones_chords, return_chord_type_index=True)) % 3
9624
 
9625
+ mood = MOOD_SCALES[mood_scale]
9626
 
9627
  #==============================================================================
9628