diff --git a/docs/TMIDIX.html b/docs/TMIDIX.html index 0c094c2..0518dae 100644 --- a/docs/TMIDIX.html +++ b/docs/TMIDIX.html @@ -1136,6 +1136,7 @@
def all_consequtive(
list_of_values)
+def all_consequtive(list_of_values): + return all(b > a for a, b in zip(list_of_values[:-1], list_of_values[1:])) +
def analyze_score_pitches(
score, channels_to_analyze=[0])
@@ -16720,7 +16753,7 @@def escore_notes_to_parsons_code(
escore_notes, times_index=1, pitches_index=4)
+def escore_notes_to_parsons_code(
escore_notes, times_index=1, pitches_index=4, return_as_list=False)
def escore_notes_to_parsons_code(escore_notes, times_index=1, - pitches_index=4 + pitches_index=4, + return_as_list=False ): - parsons = "" + parsons = "*" + parsons_list = [] prev = ['note', -1, -1, -1, -1, -1, -1] for e in escore_notes: if e[times_index] != prev[times_index]: - if parsons == "": - parsons += "*" - - elif e[pitches_index] > prev[pitches_index]: + if e[pitches_index] > prev[pitches_index]: parsons += "U" + parsons_list.append(1) elif e[pitches_index] < prev[pitches_index]: parsons += "D" + parsons_list.append(-1) elif e[pitches_index] == prev[pitches_index]: parsons += "R" + parsons_list.append(0) prev = e - return parsons + if return_as_list: + return parsons_list + + else: + return parsons