asigalov61
commited on
Commit
•
cfd62d1
1
Parent(s):
3413af1
Upload TMIDIX.py
Browse files
TMIDIX.py
CHANGED
@@ -4749,14 +4749,15 @@ def augment_enhanced_score_notes(enhanced_score_notes,
|
|
4749 |
if legacy_timings:
|
4750 |
abs_time = int(e[1] / timings_divider) + timings_shift
|
4751 |
|
|
|
|
|
|
|
4752 |
e[1] = max(0, abs_time + timings_shift)
|
4753 |
|
4754 |
e[2] = max(1, int(e[2] / timings_divider)) + timings_shift
|
4755 |
|
4756 |
e[4] = max(1, min(127, e[4] + pitch_shift))
|
4757 |
|
4758 |
-
abs_time += dtime
|
4759 |
-
|
4760 |
pe = enhanced_score_notes[i]
|
4761 |
|
4762 |
if full_sorting:
|
@@ -8364,6 +8365,18 @@ def escore_notes_delta_times(escore_notes,
|
|
8364 |
|
8365 |
return dtimes
|
8366 |
|
8367 |
-
|
|
|
|
|
|
|
8368 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8369 |
###################################################################################
|
|
|
4749 |
if legacy_timings:
|
4750 |
abs_time = int(e[1] / timings_divider) + timings_shift
|
4751 |
|
4752 |
+
else:
|
4753 |
+
abs_time += dtime
|
4754 |
+
|
4755 |
e[1] = max(0, abs_time + timings_shift)
|
4756 |
|
4757 |
e[2] = max(1, int(e[2] / timings_divider)) + timings_shift
|
4758 |
|
4759 |
e[4] = max(1, min(127, e[4] + pitch_shift))
|
4760 |
|
|
|
|
|
4761 |
pe = enhanced_score_notes[i]
|
4762 |
|
4763 |
if full_sorting:
|
|
|
8365 |
|
8366 |
return dtimes
|
8367 |
|
8368 |
+
###################################################################################
|
8369 |
+
|
8370 |
+
def monophonic_check(escore_notes, times_index=1):
|
8371 |
+
return len(escore_notes) == len(set([e[times_index] for e in escore_notes]))
|
8372 |
|
8373 |
+
###################################################################################
|
8374 |
+
|
8375 |
+
def count_escore_notes_patches(escore_notes, patches_index=6):
|
8376 |
+
return [list(c) for c in Counter([e[patches_index] for e in escore_notes]).most_common()]
|
8377 |
+
|
8378 |
+
###################################################################################
|
8379 |
+
#
|
8380 |
+
# This is the end of the TMIDI X Python module
|
8381 |
+
#
|
8382 |
###################################################################################
|