csv_to_score.py : UPdated 20240522

This commit is contained in:
kevin 2024-05-22 17:53:49 -04:00
parent d7539559b7
commit f1f784866a

View File

@ -30,12 +30,12 @@ def invert_velocity( d1 ):
if d1 == 0:
return 0
d1 = max(1,int(d1/6))
d1 = max(1,int(d1/5))
for i,v in enumerate(tbl):
if d1 <= v:
return i
if d1 < v:
return max(0,i-1)
return len(tbl)-1
@ -475,7 +475,7 @@ if __name__ == "__main__":
out_dir= "data/score_scriabin/20240428"
in_preset_fn = "preset_select/m1_458_trans_5.txt"
out_preset_fn = "preset_select/m1_458_trans_5_scriabin_2.txt"
out_preset_fn = "preset_select/m1_458_trans_5_scriabin_4.txt"
score_fn = os.path.join(base_dir, score_fn)
out_dir = os.path.join(base_dir, out_dir)
@ -649,6 +649,7 @@ if __name__ == "__main__":
scoreL = insert_scriabin( scoreL, noteL, f['src'], f['insert_loc'], f['after_fl'], f['delta_sec'] )
if 1:
assign_loc(scoreL)
olocMapD = assign_oloc(scoreL)