asigalov61 commited on
Commit
c2da618
1 Parent(s): cc4635d

Upload TMIDIX.py

Browse files
Files changed (1) hide show
  1. TMIDIX.py +2 -1
TMIDIX.py CHANGED
@@ -5293,7 +5293,8 @@ def add_melody_to_enhanced_score_notes(enhanced_score_notes,
5293
  e[4] = (melody_base_octave * 12) + smoothed[i]
5294
 
5295
  for i, m in enumerate(smoothed_melody[1:]):
5296
- smoothed_melody[i][2] = min(melody_notes_max_duration, m[1] - smoothed_melody[i][1] - 1)
 
5297
 
5298
  adjust_score_velocities(smoothed_melody, melody_max_velocity)
5299
 
 
5293
  e[4] = (melody_base_octave * 12) + smoothed[i]
5294
 
5295
  for i, m in enumerate(smoothed_melody[1:]):
5296
+ if m[1] - smoothed_melody[i][1]-1 < melody_notes_max_duration:
5297
+ smoothed_melody[i][2] = m[1] - smoothed_melody[i][1] - 1
5298
 
5299
  adjust_score_velocities(smoothed_melody, melody_max_velocity)
5300