Lines Matching defs:type

42 var self=this,glovar={meter:{type:C.METER,wmeasure:1,a_meter:[]},},info={},parse={ctx:{},prefix:'%',state:0,ottava:[],line:new scanBuf},tunes=[],psvg
132 if(s.type==C.NOTE){for(m=0;m<=s.nhd;m++){if(s.notes[m].acc){dx=5+s.notes[m].shac}else{dx=6-s.notes[m].shhd
179 if(s.type==C.NOTE)
221 if(s2.type==C.NOTE)
323 switch(dd.func){case 0:if(s.type==C.BAR&&dd.name=="dot"){s.bar_dotted=true
328 case 8:if(s.type!=C.NOTE){error(1,s,errs.must_note,dd.name)
348 case 33:if(s.type!=C.BAR){error(1,s,"!beamon! must be on a bar")
352 case 34:if(s.type!=C.NOTE||!prev||prev.type!=C.NOTE||s.dur!=prev.dur){error(1,s,"!$1! must be on the last of a couple of notes",dd.name)
358 case 35:if(s.type!=C.NOTE){error(1,s,errs.must_note,dd.name)
361 case 36:if(s.type!=C.NOTE){error(1,s,errs.must_note,dd.name)
370 case 38:if(s.type!=C.NOTE){error(1,s,errs.must_note,dd.name)
374 case 39:if(s.type!=C.NOTE){error(1,s,errs.must_note,dd.name)
417 if(wl!=0&&s.prev&&s.prev.type==C.BAR)
489 if(s.type==C.BAR)
545 for(s=tsfirst;s;s=s.ts_next){switch(s.type){case C.CLEF:case C.KEY:case C.METER:continue}
549 for(;s;s=s.ts_next){switch(s.type){case C.BAR:case C.MREST:case C.NOTE:case C.REST:case C.SPACE:break
562 for(s=p_voice.sym;s;s=s.next){if(s.type!=C.BAR)
601 if(s.type!=C.BAR){w=s.rbstop?0:s.x-realwidth+4}else if((s.bar_type.length>1&&s.bar_type!="[]")||s.bar_type=="]"){if(s1.st>0&&!(cur_sy.staves[s1.st-1].flags&STOP_BAR))
610 if(!s.next&&!s.rbstop&&!p_voice.bar_start){p_voice.bar_start=clone(s);p_voice.bar_start.type=C.BAR;p_voice.bar_start.bar_type=""
660 y=staff_tb[st].topbar+14;xy_str(0,y,bar_num.toString());y_set(st,true,0,20,y+gene.curfont.size+2)}else if(bar_num%cfmt.measurenb==0){for(;;s=s.ts_next){switch(s.type){case C.CLEF:case C.KEY:case C.METER:case C.STBRK:continue}
662 if(s.type!=C.BAR||!s.bar_num){if(s.prev)
675 for(;s;s=s.ts_next){switch(s.type){case C.STAVES:sy=s.sy
697 if(s.next.type==C.NOTE){if(s.next.stem>0){if(y<s.next.ys-gene.curfont.size)
709 for(s=tsfirst;s;s=s.ts_next){if(s.type!=C.TEMPO||s.invis)
724 for(s=some_tempo;s;s=s.ts_next){if(s.type!=C.TEMPO||s.invis)
728 while(s.ts_next&&s.ts_next.type==C.TEMPO)
731 for(s=tsfirst;s;s=s.ts_next){if(s.type!=C.PART||s.invis)
741 for(s=some_part;s;s=s.ts_next){if(s.type!=C.PART||s.invis)
745 while(s.ts_next&&s.ts_next.type==C.PART)
781 for(s2=s1;;s2=s2.next){if(s2.type==C.NOTE){if(s2.nflags>nflags)
791 if(!s2.next){for(;;s2=s2.prev){if(s2.type==C.NOTE)
809 for(s=s1;;s=s.next){if(s.type!=C.NOTE)
835 while(s.ts_prev&&s.ts_prev.type==C.NOTE&&s.ts_prev.time==s.time&&s.ts_prev.x>s1.xs)
837 for(;s&&s.time<=s2.time;s=s.ts_next){if(s.type!=C.NOTE||s.invis||(s.st!=st&&s.v!=v)){continue}
872 for(s=s1.next;;s=s.next){switch(s.type){case C.REST:g=s.ts_next
873 if(!g||g.st!=st||(g.type!=C.NOTE&&g.type!=C.REST))
903 for(s=s1;;s=s.next){switch(s.type){case C.NOTE:s.ys=a*s.xs+b-staff_tb[s.st].y
942 for(s=s1;;s=s.next){if(s.type==C.NOTE&&s.stem!=beam_dir)
956 for(s=s1;;s=s.next){if(s.type!=C.NOTE||s.nflags<i){if(s==s2)
967 if(k.type==C.NOTE||k.type==C.REST){if(k.trem1){if(k.nflags-k.ntrem<i)
973 while(k2.type!=C.NOTE)
976 while(k.type!=C.NOTE)
979 while(k1.type!=C.NOTE)
1211 if(s.p_v.ckey.k_bagpipe||!cfmt.graceslurs||slur||s.tie_s||!s.next||s.next.type!=C.NOTE)
1260 p=p.slice(i+1)}}else if(s.type==C.CUSTOS){p="custos"}else{switch(head){case C.OVAL:p="HD"
1266 if(!tsnext&&s.next&&s.next.type==C.BAR&&!s.next.next)
1326 while(s.type!=C.CLEF)
1328 if(s.next&&s.next.type==C.KEY)
1330 if(s.next&&s.next.type==C.METER)
1344 for(s=k1;;s=s.next){if(s.type==C.NOTE){if(!s.stemless){if(s.stem<0)
1390 if(k.type==C.NOTE||k.type==C.REST){nn++
1401 if(k1.type==C.NOTE){if(dir>0){if(k1.stem>0){x1+=5
1406 if(k2.type==C.NOTE){if(dir>0){if(k2.stem>0){x2+=1
1411 if(k1.type!=C.NOTE){y1=y2+1.2*dir;x1=k1.x+k1.wr*.5
1414 if(k2.type!=C.NOTE){if(k1.type==C.NOTE)
1421 if(k.type!=C.BAR&&k.x<x1+48){if(dir>0){y=k.ymx-2
1427 if(k.type!=C.BAR&&k.x>x2-48){if(dir>0){y=k.ymx-2
1455 switch(k.type){case C.NOTE:case C.REST:if(dir>0){y=3*(k.notes[k.nhd].pit-18)+6
1566 if(s.type==C.GRACE){gr1=s;s=s.extra
1589 for(s2=s1;s2;s2=s2.next){switch(s2.type){case C.GRACE:for(g=s2.extra;g;g=g.next){if(g.sls||g.sl1)
1609 while(s3.type!=C.NOTE)
1612 if(s1==s2||tp.f[1]==2){nb_only=true}else if(tp.f[1]==1){nb_only=true;draw_slur([s1,s2],null,{ty:dir})}else{if(tp.f[0]!=2&&s1.type==C.NOTE&&s2.type==C.NOTE){nb_only=true
1613 for(s3=s1;;s3=s3.next){if(s3.type!=C.NOTE&&s3.type!=C.REST){if(s3.type==C.GRACE||s3.type==C.SPACE)
1621 if(nb_only&&!s1.beam_st&&!s1.beam_br1&&!s1.beam_br2){for(s3=s1.prev;s3;s3=s3.prev){if(s3.type==C.NOTE||s3.type==C.REST){if(s3.nflags>=s1.nflags)
1624 if(nb_only&&!s2.beam_end){for(s3=s2.next;s3;s3=s3.next){if(s3.type==C.NOTE||s3.type==C.REST){if(!s3.beam_br1&&!s3.beam_br2&&s3.nflags>=s2.nflags)
1762 if(s2.type==C.BAR)
1803 while(k3&&k3.time==time){if(k3.type!=C.NOTE||k3.st!=k1.st){k3=k3.ts_next
1821 function draw_ties_g(s1,s2,job){if(s1.type==C.GRACE){for(var g=s1.extra;g;g=g.next){if(g.tie_s)
1861 if(s.type==C.CLEF){clef_chg=true
1869 draw_ties_g(s1,s2,s2.type==C.NOTE?0:2)}}
1886 for(s=p_voice.sym;s;s=s.next){switch(s.type){case C.GRACE:for(g=s.extra;g;g=g.next){if(g.beam_st&&!g.beam_end){self.calculate_beam(bm,g)
1897 switch(s.type){case C.GRACE:for(g=s.extra;g;g=g.next){y_set(s.st,true,g.x-2,4,g.ymx+1);y_set(s.st,false,g.x-2,4,g.ymn-5)}
2077 if(st!=0&&s.ts_prev&&s.ts_prev.type!=C.BAR)
2083 if(s.bar_mrep==1){for(s2=s.prev;s2.type!=C.REST;s2=s2.prev);xygl(s2.x,yb,"mrep")}else{xygl(x,yb,"mrep2")
2121 switch(s.type){case C.STAVES:staves_bar=s.ts_prev.type==C.BAR?s.ts_prev.x:0
2124 switch(s2.type){case C.BAR:case C.CLEF:case C.KEY:case C.METER:staves_bar=s2.x
2149 for(s2=s.ts_next;s2;s2=s2.ts_next){if(s2.type!=C.STBRK)
2158 x2=s2.type==C.BAR?s2.x:s.x-s.xmx
2172 Abc.prototype.draw_symbols=function(p_voice){var bm={},s,g,x,y,st;for(s=p_voice.sym;s;s=s.next){if(s.invis){switch(s.type){case C.KEY:p_voice.ckey=s
2177 switch(s.type){case C.NOTE:set_scale(s)
2226 default:error(2,s,"draw_symbols - Cannot draw symbol "+s.type)
2329 while(s2&&s2.type!=C.NOTE)
3381 if((dur+1)&dur){if(s.type!=C.REST||dur_o!=s.p_v.wmeasure)
3478 while(s){if(s.type!=C.NOTE||s.invis){s=s.ts_next
3481 for(s2=s;s2;s2=s2.ts_next){if(s2.time!=t||s2.type!=C.NOTE||s2.st!=st)
3505 s.seqst=!s.ts_prev||s.time!=s.ts_prev.time||(w_tb[s.ts_prev.type]!=w_tb[s.type]&&w_tb[s.ts_prev.type]!=0)
3508 next.seqst=next.time!=s.time||(w_tb[s.type]!=w_tb[next.type]&&w_tb[s.type]!=0)
3518 if(s.ts_next){if(s.seqst){if(s.ts_next.seqst){s.ts_next.shrink+=s.shrink;s.ts_next.space+=s.space}else{s.ts_next.seqst=true;s.ts_next.shrink=s.shrink;s.ts_next.space=s.space}}else{if(s.ts_next.seqst&&s.ts_prev&&s.ts_prev.seqst&&!w_tb[s.ts_prev.type]){s.ts_next.seqst=false
3529 if(s.type==C.BAR&&s.prev&&s.prev.type==C.BAR&&s.prev.bar_type[0]!=':')
3557 if(s1.type==C.NOTE)
3568 if(s1.type==C.NOTE)
3584 function set_graceoffs(s){var next,m,dx,x,gspleft=cfmt.gracespace[0],gspinside=cfmt.gracespace[1],gspright=cfmt.gracespace[2],g=s.extra;if(s.prev&&s.prev.type==C.BAR)
3604 if(next&&next.type==C.NOTE){if(g.y>=3*(next.notes[next.nhd].pit-18))
3614 if(ch.type!='g'||ch.y<0)
3616 if(w0){if(w0>x+ch.x){if(s.prev&&s.prev.type==C.BAR)
3622 if(s0==s||s0.type==C.BAR)
3628 switch(gch.type){case'<':w=gch.text.wh[0]+wlnote
3642 switch(s.type){case C.NOTE:case C.REST:s.wr=wlnote=hw_tb[s.head]
3644 s.wr+=s.xmx+4;for(s2=s.prev;s2;s2=s2.prev){if(w_tb[s2.type]!=0)
3646 if(s2){switch(s2.type){case C.BAR:case C.CLEF:case C.KEY:case C.METER:wlnote+=3
3656 if(s2){switch(s2.type){case C.BAR:case C.CLEF:case C.KEY:case C.METER:wlnote-=3
3674 if(s2){switch(s2.type){case C.NOTE:if(s2.stem>0&&s.stem<0){if(wlw<7)
3691 if(s2&&s2.type==C.GRACE)
3712 if(s.next&&s.next.type!=C.METER)
3716 for(s2=s.prev;s2;s2=s2.prev){if(w_tb[s2.type]!=0){if(s2.type==C.GRACE)
3729 if(s.next&&s.next.type==C.BAR)
3785 if(s.next&&s.next.type==C.CLEF){s.wr=2
3793 default:error(2,s,"set_width - Cannot set width for symbol $1",s.type)
3828 if(!len){switch(s.type){case C.MREST:return s.wl}
3830 if(s.ts_prev.type==C.MREST)
3833 while(!s.dur){switch(s.type){case C.BAR:return space*.9-7
3846 if(s.type==C.NOTE&&s.nflags>=-1&&s.stem>0){stemdir=true
3847 for(s2=s.ts_prev;s2&&s2.time==ptime;s2=s2.ts_prev){if(s2.type==C.NOTE&&(s2.nflags<-1||s2.stem>0)){stemdir=false
3849 if(stemdir){for(s2=s.ts_next;s2&&s2.time==s.time;s2=s2.ts_next){if(s2.type==C.NOTE&&(s2.nflags<-1||s2.stem<0)){stemdir=false
3867 function _bar(s){return{type:C.BAR,bar_type:"|",fname:s.fname,istart:s.istart,iend:s.iend,v:s.v,p_v:s.p_v,st:s.st,dur:0,nhd:0,notes:[{pit:s.notes?s.notes[0].pit:22}],prev:s}}
3904 if(!s2.shrink&&!s2.space&&s2.type==C.CLEF){delete s2.seqst;s2.time=tim}
3921 s.type=C.REST
3931 for(s3=s.prev;s3;s3=s3.prev){if(!s3.dur){if(s3.type==C.BAR){error(1,s3,"Bar in repeat sequence")
3939 for(s2=s;s2;s2=s2.next){if(!s2.dur){if(s2.type==C.BAR){error(1,s2,"Bar in repeat sequence")
3946 for(s2=s.prev;s2!=s3;s2=s2.prev){if(s2.type==C.NOTE){s2.beam_end=true
3963 for(s2=s.prev.prev;s2;s2=s2.prev){if(s2.type==C.BAR||s2.time==tsfirst.time){if(--i<=0)
3972 for(s2=s;s2;s2=s2.next){if(s2.type==C.BAR){if(--i<=0)
3985 if(s2.type==C.BAR){if(s2.v==v)
3996 if(s2.type==C.BAR){if(s2.v==v)
4008 if(s2.type==C.BAR){if(s2.v==v)
4020 while(1){if(s2.type==C.NOTE)
4044 for(s=so;;s=s.ts_next){switch(s.type){default:if(w_tb[s.type])
4053 while(1){if(s.type!=C.BAR||s.v>s2.v)
4069 if(s.type!=C.BAR)
4072 for(s2=s;s2;s2=s2.ts_next){switch(s2.type){case C.KEY:if(!cfmt.keywarn||(!s2.k_a_acc&&!s2.k_sf&&!s2.k_old_sf)||s2.k_none||s2.k_play)
4074 for(s1=s.ts_prev;s1;s1=s1.ts_prev){if(s1.type!=C.METER)
4076 case C.METER:if(s2.type==C.METER){if(!cfmt.timewarn)
4081 if(s2.type==C.CLEF){for(s1=s.ts_prev;s1;s1=s1.ts_prev){switch(s1.type){case C.BAR:case C.KEY:case C.METER:continue}
4098 if(w_tb[s2.type])
4102 switch(s.ts_prev.type){case C.STAVES:break
4108 for(s=s.ts_prev;s;s=s.ts_prev){if(s.seqst&&s.type!=C.CLEF)
4111 ptyp=s.type
4114 if(s.type==ptyp)
4116 ptyp=s.type
4119 switch(s.type){case C.STAVES:if(!s.ts_prev)
4121 if(s.ts_prev.type==C.BAR)
4123 while(s.ts_next){if(w_tb[s.ts_next.type]!=0&&s.ts_next.type!=C.CLEF)
4126 if(!s.ts_next||s.ts_next.type!=C.BAR)
4140 default:if(!done||(s.prev&&s.prev.type==C.GRACE))
4165 if(cfmt.keywarn&&next&&next.type==C.KEY&&!last.dur){ws[0]+=next.wr
4177 if(s.type==C.BAR)
4190 if(s.type!=C.BAR)
4250 if(cfmt.barsperstaff){i=cfmt.barsperstaff;for(s2=s;s2;s2=s2.ts_next){if(s2.type!=C.BAR||!s2.bar_num||--i>0)
4252 while(s2.ts_next&&s2.ts_next.type==C.BAR)
4266 function set_yval(s){switch(s.type){case C.CLEF:if(s.second||s.invis){s.ymx=s.ymn=12
4305 switch(s.type){case C.REST:if(voice_tb.length==1)
4319 s.type=C.REST
4338 while(s3&&s3.v<s.v&&s3.type==C.BAR)
4341 if(s3.type==C.BAR)
4376 for(s=tsfirst;s;s=s.ts_next){if(s.type!=C.MREST)
4378 if(!s.seqst&&w_tb[s.ts_prev.type]){s2=s}else{s2=s.ts_next
4379 while(!s2.seqst){if(s2.type!=C.MREST||s2.nmes!=s.nmes)
4382 if(!s2.seqst){while(s.type==C.MREST){mexp(s)
4385 for(s=s_start;s;s=s.ts_next){if(s.type==C.STAVES&&s!=s_start)
4389 if(s.type!=C.NOTE){if(s.type==C.CLEF){if(s.clef_type!='a')
4406 for(s=s_start;s!=s_last;s=s.ts_next){if(s.type==C.STAVES&&s!=s_start)
4408 if(s.st!=st||s.type!=C.NOTE)
4415 if(s2&&s2.time==time&&s2.st==st&&s2.type==C.NOTE&&s2.notes[0].pit>=19)
4418 if(s2&&s2.st==st&&s2.time==time&&s2.type==C.NOTE&&s2.notes[0].pit>=19)
4423 if(s2&&s2.time==time&&s2.st==st&&s2.type==C.NOTE&&s2.notes[0].pit<=13)
4426 if(s2&&s2.st==st&&s2.time==time&&s2.type==C.NOTE&&s2.notes[0].pit<=13)
4433 if(s2.type==C.BAR&&s2.v==s.v){s3=s2.bar_type[0]!=':'?s2:s2.next
4435 if(s2.type!=C.NOTE)
4469 switch(s.type){case C.STAVES:sy=s.sy
4491 if(!staff_clef[st].clef){if(s2.clef_auto){if(s2.type!='a')
4505 if(g.type!=C.CLEF){g=insert_clef(g,new_type,new_line)
4545 switch(s.type){case C.CLEF:staff_delta[st]=delta_tb[s.clef_type]+
4573 if(s.type==C.REST){s.y=(((s.notes[0].pit-18)/2)|0)*6;s.ymx=s.y+rest_sp[5-s.nflags][0];s.ymn=s.y-rest_sp[5-s.nflags][1]}
4583 for(u=s;u;u=u.ts_next){if(u.type==C.BAR)
4584 break;if(u.type==C.STAVES){if(u!=s)
4591 if((u.type!=C.NOTE&&u.type!=C.REST)||u.invis)
4608 if(u.type!=C.NOTE)
4614 if(u.xstem){if(u.ts_prev.st!=st-1||u.ts_prev.type!=C.NOTE){error(1,s,"Bad !xstem!");u.xstem=false}else{u.ts_prev.multi=1;u.multi=1;u.stemless=true}}}
4617 switch(s.type){default:continue
4618 case C.REST:if((s.combine!=undefined&&s.combine<0)||!s.ts_next||s.ts_next.type!=C.REST||s.ts_next.st!=s.st||s.time!=s.ts_next.time||s.dur!=s.ts_next.dur||(s.a_dd&&s.ts_next.a_dd)||(s.a_gch&&s.ts_next.a_gch)||s.invis)
4646 while(s&&s.type==C.BAR)
4651 if(s.type==C.STAVES)
4659 if(s.type!=C.REST)
4723 while(s){switch(s.type){case C.CLEF:case C.KEY:case C.METER:switch(s.type){case C.CLEF:staff_tb[s.st].clef=s
4751 if(last_s.type==C.CLEF)
4771 if(p_voice.sls.length){s={type:C.BAR,fname:last_s.fname,bar_type:"|",dur:0,multi:0,invis:true,sls:p_voice.sls}
4777 switch(s3.type){case C.PART:case C.TEMPO:continue
4786 if(p_voice.last_sym.type==C.BAR){if(!p_voice.last_sym.rbstop)
4808 if(s.type!=C.BAR){s2=_bar(s)
4815 for(s=p_voice.sym;s;s=s.next){if(s.type==C.NOTE){pitch=s.notes[0].pit
4819 switch(s.type){case C.MREST:start_flag=true
4849 if(s.type==C.REST&&s.beam_end&&!s.beam_on){s.beam_end=false;start_flag=true}
4851 if(nflags<=0){s.beam_st=true;s.beam_end=true}else if(s.type==C.NOTE||s.beam_on){s.beam_st=true;start_flag=false}}
4854 if(s.type==C.NOTE||s.beam_on)
4857 if(s.type==C.NOTE){if(s.nhd)
4860 for(s2=s.prev;s2;s2=s2.prev){if(s2.type!=C.REST)
4869 while(s){if(s.type!=C.BAR||!s.rbstart||s.norepbra){s=s.next
4872 for(s=s.next;s;s=s.next){if(s.type!=C.BAR)
4932 for(s=sym;s;s=s.next){if(s.type!=C.NOTE){if(s.type!=C.GRACE)
4943 for(g=s;g;g=g.next){if(g.type!=C.NOTE){continue}
4953 for(g=s.next;g;g=g.next){if(g.type!=C.NOTE){continue}
5114 for(s=tsfirst;s;s=s.ts_next){if(s.type!=C.NOTE||s.invis){if(s.type==C.STAVES)
5124 if(s2.type==C.NOTE&&!s2.invis&&s2.st==s.st)
5146 if(s3&&s3.time==s1.time&&s3.st==s1.st&&s3.type==C.NOTE&&!s3.invis){right3=set_right(s3)
5251 for(s=tsfirst;s;s=s.ts_next){if(s.type!=C.NOTE){if(s.type!=C.GRACE)
5268 for(s2=s.next;;s2=s2.next){if(s2.type==C.NOTE){if(s.feathered_beam)
5305 if(s.st==st&&s.type!=C.CLEF){s.st++;s.invis=true}}}
5380 if(tsfirst.type==C.STAVES){s=tsfirst
5392 switch(s.type){case C.STAVES:set_brace();sy.st_print=new Uint8Array(non_empty);sy=s.sy;while(nstaff<sy.nstaff)
5400 if(st>nstaff){switch(s.type){case C.CLEF:staff_tb[st].clef=s
5410 switch(s.type){default:continue
5419 if(sy.staves[st].staffnonote||s.type==C.NOTE)
5436 for(s=tsfirst;s;s=s.ts_next){if(s.type==C.GRACE&&!some_grace)
5442 ll=!tsnext||(tsnext.type==C.BLOCK&&!tsnext.play)||blocks.length
5461 for(s=some_grace;s;s=s.ts_next){if(s.type!=C.GRACE)
5483 switch(s.type){case C.NOTE:case C.REST:case C.MREST:case C.SPACE:set_page()
5541 function new_clef(clef_def){var s={type:C.CLEF,clef_line:2,clef_type:"t",v:curvoice.v,p_v:curvoice,time:curvoice.time,dur:0},i=1
5637 function new_block(subtype){var s={type:C.BLOCK,subtype:subtype,dur:0}
5780 function new_key(param){var i,clef,key_end,c,tmp,exp,sf="FCGDAEB".indexOf(param[0])-1,mode=0,s={type:C.KEY,dur:0}
5849 function new_meter(p){var s={type:C.METER,dur:0,a_meter:[]},meter={},val,v,m1=0,m2,i=0,j,wmeasure,in_parenth;set_ref(s)
5915 function new_tempo(text){var i,c,d,nd,txt=text,s={type:C.TEMPO,dur:0}
5988 s={type:C.PART,text:text,dur:0}
6012 s={type:C.REMARK,text:text,dur:0}
6019 return;if(s2.type==C.MREST||s2.type==C.BAR)
6021 while(s2.type!=C.BAR&&s2.prev)
6026 if(s2&&s2.type==C.REST&&s2.invis){time+=s2.dur*fac
6039 if(s2.type!=C.NOTE&&s2.type!=C.REST)
6044 function new_bar(dotted){var s2,c,bar_type,line=parse.line,s={type:C.BAR,fname:parse.fname,istart:parse.bol+line.index,dur:0,multi:0}
6062 if(curvoice.cst!=curvoice.st){s2={type:C.SPACE,fname:parse.fname,istart:parse.bol+line.index,dur:0,multi:0,invis:true,width:1}
6105 if(s2&&s2.time==curvoice.time){if(s2&&s2.type==C.BAR){if(bar_type=="["&&!s2.text&&(curvoice.st==0||(par_sy.staves[curvoice.st-1].flags&STOP_BAR)||s.norepbra)){if(s.text)
6135 if(s.rbstart&&!curvoice.norepbra&&curvoice.st>0&&!(par_sy.staves[curvoice.st-1].flags&STOP_BAR)){s2={type:C.BAR,fname:s.fname,istart:s.istart,iend:s.iend,bar_type:"[",multi:0,invis:true,text:s.text,rbstart:2}
6285 for(s=enote.s.prev;s;s=s.prev){if(s.type==C.BAR&&s.bar_type[0]==':'&&s.text){if(!s.sls)
6314 Abc.prototype.new_note=function(grace,sls){var note,s,in_chord,c,dcn,type,tie_s,acc_tie,i,n,s2,nd,res,num,dur,apit,sl1=[],line=parse.line,a_dcn_sav=a_dcn
6318 if(tie_s.type!=C.GRACE){for(i=0;i<=tie_s.nhd;i++){if(!tie_s.notes[i].tie_ty)
6332 a_dcn=null;parse.stemless=false;s={type:C.NOTE,fname:parse.fname,stem:0,multi:0,nhd:0,xmx:0}
6343 case'Z':s.type=C.MREST;c=line.next_char()
6347 if(s.nmes==1){s.type=C.REST;s.dur_orig=s.dur;s.notes=[{pit:18,dur:s.dur}]}else{glovar.mrest_p=true}
6349 case'y':s.type=C.SPACE;s.invis=true;s.dur=0;c=line.next_char()
6358 case'z':s.type=C.REST;line.index++;nd=parse_dur(line);s.dur_orig=((curvoice.ulen<0)?C.BLEN:curvoice.ulen)*nd[0]/nd[1];s.dur=s.dur_orig*curvoice.dur_fact;s.notes=[{pit:18,dur:s.dur_orig}]
6368 type=char_tb[i]
6369 switch(type[0]){case'(':sl1.push(parse_vpos());c=line.char()
6373 if(type.length>1){a_dcn.push(type.slice(1,-1))}else{dcn=""
6440 if(s.grace&&s.type!=C.NOTE){syntax(1,errs.bad_grace)
6442 if(tie_s&&s.type!=C.NOTE){syntax(1,"Bad tie")
6571 function parse_seq(in_mac){var c,idx,type,k,s,dcn,i,n,text,note
6600 type=char_tb[idx]
6601 switch(type[0]){case' ':s=curvoice.last_note
6639 if(s){switch(s.type){case C.SPACE:if(!s.notes){s.notes=[]
6652 if(type.length>1){dcn=type.slice(1,-1)}else{dcn="";i=line.index
6665 parse_gchord(type)
6667 case'[':if(type.length>1){self.do_pscom(type.slice(3,-1))
6718 last_note_sav=curvoice.last_note;curvoice.last_note=null;a_dcn_sav=a_dcn;a_dcn=undefined;grace={type:C.GRACE,fname:parse.fname,istart:parse.bol+line.index,dur:0,multi:0}
7259 var type=s.type,h=s.ymx-s.ymn+4,wl=s.wl||2,wr=s.wr||2
7261 type=C.GRACE
7262 f(t||abc2svg.sym_name[type],s.istart,s.iend,s.x-wl-2,staff_tb[s.st].y+s.ymn+h-2,wl+wr+4,h,s)}
7271 switch(s.type){case C.CLEF:case C.METER:case C.KEY:case C.REST:if(s.type!=C.REST||s.rep_nb){set_sscale(s.st)
7604 function sym_add(p_voice,type){var s={type:type,dur:0},s2,p_voice2=curvoice;curvoice=p_voice;sym_link(s);curvoice=p_voice2;s2=s.prev
7628 fl=!w_tb[prev.type]||tsfirst.type==tsfirst.next
7641 w=w_tb[s.type]
7649 if(!s||s.time!=time||w_tb[s.type]!=wmin)
7651 if(s.type==C.STAVES){new_sy=s.sy;for(ir2=0;ir2<nv;ir2++){if(vn[ir2]==undefined)
7675 if(s&&staves_found<=0){v=par_sy.top_voice;p_voice=voice_tb[v];if(p_voice.sym&&p_voice.sym.type!=C.TEMPO&&(!p_voice.sym.next||p_voice.sym.next.type!=C.TEMPO)){s=clone(s);s.v=v;s.p_v=p_voice;s.st=p_voice.st;s.time=0;s.prev=p_voice.sym
7693 for(;s;s=s.next){switch(s.type){case C.GRACE:if(s.next&&s.next.type==C.BAR)
7697 for(s2=s.next;s2;s2=s2.next){switch(s2.type){case C.SPACE:continue
7704 case C.MREST:if(s.next&&s.next.type!=C.BAR){syntax(1,"Lack of bar after multi-measure rest")
7706 s2.type=C.BAR
7730 switch(s.type){case C.METER:wmeasure=s.wmeasure
7736 for(s2=s.ts_next;s2;s2=s2.ts_next){if(s2.type==C.BAR&&s2.time){if(s2.time<wmeasure){s=s2
7741 switch(s.type){case C.METER:bar_num+=(s.time-bar_tim)/wmeasure
7761 if(cfmt.checkbars&&((k&&!s.bar_dotted&&s.next)||(tim>ptim+wmeasure&&s.prev.type!=C.MREST)))
7860 while(1){if(s.type==C.KEY)
7898 while(s){if(!sk){for(;s;s=s.next){if(s.type==C.KEY&&s.k_transp)
7900 for(;s;s=s.next){switch(s.type){case C.GRACE:for(g=s.extra;g;g=g.next){for(i=0;i<=g.nhd;i++)
7993 if(isNaN(n)||n<1||(curvoice.last_sym.type==C.BAR&&n>2)){syntax(1,"Incorrect 1st value in %%repeat")
7997 parse.repeat_n=curvoice.last_sym.type==C.BAR?n:-n;parse.repeat_k=k
8041 s={type:C.STBRK,dur:0}
8078 for(s=curvoice.last_sym;s;s=s.prev){switch(s.type){case C.NOTE:s=clone(curvoice.okey);s.k_old_sf=curvoice.ckey.k_sf;sym_link(s)
8110 Abc.prototype.do_begin_end=function(type,opt,text){var i,j,action,s
8111 switch(type){case"js":js_inject(text)
8113 case"ml":if(parse.state>=2){s=new_block(type);s.text=text}else{blk_flush()
8138 if(parse.state>=2){s=new_block(type);s.text=text
8185 for(s=s.prev;s;s=s.prev){switch(s.type){case C.BAR:if(s.time<time)
8190 if(s.type==C.NOTE){if(s.time+s.dur==time)
8215 curvoice.time=maxtime;s={type:C.STAVES,dur:0}
8289 function get_vover(type){var p_voice2,p_voice3,range,s,time,v,v2,v3,line=parse.line
8290 if(type=='|'||type==')'){if(!curvoice.last_note){syntax(1,errs.nonote_vo)
8300 if(type=='('){if(vover){syntax(1,"Voice overlay already started")
8317 for(s=curvoice.last_sym;;s=s.prev){if(s.type==C.BAR||s.time<=time)
8323 if(vover.bar){sym_link({type:C.BAR,bar_type:type,dur:0,multi:0})}}
8328 if(w_tb[s.type]!=0)
8335 if(s2&&s2.type==C.BAR&&s2.bar_type[0]!=':'){s.next=s2
8386 p_voice={v:v,id:id,time:0,new:true,pos:{dyn:0,gch:0,gst:0,orn:0,stm:0,voc:0,vol:0},scale:1,ulen:glovar.ulen,dur_fact:1,key:clone(parse.ckey),ckey:clone(parse.ckey),okey:clone(parse.ckey),meter:clone(glovar.meter),wmeasure:glovar.meter.wmeasure,staffnonote:1,clef:{type:C.CLEF,clef_auto:true,clef_type:"a",time:0},acc:[],sls:[],hy_st:0}
8431 function goto_tune(is_K){var v,p_voice,s={type:C.STAVES,dur:0,sy:par_sy}
8460 switch(c){case'|':while(s&&s.type!=C.BAR)
8479 while(s&&(s.type!=C.NOTE||s.grace))
8512 switch(p[i]){case'|':while(s&&s.type!=C.BAR)
8540 while(s&&(s.type!=C.NOTE||s.grace))
8559 if(s.type==C.GRACE){shift=s.wl}else if((p[0]>='0'&&p[0]<='9'&&p.length>2)||p[1]==':'||p[0]=='('||p[0]==')'){if(p[0]=='('){sz=cwid('(')*swfac}else{j=p.indexOf(' ');set_font(ly.font)
8574 for(k=s.next;k;k=k.next){switch(k.type){case C.NOTE:case C.REST:if(!k.a_ly||!k.a_ly[i])
8597 if(s.type!=C.CLEF&&s.type!=C.KEY&&s.type!=C.METER)
8604 if(!ly){switch(s.type){case C.REST:case C.MREST:if(lflag){out_wln(lastx+3,y,x0-lastx);lflag=false;lastx=s.x+s.wr}}
8627 for(p_voice.s_next;s;s=s.next){if(s.type==C.NOTE){if(!s.a_ly)
8710 function parse_gchord(type){var c,text,gch,x_abs,y_abs,type,i,j,istart,iend,ann_font=get_font("annotation"),h_ann=ann_font.size,line=parse.line
8717 if(type.length>1){text=type.slice(1,-1);iend=istart+1}else{i=++line.index
8729 i=0;type='g'
8734 switch(c){case'@':type=c;i++;x_abs=get_float()
8740 case'^':case'_':case'<':case'>':i++;type=c
8742 default:switch(type){case'g':gch.font=get_font("gchord")
8747 gch.type=type
8790 if(gch.type=='g')
8796 if(gch.type=='g'){gch.text=gch.text.replace(/##|#|=|bb|b| /g,function(x){switch(x){case'##':return"&#x1d12a;"
8801 return"&#x1d12b;"})}else{if(gch.type=='@'&&!user.anno_start&&!user.anno_stop){set_font(gch.font)
8808 switch(gch.type){case'@':break
8824 switch(gch.type){case'<':gch.y-=y_left
8829 switch(an.type){case'_':y-=h+pad
8836 case'<':case'>':if(an.type=='<'){if(s.notes[0].acc)
8843 y+=(s.type==C.NOTE?(((s.notes[s.nhd].pit+s.notes[0].pit)>>1)-
8851 case'@':y+=(s.type==C.NOTE?(((s.notes[s.nhd].pit+s.notes[0].pit)>>1)-
8879 if((an.type=='g'&&pos>0)||an.type=='^'){x=s.x+an.x
8884 if(an.type=='g'&&y<minmax[s.st].yup)
8885 y=minmax[s.st].yup}else if((an.type=='g'&&pos<=0)||an.type=='_'){continue}else{x=s.x+an.x
8893 if(!an||!((an.type=='g'&&pos<0)||an.type=='_'))
8900 if(an.type=='g'&&y>minmax[s.st].ydn)
8913 while(--i>=0){if(an[i].type=='g'){an=an[i]