Lines Matching +defs:line +defs:width

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
95 function syntax(sev,msg,a1,a2,a3,a4){var s={fname:parse.fname,istart:parse.istart+parse.line.index}
1605 if(!s2){error(1,s1,"No end of tuplet in this music line")
2238 output+='<path class="stroke" stroke-width="1" d="M'+
2868 img.rm=0;img.width=cfmt.pagewidth-2*cfmt.printmargin
2869 if(img.width-img.lm-img.rm<100){error(0,undefined,"Bad staff width");img.width=img.lm+img.rm+150}
3215 if(eol==bol){if(parse.state==1){parse.istart=bol;syntax(1,"Empty line in tune header - ignored")}else if(parse.state>=2){end_tune()
3221 parse.istart=parse.bol=bol;parse.iend=eol;parse.line.index=0;line0=file[bol];line1=file[bol+1]
3287 parse.line.buffer=uncomment(file.slice(bol,eol))
3288 if(parse.line.buffer)
3351 parse.line.buffer=text
3696 case C.SPACE:xx=s.width/2;s.wr=xx
3793 default:error(2,s,"set_width - Cannot set width for symbol $1",s.type)
5343 case"sep":set_page();vskip(s.sk1);output+='<path class="stroke"\n\td="M';out_sxsy((img.width-s.l)/2-img.lm,' ',0)
5435 Abc.prototype.set_sym_glue=function(width){var s,g,ll,some_grace,spf,xmin=0,xx=0,x=0,xs=0,xse=0
5443 if(xmin>=width){if(xmin>width)
5444 error(1,s,"Line too much shrunk $1 $2 $3",xmin.toFixed(1),xx.toFixed(1),width.toFixed(1));x=0
5447 spf_last=0}else if((ll&&xx+xs>width*(1-cfmt.stretchlast))||(!ll&&(xx+xs>width||cfmt.stretchstaff))){if(xx==xse)
5449 for(var cnt=4;--cnt>=0;){spf=(width-xs-xse)/(xx-xse);xx=0;xse=0;x=0
5452 if(Math.abs(x-width)<0.1)
5454 spf_last=spf}else{spf=(width-xs-xse)/xx
5507 if(cfmt.singleline){v=get_ck_width();lwidth=indent+v[0]+v[1]+get_width(tsfirst,null)[0];img.width=lwidth*cfmt.scale+img.lm+img.rm+2}else{lwidth=get_lwidth();cut_tune(lwidth,indent)}
6015 default:syntax(0,"'$1:' line ignored",info_type)
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}
6050 bar_type=line.char()
6051 while(1){c=line.next_char()
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}
6066 if(bar_type.slice(-1)=='['&&!(/[0-9" ]/.test(c))){bar_type=bar_type.slice(0,-1);line.index--;c='['}
6070 while(1){c=line.next_char()
6075 while(1){c=line.next_char()
6078 if(c=='"'){line.index++
6087 s.iend=parse.bol+line.index
6202 function parse_dur(line){var res,num,den;reg_dur.lastIndex=line.index;res=reg_dur.exec(line.buffer)
6206 den*=1<<res[2].length;line.index=reg_dur.lastIndex
6208 function parse_acc_pit(line){var note,acc,pit,d,nd,c=line.char()
6209 switch(c){case'^':c=line.next_char()
6210 if(c=='^'){acc=2;c=line.next_char()}else{acc=1}
6212 case'=':acc=3;c=line.next_char()
6214 case'_':c=line.next_char()
6215 if(c=='_'){acc=-2;c=line.next_char()}else{acc=-1}
6217 if(acc==1||acc==-1){if((c>='1'&&c<='9')||c=='/'){nd=parse_dur(line);if(acc<0)
6222 c=line.char()}}
6223 pit=ntb.indexOf(c)+16;c=line.next_char()
6224 if(pit<16){syntax(1,"'$1' is not a note",line.buffer[line.index-1])
6226 while(c=="'"){pit+=7;c=line.next_char()}
6227 while(c==','){pit-=7;c=line.next_char()}
6250 function parse_basic_note(line,ulen){var nd,note=parse_acc_pit(line)
6253 if(line.char()=='0'){parse.stemless=true;line.index++}
6254 nd=parse_dur(line);note.dur=ulen*nd[0]/nd[1]
6256 function parse_vpos(){var line=parse.line,ty=0
6257 if(line.buffer[line.index-1]=='.'&&!a_dcn)
6259 switch(line.next_char()){case"'":line.index++
6261 case",":line.index++
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
6333 s.istart=parse.bol+line.index
6341 c=line.char()
6343 case'Z':s.type=C.MREST;c=line.next_char()
6344 s.nmes=(c>'0'&&c<='9')?line.get_int():1;s.dur=curvoice.wmeasure*s.nmes
6349 case'y':s.type=C.SPACE;s.invis=true;s.dur=0;c=line.next_char()
6351 s.width=line.get_int()
6353 s.width=10
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}]
6360 case'[':in_chord=true;c=line.next_char()
6369 switch(type[0]){case'(':sl1.push(parse_vpos());c=line.char()
6374 while(1){c=line.next_char()
6381 c=line.next_char()
6384 note=parse_basic_note(line,s.grace?C.BLEN/4:curvoice.ulen<0?C.BLEN:curvoice.ulen)
6411 c=line.char()
6414 c=line.next_char()
6422 c=line.char()
6424 case'.':c=line.next_char()
6429 if(c==']'){line.index++;nd=parse_dur(line);s.nhd=s.notes.length-1
6465 c=line.char()
6478 c=line.char()
6482 c=line.next_char()
6484 case'.':if(line.buffer[line.index+1]!='-')
6486 c=line.next_char()
6507 s.iend=parse.bol+line.index
6522 function parse_music_line(){var grace,last_note_sav,a_dcn_sav,no_eol,s,tps,tp=[],tpn=-1,sls=[],line=parse.line
6524 for(i=1,j=line.index+1;i<m.length;i++,j++){if(m[i]==line.buffer[j])
6528 b=ntb.indexOf(line.buffer[j])
6531 while(line.buffer[j+1]=="'"){b+=7;j++}
6532 while(line.buffer[j+1]==','){b-=7;j++}}
6533 line.index=j
6543 function parse_mac(k,m,b){var te,ti,curv,s,line_sav=line,istart_sav=parse.istart;parse.line=line=new scanBuf;parse.istart+=line_sav.index;if(cfmt.writefields.indexOf('m')<0){line.buffer=k.replace('n',n2n(b))
6558 parse.line=line=new scanBuf
6560 line.buffer=b?expand(m,b):m
6568 curvoice=curv}else{line.buffer=b?expand(m,b):m;parse_seq(true)}
6569 parse.line=line=line_sav
6572 while(1){c=line.char()
6575 if(curvoice.ignore){while(1){if(c=='['&&line.buffer[line.index+1]=='V'&&line.buffer[line.index+2]==':')
6577 c=line.next_char()
6580 if(c=='.'){switch(line.buffer[line.index+1]){case'(':case'-':case'|':c=line.next_char()
6585 if(k.indexOf('n')<0){if(line.buffer.indexOf(k,line.index)
6586 !=line.index)
6588 line.index+=k.length}else{n=check_mac(k)
6598 line.index++
6613 c=line.next_char()
6618 case'(':c=line.next_char()
6621 var pplet=line.get_int(),qplet=qplet_tb[pplet],rplet=pplet,c=line.char()
6622 if(c==':'){c=line.next_char()
6623 if(c>'0'&&c<='9'){qplet=line.get_int();c=line.char()}
6624 if(c==':'){c=line.next_char()
6625 if(c>'0'&&c<='9'){rplet=line.get_int();c=line.char()}else{syntax(1,"Invalid 'r' in tuplet")
6636 line.index--;sls.push(parse_vpos())
6652 if(type.length>1){dcn=type.slice(1,-1)}else{dcn="";i=line.index
6653 while(1){c=line.next_char()
6659 if(!c){line.index=i;syntax(1,"No end of decoration")
6669 var c_next=line.buffer[line.index+1]
6674 if(line.buffer[line.index+2]==':'){if(grace){syntax(1,errs.bad_grace)
6676 i=line.buffer.indexOf(']',line.index+1)
6679 text=line.buffer.slice(line.index+3,i).trim()
6680 parse.istart=parse.bol+line.index;parse.iend=parse.bol+ ++i;line.index=0;do_info(c_next,text);line.index=i
6712 while(c=='<'||c=='>'){n*=2;c=line.next_char()}
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}
6722 sym_link(grace);c=line.next_char()
6728 new_bar(line.buffer[line.index-1]=='.')
6739 case"\\":if(!line.buffer[line.index+1]){no_eol=true
6743 line.index++}}
6897 function get_lwidth(){return(img.width-img.lm-img.rm
7162 \n.bW{stroke:currentColor;fill:none;stroke-width:1}\
7163 \n.bthW{stroke:currentColor;fill:none;stroke-width:3}\
7164 \n.slW{stroke:currentColor;fill:none;stroke-width:.7}\
7165 \n.slthW{stroke:currentColor;fill:none;stroke-width:1.5}\
7166 \n.sW{stroke:currentColor;fill:none;stroke-width:.7}\
7167 \n.box{outline: 1px solid black;outline-offset: 1px}',font_style='',posx=cfmt.leftmargin/cfmt.scale,posy=0,img={width:cfmt.pagewidth,lm:cfmt.leftmargin,rm:cfmt.rightmargin},defined_glyph={},defs='',fulldefs='',stv_g={scale:1,dy:0,st:-1,v:-1,g:0},blkdiv=0
7362 n=0;x+=(w-d*n-5)/2;out_XYAB('<path class="stroke" stroke-width="1.2"\n\
7400 function out_wln(x,y,w){out_XYAB('<path class="stroke" stroke-width="0.8" d="mX YhF"/>\n',x,y+3,w)}
7461 function out_gliss(x2,y2,de){var de1=de.start,x1=de1.x,y1=de1.y+staff_tb[de1.st].y,ar=-Math.atan2(y2-y1,x2-x1),a=ar/Math.PI*180,len=(x2-x1)/Math.cos(ar);g_open(x1,y1,a);x1=de1.s.dots?13+de1.s.xmx:8;len-=x1+8;xypath(x1,0);output+='h'+len.toFixed(1)+'" stroke-width="1"/>\n';g_close()}
7536 output+='" width="'+(s.tempo_wh[0]+2).toFixed(1)+'" height="'+bh.toFixed(1)+'"/>\n'}
7548 head+='black"';head+=' stroke-width=".7"'
7553 if(user.imagesize){head+=user.imagesize+' viewBox="0 0 '+img.width.toFixed(0)+' '+
7554 posy.toFixed(0)+'">\n'}else{head+=' width="'+img.width.toFixed(0)+'px" height="'+posy.toFixed(0)+'px">\n'}
7999 case"sep":var h2,len,values,lwidth;set_page();lwidth=img.width-img.lm-img.rm;h1=h2=len=0
8289 function get_vover(type){var p_voice2,p_voice3,range,s,time,v,v2,v3,line=parse.line
8395 parse.line=Object.create(parse_sav.line)
8449 if(!s){syntax(1,"+: symbol line without music")
8462 if(!s){syntax(1,"Not enough measure bars for symbol line")
8481 if(!s){syntax(1,"Too many elements in symbol line")
8514 if(!s){syntax(1,"Not enough measure bars for lyric line")
8542 if(!s){syntax(1,"Too many words in lyric line")
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
8716 istart=parse.bol+line.index
8717 if(type.length>1){text=type.slice(1,-1);iend=istart+1}else{i=++line.index
8718 while(1){j=line.buffer.indexOf('"',i)
8721 if(line.buffer[j-1]!='\\')
8724 text=cnv_escape(line.buffer.slice(line.index,j))
8725 line.index=j
8726 iend=parse.bol+line.index+1}