Lines Matching defs:cfmt

73 if(!sev&&cfmt.quiet)
282 if(!text){if(cfmt.decoerr)
423 if(!cfmt.dynalign){st=nstaff;y=staff_tb[st].y
446 x+=note.shhd*stv_g.scale}else if(f_staff[dd.func]&&!cfmt.dynalign&&((de.up&&st>0)||(!de.up&&st<nstaff))){if(de.up)
599 if(cfmt.measurenb>0&s.bar_num&&s.bar_num%cfmt.measurenb)
630 if(cfmt.dynalign){if(de.up){if(de.y>minmax[de.st].ymax)
638 if(cfmt.dynalign){if(de.up)
658 if(bar_num>1){if(cfmt.measurenb==0){any_nb=true;y=y_get(st,true,0,20)
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}
685 if(cfmt.measurenb==0||(bar_num%cfmt.measurenb)!=0||!s.next||s.bar_mrep)
818 if(s.grace&&cfmt.flatbeams)
826 a=cfmt.beamslope*a/(cfmt.beamslope+Math.abs(a))
1109 if(!s.k_a_acc){if(cfmt.cancelkey||s.k_sf==0){if(s.k_sf==0||old_sf*s.k_sf<0){shift=sharp_cl[clef_ix];p_seq=shift>9?sharp1:sharp2
1117 if(cfmt.cancelkey&&i<old_sf){x+=2
1121 if(cfmt.cancelkey&&i>old_sf){x+=2
1135 case"::":return cfmt.dblrepbar}
1166 if(s.rep_nb>2&&s.v==cur_sy.top_voice&&cfmt.measrepnb>0&&!(s.rep_nb%cfmt.measrepnb))
1211 if(s.p_v.ckey.k_bagpipe||!cfmt.graceslurs||slur||s.tie_s||!s.next||s.next.type!=C.NOTE)
1308 out_stem(x,y,slen,s.grace)}else{out_stem(x,y,slen,s.grace,nflags,cfmt.straightflags)}}else if(s.xstem){s2=s.ts_prev;slen=(s2.stem>0?s2.y:s2.ys)-s.y;slen+=staff_tb[s2.st].y-staffb;out_stem(x,y,slen)}
1493 height*=cfmt.slurheight;slur_out(x1,y1,x2,y2,dir,height,ty&C.SL_DOTTED);dx=x2-x1;a=(y2-y1)/dx;addy=y1-a*x1
1777 h=(.03*(x2-x1)+16)*dir*cfmt.tieheight
1936 if(cfmt.measurenb>=0)
1999 return y;y*=p_staff.staffscale;staffsep=cfmt.staffsep*.5+
2009 staffsep=sy_staff_prev.sep||cfmt.sysstaffsep;maxsep=sy_staff_prev.maxsep||cfmt.maxsysstaffsep;dy=0
2039 dy=-mbot;staffsep=cfmt.staffsep*.5
2041 dy=staffsep;maxsep=cfmt.maxstaffsep*.5
2055 if(cache&&cache.st_l==stafflines&&cache.st_ws==(ws|0)){xygl(x1,staff_tb[st].y,'stdef'+cfmt.fullsvg)
2070 i='stdef'+cfmt.fullsvg;if(ln.indexOf('<path',1)<0)
2750 var cfmt={annotationfont:{name:"sans-serif",size:12},aligncomposer:1,beamslope:.4,breaklimit:.7,breakoneoln:true,cancelkey:true,composerfont:{name:"serif",style:"italic",size:14},composerspace:6,dblrepbar:':][:',decoerr:true,dynalign:true,footerfont:{name:"serif",size:16},fullsvg:'',gchordfont:{name:"sans-serif",size:12},gracespace:new Float32Array([4,8,11]),graceslurs:true,headerfont:{name:"serif",size:16},historyfont:{name:"serif",size:16},hyphencont:true,indent:0,infofont:{name:"serif",style:"italic",size:14},infoname:'R "Rhythm: "\n\
2773 font=cfmt[xxxfont];if(!font){font={pad:0}}else{font={name:font.name,size:font.size,box:font.box,pad:font.pad}}
2774 cfmt[xxxfont]=font;a=p.match(/\s+(no)?box(\s|$)/)
2833 function set_infoname(param){var tmp=cfmt.infoname.split("\n"),letter=param[0]
2841 cfmt.infoname=tmp.join('\n')
2843 cfmt.infoname+="\n"+param}
2853 if(cfmt.writefields.indexOf(c)<0)
2854 cfmt.writefields+=c}}else{for(i=0;i<a[0].length;i++){c=a[0][i]
2855 if(cfmt.writefields.indexOf(c)>=0)
2856 cfmt.writefields=cfmt.writefields.replace(c,'')}}}
2864 img.chg=false;img.lm=cfmt.leftmargin-cfmt.printmargin
2866 img.lm=0;img.rm=cfmt.rightmargin-cfmt.printmargin
2868 img.rm=0;img.width=cfmt.pagewidth-2*cfmt.printmargin
2876 cfmt[cmd]=v
2878 case"bgcolor":case"fgcolor":case"dblrepbar":case"titleformat":cfmt[cmd]=param
2886 cfmt[cmd]=f
2890 case"bstemdown":case"breakoneoln":case"cancelkey":case"checkbars":case"contbarnb":case"custos":case"decoerr":case"dynalign":case"flatbeams":case"graceslurs":case"graceword":case"hyphencont":case"keywarn":case"linewarn":case"quiet":case"rbdbstop":case"singleline":case"squarebreve":case"splittune":case"straightflags":case"stretchstaff":case"timewarn":case"titlecaps":case"titleleft":cfmt[cmd]=get_bool(param)
2902 cfmt[cmd]=f
2911 cfmt[cmd]=f;img.chg=true
2913 case"concert-score":if(cfmt.sound!="play")
2914 cfmt.sound="concert"
2924 cfmt[cmd]=param
2931 cfmt[cmd][i]=Number(v[i])
2933 case"tuplets":cfmt[cmd]=param.split(/\s+/);v=cfmt[cmd][3]
2935 cfmt[cmd][3]=posval[v]
2947 case"play":cfmt.sound="play"
2951 case"sounding-score":if(cfmt.sound!="play")
2952 cfmt.sound="sounding"
2959 v=cfmt.pagewidth-v-cfmt.leftmargin
2962 cfmt.rightmargin=v;img.chg=true
2964 case"textoption":cfmt[cmd]=get_textopt(param)
2968 cfmt[cmd]=get_bool(param)
2970 cfmt[cmd]=v
2979 cfmt[cmd]=param
2991 function font_class(font){var f='f'+font.fid+cfmt.fullsvg
3004 (typeof document=="undefined"?cfmt.fullsvg:"")+"{"+style_font(font)+"}")
3011 font=cfmt[fn]
3153 cfmt=sav.cfmt;info=sav.info;char_tb=sav.char_tb;glovar=sav.glovar;maps=sav.maps;mac=sav.mac;maci=sav.maci;parse.tune_v_opts=null;parse.scores=null;init_tune()
3305 sav.cfmt=clone(cfmt);sav.info=clone(info,2)
3325 case'W':if(parse.state==0||cfmt.writefields.indexOf(line0)<0)
3339 case's':if(parse.state!=3||cfmt.writefields.indexOf(line0)<0)
3343 case'w':if(parse.state!=3||cfmt.writefields.indexOf(line0)<0)
3390 case-3:head=cfmt.squarebreve?C.SQUARE:C.OVALBARS
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)
3722 if(cfmt.measurenb>0&s.bar_num&&s.bar_num%cfmt.measurenb)
3736 if(s.k_old_sf&&(cfmt.cancelkey||n1==0))
4065 function set_eol(s){if(cfmt.custos&&voice_tb.length==1)
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)
4076 case C.METER:if(s2.type==C.METER){if(!cfmt.timewarn)
4150 function get_width(s,next){var shrink,space,w=0,wmx=0,sp_fac=(1-cfmt.maxshrink)
4156 w+=shrink*cfmt.maxshrink
4165 if(cfmt.keywarn&&next&&next.type==C.KEY&&!last.dur){ws[0]+=next.wr
4175 s2=first=s;xmin=s.x-s.shrink-indent;xmax=xmin+lwidth;xmid=xmin+wwidth/nlines;xmin+=wwidth/nlines*cfmt.breaklimit;for(s=s.ts_next;s!=next;s=s.ts_next){if(!s.x)
4248 if(cfmt.custos&&voice_tb.length==1)
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)
4256 i=cfmt.barsperstaff}}
4541 if(cfmt.sound){if(s.clef_octave&&!s.clef_oct_transp)
4549 if(cfmt.sound){if(s.clef_octave&&!s.clef_oct_transp)
4642 if(i!=0&&i+2==st_v.length){if(st_v[i].ymn-cfmt.stemheight>=st_v[i+1].ymx)
4879 if(n==cfmt.rbmin)
4881 if(n==cfmt.rbmax){if(s2)
4898 if(glovar.ottava&&cfmt.sound!="play")
4929 maxw+=cfmt.indent
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)
4971 else if(cfmt.bstemdown)
5277 slen=cfmt.stemheight
5310 case"mc_start":multicol={posy:posy,maxy:posy,lmarg:cfmt.leftmargin,rmarg:cfmt.rightmargin}
5316 cfmt.leftmargin=multicol.lmarg
5317 cfmt.rightmargin=multicol.rmarg
5326 cfmt.leftmargin=multicol.lmarg
5327 cfmt.rightmargin=multicol.rmarg
5447 spf_last=0}else if((ll&&xx+xs>width*(1-cfmt.stretchlast))||(!ll&&(xx+xs>width||cfmt.stretchstaff))){if(xx==xse)
5479 function set_posx(){posx=img.lm/cfmt.scale}
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)}
5537 function reset_gen(){insert_meter=cfmt.writefields.indexOf('M')>=0?3:2}
5678 curvoice.transp=cfmt.sound?curvoice.sndtran:val
5702 case"score=":if(cfmt.nedo){syntax(1,errs.notransp)
5705 if(cfmt.sound)
5709 case"shift=":if(cfmt.nedo){syntax(1,errs.notransp)
5713 case"sound=":if(cfmt.nedo){syntax(1,errs.notransp)
5716 if(cfmt.sound)
5742 case"transpose=":if(cfmt.nedo){syntax(1,errs.notransp)
5746 if(cfmt.sound)
5798 if(!cfmt.temper)
5799 cfmt.temper=new Float32Array([11.62,12.55,2.37,2.37,3.49,0,2.37,2.37,3.49,4.41,5.53,0,3.49,4.41,5.53,7.35,7.35,4.41,5.53,7.35,7.35,8.19,0,7.35,7.35,8.19,9.39,10.51,0,8.19,9.39,10.51,11.62,12.55,0,10.51,11.62,12.55,2.37,2.37])
5906 if(cfmt.writefields.indexOf('M')<0)
5923 if(cfmt.writefields.indexOf('Q')<0)
5989 if(cfmt.writefields.indexOf(info_type)<0)
6125 case"||":if(!cfmt.rbdbstop)
6219 if(cfmt.nedo&&nd[1]==1){nd[0]*=12
6220 nd[1]*=cfmt.nedo}
6298 return p+o+s}else{s=acc}}else{if(cfmt.temper)
6299 return cfmt.temper[abc2svg.p_b40[pit%7]]+o
6301 if(!cfmt.nedo){if(!cfmt.temper){p+=o+s
6303 return cfmt.temper[b40]+o}
6304 if(acc[1]==cfmt.nedo){b40=abc2svg.p_b40[pit%7]
6305 return cfmt.temper[b40]+o+s}}
6306 p0=cfmt.temper[abc2svg.p_b40[pit%7]]
6307 if(s>0){p1=cfmt.temper[(abc2svg.p_b40[pit%7]+1)%40]
6309 p1+=12}else{p1=cfmt.temper[(abc2svg.p_b40[pit%7]+39)%40]
6492 if(cfmt.shiftunison)
6493 s.shiftunison=cfmt.shiftunison
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))
6606 case'\n':if(cfmt.barsperstaff)
6630 tp.push({p:pplet,q:qplet,r:rplet,ro:rplet,f:cfmt.tuplets})
6760 if(cfmt.breakoneoln&&curvoice.last_note)
6762 if(no_eol||cfmt.barsperstaff)
6886 if(cfmt.titletrim){i=title.lastIndexOf(", ")
6887 if(i<0||title[i+2]<'A'||title[i+2]>'Z'){i=0}else if(cfmt.titletrim==true){if(i<title.length-7||title.indexOf(' ',i+3)>=0)
6888 i=0}else{if(i<title.length-cfmt.titletrim-2)
6892 if(!is_subtitle&&cfmt.writefields.indexOf('X')>=0)
6894 if(cfmt.titlecaps)
6899 / cfmt.scale}
6904 if(is_subtitle){set_font("subtitle");h=cfmt.subtitlespace}else{set_font("title");h=cfmt.titlespace}
6909 if(cfmt.titleleft)
6922 set_page();var wh,font,o,strlw=get_lwidth(),sz=gene.curfont.size,lineskip=sz*cfmt.lineskipfac,parskip=sz*cfmt.parskipfac,i,j,x,words,w,k,ww,str;switch(action){default:font=gene.curfont
6929 vskip(str.wh[1]*cfmt.lineskipfac+font.pad*2)
6937 vskip(str.wh[1]*cfmt.lineskipfac+font.pad*2)
6951 vskip(str.wh[1]*cfmt.lineskipfac)
6956 vskip(str.wh[1]*cfmt.lineskipfac)
6981 vskip(cfmt.wordsspace)
7005 for(i=0;i<i1||i2<nw;i++,i2++){vskip(cfmt.lineskipfac*gene.curfont.size)
7016 function put_history(){var i,j,c,str,font,h,w,wh,head,names=cfmt.infoname.split("\n"),n=names.length
7018 if(cfmt.writefields.indexOf(c)<0)
7023 if(!font){font=true;set_font("history");vskip(cfmt.textspace);h=gene.curfont.size*cfmt.lineskipfac}
7030 function write_headform(lwidth){var c,font,font_name,align,x,y,sz,info_val={},info_font=clone(info_font_init),info_sz={A:cfmt.infospace,C:cfmt.composerspace,O:cfmt.composerspace,R:cfmt.infospace},info_nb={}
7031 var fmt="",p=cfmt.titleformat,j=0,i=0
7061 var ya={l:cfmt.titlespace,c:cfmt.titlespace,r:cfmt.titlespace},xa={l:0,c:lwidth*.5,r:lwidth},yb={},str;p=fmt;i=0
7105 if(c=='T'){font_name=info_font.T="subtitle";info_sz.T=cfmt.subtitlespace}
7120 vskip(cfmt.topspace)
7121 if(cfmt.titleformat){write_headform(lwidth);vskip(cfmt.musicspace)
7123 if(info.T&&cfmt.writefields.indexOf('T')>=0){i=0
7129 if(parse.ckey.k_bagpipe&&!cfmt.infoline&&cfmt.writefields.indexOf('R')>=0)
7131 if(rhythm){set_font("composer");xy_str(0,-cfmt.composerspace,rhythm);down1=cfmt.composerspace}
7133 if(cfmt.writefields.indexOf('C')>=0)
7135 if(cfmt.writefields.indexOf('O')>=0)
7137 if(composer||origin||cfmt.infoline){var xcomp,align;set_font("composer");vskip(cfmt.composerspace)
7138 if(cfmt.aligncomposer<0){xcomp=0;align=' '}else if(cfmt.aligncomposer==0){xcomp=lwidth*.5;align='c'}else{xcomp=lwidth;align='r'}
7140 if(composer||origin){if(cfmt.aligncomposer>=0&&down1!=down2)
7153 if((rhythm||area)&&cfmt.infoline){set_font("info");vskip(gene.curfont.size+cfmt.infospace);put_inf2r(lwidth,0,rhythm,area,'r');down1+=gene.curfont.size+cfmt.infospace}}else{down2=cfmt.composerspace}
7154 if(info.P&&cfmt.writefields.indexOf('P')>=0){set_font("parts");down1=cfmt.partsspace+gene.curfont.size-down1
7159 vskip(down2+cfmt.musicspace)}
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
7486 if(!cfmt.musicfont.used)
7494 font_class(cfmt.musicfont)+'" style="font-size:'+
7509 font_class(cfmt.musicfont)+'" style="font-size:'+
7545 if(cfmt.fgcolor)
7546 head+=cfmt.fgcolor+'" fill="'+cfmt.fgcolor+'"'
7549 if(cfmt.bgcolor)
7550 head+=' style="background-color: '+cfmt.bgcolor+'"';font=get_font("music")
7552 posy*=cfmt.scale
7562 if(cfmt.scale!=1){head+='<g class="g" transform="scale('+
7563 cfmt.scale.toFixed(2)+')">\n';g='</g>\n'}
7569 if(cfmt.fullsvg&&typeof document=="undefined"){defined_glyph={}
7574 if(blkdiv<0&&(!parse.state||cfmt.splittune)){user.img_out('</div>')
7695 if(!cfmt.graceword)
7753 if(s.text){if(!cfmt.contbarnb){if(s.text[0]=='1')
7761 if(cfmt.checkbars&&((k&&!s.bar_dotted&&s.next)||(tim>ptim+wmeasure&&s.prev.type!=C.MREST)))
7767 if(s.text){if(s.text[0]=='1'){if(cfmt.contbarnb)
7772 s.bar_num=n}else{if(cfmt.contbarnb)
7849 if(cfmt.transp&&curvoice.shift)
7850 syntax(0,"Mix of old and new transposition syntaxes");if(cfmt.transp!=undefined||curvoice.transp!=undefined||curvoice.shift!=undefined)
7851 transp=(cfmt.transp||0)+
7962 switch(param){case"start":multicol={maxy:0,lmarg:cfmt.leftmargin,rmarg:cfmt.rightmargin}
7967 multicol.maxy=posy;cfmt.leftmargin=multicol.lmarg;cfmt.rightmargin=multicol.rmarg;img.chg=true;set_page();posy=0
7972 posy=multicol.maxy;cfmt.leftmargin=multicol.lmarg;cfmt.rightmargin=multicol.rmarg;multicol=undefined;blk_flush();img.chg=true;set_page()
8012 if(parse.state>=2){s=new_block(cmd);s.x=(lwidth-len)/2/cfmt.scale;s.l=len/cfmt.scale;s.sk1=h1;s.sk2=h2
8014 vskip(h1);output+='<path class="stroke"\n\td="M';out_sxsy((lwidth-len)/2/cfmt.scale,' ',0);output+='h'+(len/cfmt.scale).toFixed(1)+'"/>\n';vskip(h2);blk_flush()
8064 s.opt=cfmt.textoption
8067 write_text(param,cfmt.textoption)
8069 case"transpose":if(cfmt.sound)
8075 switch(parse.state){case 0:cfmt.transp=0
8076 case 1:case 2:cfmt.transp=(cfmt.transp||0)+val
8136 action=cfmt.textoption
8164 tunes.push([tsfirst,voice_tb,info,cfmt])
8357 if(!curvoice.ckey.k_bagpipe&&!curvoice.ckey.k_drum&&(cfmt.transp!=undefined||curvoice.transp!=undefined||curvoice.shift!=undefined))
8358 transp=(cfmt.transp||0)+
8381 if(cfmt.transp&&parse.state>=2){p_v_sav=curvoice;curvoice=p_voice;set_transp();curvoice=p_v_sav}
8625 if(cfmt.hyphencont)
8636 if(incr>0){if(y>-cfmt.vocalspace)
8637 y=-cfmt.vocalspace;y*=sc
8640 top=staff_tb[p_voice.st].topbar+cfmt.vocalspace
8928 Abc.prototype.add_style=function(s){style+=s};Abc.prototype.cfmt=function(){return cfmt};Abc.prototype.clone=clone;Abc.prototype.deco_cnv=deco_cnv;Abc.prototype.defs_add=defs_add