INNER CODE UNIT · Python
not_too_high
microsoft/muzic · musicagent/auxiliary/muzic/roc/main.py:103
def not_too_high(bar):
notes = bar.split(' ')[:-1][3::5]
notes = [int(x[6:]) for x in notes]
for i in notes:
if 57 > i or i > 66:
return False
return True
tmp = []
for bar in candidates_bars:
if not_too_high(bar[0]):
tmp.append(bar)
return tmp
else:
last_note = int(last_bar.split(' ')[-3][6:])
# tendency
selected_bars = []
prefer_note = None