Lines Matching defs:bm

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
804 return false;bm.s2=s2
806 return false}else{if(!two_staves){bm.s1=s1;bm.a=(s1.ys-s2.ys)/(s1.xs-s2.xs);bm.b=s1.ys-s1.xs*bm.a+staff_tb[st].y;bm.nflags=nflags
926 bm.s1=s1;bm.a=a;bm.b=b;bm.nflags=nflags
928 function draw_beams(bm){var s,i,beam_dir,shift,bshift,bstub,bh,da,k,k1,k2,x1,s1=bm.s1,s2=bm.s2
929 function draw_beam(x1,x2,dy,h,bm,n){var y1,dy2,s=bm.s1,nflags=s.nflags
932 if(s.trem2&&n>nflags){if(s.dur>=C.BLEN/2){x1=s.x+6;x2=bm.s2.x-6}else if(s.dur<C.BLEN/4){x1+=5;x2-=6}}
933 y1=bm.a*x1+bm.b-dy;x2-=x1;x2/=stv_g.scale;dy2=bm.a*x2
941 bh=-bh;draw_beam(s1.xs-shift,s2.xs+shift,0,bh,bm,1);da=0
943 s.ys=bm.a*s.xs+bm.b
953 for(i=2;i<=bm.nflags;i++){shift+=bshift
955 bm.a+=da
959 if(s.trem1&&i>s.nflags-s.ntrem){x1=(s.dur>=C.BLEN/2)?s.x:s.xs;draw_beam(x1-5,x1+5,(shift+2.5)*beam_dir,bh,bm,i)
985 draw_beam(x1,k2.xs,shift*beam_dir,bh,bm,i)
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))
1195 draw_beams(bm)}
1196 anno_start(g);draw_note(g,!bm.s2)
1197 if(g==bm.s2)
1198 bm.s2=null
1885 for(v=0;v<voice_tb.length;v++){var bm={},first_note=true;p_voice=voice_tb[v]
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)
1887 if(bm.s2)
1888 set_yab(g,bm.s2)}}
1890 case C.NOTE:if((s.beam_st&&!s.beam_end)||(first_note&&!s.beam_st)){first_note=false;self.calculate_beam(bm,s)
1891 if(bm.s2)
1892 set_yab(s,bm.s2)}
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
2178 if(s.beam_st&&!s.beam_end){if(self.calculate_beam(bm,s))
2179 draw_beams(bm)}
2180 if(!s.invis){anno_start(s);draw_note(s,!bm.s2);anno_a.push(s)}
2181 if(s==bm.s2)
2182 bm.s2=null