scriabin/csv_to_score.py : Minor print() changes.
This commit is contained in:
parent
f9cbe100d7
commit
ad5fa59947
File diff suppressed because one or more lines are too long
@ -223,9 +223,6 @@ def interleave_scriabin( scoreL, noteL, src_label, beg_score_loc, cut_score_loc,
|
|||||||
|
|
||||||
csl_eid = scoreL[csl_index]['eid']
|
csl_eid = scoreL[csl_index]['eid']
|
||||||
|
|
||||||
print("SECS:",secs,csl_eid,cut_score_loc)
|
|
||||||
print(scoreL[ csl_index ])
|
|
||||||
|
|
||||||
|
|
||||||
# offset all events that start on or after csl_index
|
# offset all events that start on or after csl_index
|
||||||
# (this will not shift note-off's/pedal-ups that
|
# (this will not shift note-off's/pedal-ups that
|
||||||
@ -302,8 +299,6 @@ def interleave_scriabin( scoreL, noteL, src_label, beg_score_loc, cut_score_loc,
|
|||||||
# Start location in seconds of the second part of the score.
|
# Start location in seconds of the second part of the score.
|
||||||
esu_secs = scribian_esu_secs( noteL, end_scriabin_uid ) + end_offs_sec
|
esu_secs = scribian_esu_secs( noteL, end_scriabin_uid ) + end_offs_sec
|
||||||
|
|
||||||
print("ESU:",esu_secs)
|
|
||||||
|
|
||||||
# Shift the second part of score to begin at 'esu_secs'
|
# Shift the second part of score to begin at 'esu_secs'
|
||||||
# (while not shifting the end events (note-off/ped-up)
|
# (while not shifting the end events (note-off/ped-up)
|
||||||
# for events which started before the cut)
|
# for events which started before the cut)
|
||||||
@ -419,12 +414,14 @@ def gen_reference( scoreL, out_dir, out_fn ):
|
|||||||
|
|
||||||
with open(out_fn,"w") as f:
|
with open(out_fn,"w") as f:
|
||||||
|
|
||||||
|
meas0 = None
|
||||||
f.write("source meas oloc op secs\n")
|
f.write("source meas oloc op secs\n")
|
||||||
f.write("------ ---- ----- ---- ----------\n")
|
f.write("------ ---- ----- ---- ----------\n")
|
||||||
|
|
||||||
r0 = None
|
r0 = None
|
||||||
for r in scoreL:
|
for r in scoreL:
|
||||||
|
|
||||||
|
|
||||||
if r['opcode']=='ped' or r['oloc']:
|
if r['opcode']=='ped' or r['oloc']:
|
||||||
|
|
||||||
src = r['src']
|
src = r['src']
|
||||||
@ -433,11 +430,14 @@ def gen_reference( scoreL, out_dir, out_fn ):
|
|||||||
label= r['sci_pitch'] if r['opcode']=='non' else _pedal_label(r)
|
label= r['sci_pitch'] if r['opcode']=='non' else _pedal_label(r)
|
||||||
secs = r['sec']
|
secs = r['sec']
|
||||||
|
|
||||||
|
if meas:
|
||||||
|
meas0 = meas
|
||||||
|
|
||||||
s = f"{src:7} {meas:4} {oloc:5} {label:5} {secs}\n"
|
s = f"{src:7} {meas:4} {oloc:5} {label:5} {secs}\n"
|
||||||
f.write(s)
|
f.write(s)
|
||||||
|
|
||||||
if r0 and (r0['src'] == 'gutim' and r['src'] != 'gutim'):
|
if r0 and (r0['src'] == 'gutim' and r['src'] != 'gutim'):
|
||||||
print(r['src'],r['oloc'],meas,end=" ")
|
print(r['src'],'m:',meas0,r['oloc'],end=" ")
|
||||||
|
|
||||||
if r0 and (r0['src'] != 'gutim' and r['src'] == 'gutim'):
|
if r0 and (r0['src'] != 'gutim' and r['src'] == 'gutim'):
|
||||||
print(r0['oloc'])
|
print(r0['oloc'])
|
||||||
|
Loading…
Reference in New Issue
Block a user