Lines Matching refs:g

82 msg=msg.replace(/\$./g,function(a){switch(a){case'$1':return a1
470 if(stv_g.g)
473 function draw_deco_near(){var s,g
550 case C.GRACE:for(g=s.extra;g;g=g.next)
551 create_all(g)
774 Abc.prototype.calculate_beam=function(bm,s1){var s,s2,g,notes,nflags,st,v,two_staves,two_dir,x,y,ys,a,b,stem_err,max_stem_err,p_min,p_max,s_closest,stem_xoff,scale,visible,dy
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))
888 case C.GRACE:for(g=s.extra;g;g=g.next){y=a*g.x+b
889 if(s1.stem>0){y=g.ymx-y
893 b+=y}else{y=g.ymn-y
1038 <g transform="translate(X,Y)" text-anchor="middle">\n\
1041 </g>\n',x,y+6,m_gl(meter.top),m_gl(meter.bot))}else{out_XYAB('\
1193 function draw_gracenotes(s){var yy,x0,y0,x1,y1,x2,y2,x3,y3,bet1,bet2,slur,dy1,dy2,g,last,note,bm={}
1194 for(g=s.extra;g;g=g.next){if(g.beam_st&&!g.beam_end){if(self.calculate_beam(bm,g))
1196 anno_start(g);draw_note(g,!bm.s2)
1197 if(g==bm.s2)
1200 if(g.sls||g.sl2)
1202 if(!g.next)
1204 if(s.sappo){g=s.extra
1205 if(!g.next){x1=9;y1=g.stem>0?5:-5}else{x1=(g.next.x-g.x)*.5+4;y1=(g.ys+g.next.ys)*.5-g.y
1206 if(g.stem>0)
1210 note=g.notes[g.stem<0?0:g.nhd];out_acciac(x_head(g,note),y_head(g,note),x1,y1,g.stem>0)}
1213 last=g
1214 if(((g.stem>=0||s.multi<0)&&g.notes[0].pit<=28)||g.notes[0].pit<16){yy=127
1215 for(g=s.extra;g;g=g.next){if(g.y<yy){yy=g.y;last=g}}
1224 for(g=s.extra;g;g=g.next){if(g.y>yy){yy=g.y;last=g}}
1386 function draw_slur(path,not1,sl){var i,k,g,x1,y1,x2,y2,height,addy,a,y,z,h,dx,dy,ty=sl.ty,dir=(ty&0x07)==C.SL_ABOVE?1:-1,n=path.length,i1=0,i2=n-1,k1=path[0],k2=path[i2]
1465 case C.GRACE:for(g=k.extra;g;g=g.next){if(dir>0){y=3*(g.notes[g.nhd].pit-18)+6
1466 if(y<g.ymx)
1467 y=g.ymx;y-=a*g.x+addy
1469 h=y}else{y=3*(g.notes[0].pit-18)-6
1470 if(y>g.ymn)
1471 y=g.ymn;y-=a*g.x+addy
1584 function draw_tuplet(s1){var s2,s3,g,upstaff,nb_only,some_slur,x1,x2,y1,y2,xm,ym,a,s0,yy,yx,dy,a,dir,r,tp=s1.tp.shift()
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)
1590 draw_slurs(g)}
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)
1822 draw_ties(g,s2,job)}}else{draw_ties(s1,s2,job)}}
1870 function draw_sym_near(){var p_voice,p_st,s,v,st,y,g,w,i,st,dx,top,bot,ymn,output_sav=output;function set_yab(s1,s2){var y,k=realwidth/YSTEP,i=(s1.x/k)|0,j=(s2.x/k)|0,a=(s1.ys-s2.ys)/(s1.xs-s2.xs),b=s1.ys-s1.xs*a,p_st=staff_tb[s1.st]
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)
1888 set_yab(g,bm.s2)}}
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)}
2073 glyphs[i]='<g id="'+i+'">\n'+ln+'\n</g>';xygl(x1,y,i)
2075 out_XYAB('<g transform="translate(X, Y)">\n'+ln+'\n</g>\n',x1,y)}
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
3144 src=src.replace(/([^\\])%.*/,'$1').replace(/\\%/g,'%');src=src.replace(/\s+$/,'')
3247 select=select.replace(/\(/g,'\\(');select=select.replace(/\)/g,'\\)');parse.select=new RegExp(select,'m')
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)
3585 gspleft-=3;x=gspleft;g.beam_st=true
3586 for(;;g=g.next){set_head_shift(g)
3587 acc_shift(g.notes,7);dx=0
3588 for(m=g.nhd;m>=0;m--){if(g.notes[m].shac>dx)
3589 dx=g.notes[m].shac}
3590 x+=dx;g.x=x
3591 if(g.nflags<=0){g.beam_st=true;g.beam_end=true}
3592 next=g.next
3593 if(!next){g.beam_end=true
3596 g.beam_end=true
3597 if(g.beam_end){next.beam_st=true;x+=gspinside/4}
3598 if(g.nflags<=0)
3600 if(g.y>next.y+8)
3604 if(next&&next.type==C.NOTE){if(g.y>=3*(next.notes[next.nhd].pit-18))
3606 else if(g.beam_st&&g.y<3*(next.notes[next.nhd].pit-18)-4)
3614 if(ch.type!='g'||ch.y<0)
4297 function set_ottava(){var s,st,delta,note,g,o,m=nstaff+1,staff_d=new Int16Array(new Array(m*2)),staff_noo=new Int8Array(new Array(m))
4311 case C.GRACE:for(g=s.extra;g;g=g.next){delta=staff_d[st]
4312 if(delta&&!s.p_v.ckey.k_drum){for(m=0;m<=g.nhd;m++){note=g.notes[m]
4443 function set_clefs(){var s,s2,st,v,p_voice,g,new_type,new_line,p_staff,pit,staff_clef=new Array(nstaff+1),sy=cur_sy,mid=[]
4497 g=s.ts_prev
4498 while(g&&g.time==s.time&&(g.v!=v||g.st!=st))
4499 g=g.ts_prev
4500 if(!g||g.time!=s.time){g=s.ts_next
4501 while(g&&(g.v!=v||g.st!=st))
4502 g=g.ts_next
4503 if(!g||g.time!=s.time)
4504 g=s}
4505 if(g.type!=C.CLEF){g=insert_clef(g,new_type,new_line)
4507 g.clef_auto=true}
4508 staff_clef[st].clef=p_voice.clef=g}
4537 Abc.prototype.set_pitch=function(last_s){var s,s2,g,st,delta,pitch,note,dur=C.BLEN,m=nstaff+1,staff_delta=new Int16Array(new Array(m*2)),sy=cur_sy
4554 case C.GRACE:for(g=s.extra;g;g=g.next){delta=staff_delta[g.st]
4555 if(delta&&!s.p_v.ckey.k_drum){for(m=0;m<=g.nhd;m++){note=g.notes[m];note.opit=note.pit
4557 g.ymn=3*(g.notes[0].pit-18)-2;g.ymx=3*(g.notes[g.nhd].pit-18)+2}
4931 function set_beams(sym){var s,t,g,beam,s_opp,n,m,mid_p,pu,pd,laststem=-1
4934 g=s.extra
4935 if(g.stem==2){s_opp=s
4939 for(;g;g=g.next){g.stem=s.stem;g.multi=s.multi}
4943 for(g=s;g;g=g.next){if(g.type!=C.NOTE){continue}
4944 if(g.stem||g.multi){s.stem=g.stem||g.multi
4946 n+=g.nhd+1
4947 for(m=0;m<=g.nhd;m++){if(g.notes[m].pit>=mid_p)
4949 if(g.beam_end)
4953 for(g=s.next;g;g=g.next){if(g.type!=C.NOTE){continue}
4954 if(g.notes[g.nhd].pit>pu)
4955 pu=g.notes[g.nhd].pit
4956 if(g.notes[0].pit<pd)
4957 pd=g.notes[0].pit
4958 if(g.beam_end)
4960 if(g.beam_end){if(pu+pd<mid_p*2){s.stem=1}else if(pu+pd>mid_p*2){s.stem=-1}else{if(cfmt.bstemdown)
4977 beam=false;laststem=s.stem;if(s_opp){for(g=s_opp.extra;g;g=g.next)
4978 g.stem=-laststem;s_opp.stem=-laststem;s_opp=null}}}
5250 Abc.prototype.set_stems=function(){var s,s2,g,slen,scale,ymn,ymx,nflags,ymin,ymax,res
5254 for(g=s.extra;g;g=g.next){res=identify_note(s,g.dur);g.head=res[0];g.dots=res[1];g.nflags=res[2];slen=GSTEM
5255 if(g.nflags>1)
5256 slen+=1.2*(g.nflags-1);ymn=3*(g.notes[0].pit-18);ymx=3*(g.notes[g.nhd].pit-18)
5257 if(s.stem>=0){g.y=ymn;g.ys=ymx+slen;ymx=Math.round(g.ys)}else{g.y=ymx;g.ys=ymn-slen;ymn=Math.round(g.ys)}
5262 ymax=ymx;g.ymx=ymx;g.ymn=ymn}
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
5467 for(g=s.extra;g;g=g.next)
5468 g.x+=x}}
5628 return param.replace(/\]/g,'[')
6140 function parse_staves(p){var v,vid,vids={},a_vf=[],err=false,flags=0,brace=0,bracket=0,parenth=0,flags_st=0,e,a=p.match(/[^[\]|{}()*+\s]+|[^\s]/g)
6197 var a=text.match(/[^\s"=]+=?|"[^"]+"/g)
6201 var reg_dur=/(\d*)(\/*)(\d*)/g
6774 s=s.match(/[^{]+{[^}]+}/g)
6797 str=str.replace(/<|>|&[^&]*?;|&| /g,function(c){switch(c){case'<':return"&lt;"
6836 o=str.replace(/<|>|&[^&]*?;|&| |\$./g,function(c){switch(c){case'<':return"&lt;"
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
7170 function m_gl(s){return s.replace(/[Cco]\||[co]\.|./g,function(e){var m=tgls["mtr"+e]
7172 function def_use(gl){var i,j,g
7175 defined_glyph[gl]=true;g=glyphs[gl]
7176 if(!g){error(1,null,"Unknown glyph: '$1'",gl)
7179 while(1){i=g.indexOf('xlink:href="#',j)
7182 i+=13;j=g.indexOf('"',i);def_use(g.slice(i,j))}
7183 defs+='\n'+g}
7185 text=text.replace(/<!--.*?-->/g,'')
7206 output+="</g>\n"}
7210 output+='<g '
7250 for(st=0;st<=nstaff;st++){if(staff_tb[st].sc_out){output+='<g '+staff_tb[st].scale_str+'>\n'+
7251 staff_tb[st].sc_out+'</g>\n';staff_tb[st].sc_out=""}
7254 output+='<g transform="translate(0,'+
7256 staff_tb[st].output+'</g>\n';staff_tb[st].output=""}}
7276 function out_XYAB(str,x,y,a,b){x=sx(x);y=sy(y);output+=str.replace(/X|Y|A|B|F|G/g,function(c){switch(c){case'X':return x.toFixed(1)
7283 out_XYAB('<g transform="translate(X,Y',x,y);if(rot)
7289 output+=')">\n';stv_g.g++}
7291 stv_g.g--;output+='</g>\n'}
7293 function sx(x){if(stv_g.g)
7297 function sy(y){if(stv_g.g)
7543 color="',g=''
7562 if(cfmt.scale!=1){head+='<g class="g" transform="scale('+
7563 cfmt.scale.toFixed(2)+')">\n';g='</g>\n'}
7567 user.img_out(head+output+g+"</svg>");output=""
7891 function pit_adj(){var i,p_v,s,sk,g,nv=voice_tb.length
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++)
7901 note_transp(g,sk,g.notes[i])}
8729 i=0;type='g'
8742 default:switch(type){case'g':gch.font=get_font("gchord")
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;"
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]
8959 var m,i,fn,nreq_i=this.nreq,ls=file.match(/(^|\n)(%%|I:).+?\b/g)