Upload TMIDIX.py
Browse files
TMIDIX.py
CHANGED
|
@@ -8572,14 +8572,16 @@ def escore_notes_lrno_pattern(escore_notes, mode='chords'):
|
|
| 8572 |
chords_toks.append(token)
|
| 8573 |
chords_idxs.append(i)
|
| 8574 |
|
| 8575 |
-
|
| 8576 |
|
| 8577 |
-
if
|
|
|
|
|
|
|
| 8578 |
|
| 8579 |
start_idx = chords_idxs[find_pattern_start_indexes(chords_toks, lrno_pattern)[0]]
|
| 8580 |
end_idx = chords_idxs[start_idx + len(lrno_pattern)]
|
| 8581 |
|
| 8582 |
-
return recalculate_score_timings(flatten(
|
| 8583 |
|
| 8584 |
else:
|
| 8585 |
return None
|
|
|
|
| 8572 |
chords_toks.append(token)
|
| 8573 |
chords_idxs.append(i)
|
| 8574 |
|
| 8575 |
+
lrno_pats = find_lrno_patterns(chords_toks)
|
| 8576 |
|
| 8577 |
+
if lrno_pats:
|
| 8578 |
+
|
| 8579 |
+
lrno_pattern = list(lrno_pats[0][2])
|
| 8580 |
|
| 8581 |
start_idx = chords_idxs[find_pattern_start_indexes(chords_toks, lrno_pattern)[0]]
|
| 8582 |
end_idx = chords_idxs[start_idx + len(lrno_pattern)]
|
| 8583 |
|
| 8584 |
+
return recalculate_score_timings(flatten(cscore[start_idx:end_idx]))
|
| 8585 |
|
| 8586 |
else:
|
| 8587 |
return None
|