Lines Matching defs:grace

6 var abc2svg={};abc2svg.C={BLEN:1536,BAR:0,CLEF:1,CUSTOS:2,GRACE:4,KEY:5,METER:6,MREST:7,NOTE:8,PART:9,REST:10,SPACE:11,STAVES:12,STBRK:13,TEMPO:14,BLOCK:16,REMARK:17,FULL:0,EMPTY:1,OVAL:2,OVALBARS:3,SQUARE:4,SL_ABOVE:0x01,SL_BELOW:0x02,SL_AUTO:0x03,SL_HIDDEN:0x04,SL_DOTTED:0x08};abc2svg.sym_name=['bar','clef','custos','','grace','key','meter','Zrest','note','part','rest','yspace','staves','Break','tempo','','block','remark']
41 var errs={bad_char:"Bad character '$1'",bad_grace:"Bad character in grace note sequence",bad_transp:"Bad transpose value",bad_val:"Bad value in $1",bar_grace:"Cannot have a bar in grace notes",ignored:"$1: inside tune - ignored",misplaced:"Misplaced '$1' in %%score",must_note:"!$1! must be on a note",must_note_rest:"!$1! must be on a note or a rest",nonote_vo:"No note in voice overlay",not_ascii:"Not an ASCII character",not_enough_n:'Not enough notes/rests for %%repeat',not_enough_m:'Not enough measures for %%repeat',not_enough_p:"Not enough parameters in %%map",not_in_tune:"Cannot have '$1' inside a tune",notransp:"Cannot transpose with a temperament"}
750 function b_pos(grace,stem,nflags,b){var top,bot,d1,d2,shift=!grace?BEAM_SHIFT:3.5,depth=!grace?BEAM_DEPTH:1.8
780 notes=nflags=0;two_staves=two_dir=false;st=s1.st;v=s1.v;stem_xoff=s1.grace?GSTEM_XOFF:3.5
818 if(s.grace&&cfmt.flatbeams)
829 if(two_dir){ys=((s1.grace?3.5:BEAM_SHIFT)*(nflags-1)+
834 b+=ys*s1.stem}else if(!s1.grace){var beam_h=BEAM_DEPTH+BEAM_SHIFT*(nflags-1)
902 b+=b_pos(s1.grace,s1.stem,nflags,b-staff_tb[st].y)
936 if(!s1.grace){bshift=BEAM_SHIFT;bstub=BEAM_STUB;shift=.34;bh=BEAM_DEPTH}else{bshift=3.5;bstub=3.2;shift=.29;bh=1.8}
1075 var dx1,dx2,hl,shhd,hlp,stafflines=p_staff.stafflines,top=stafflines.length-1,yu=top,bot=p_staff.botline/6,yl=bot,dx=s.grace?4:hw_tb[s.head]*1.3
1253 if(note.invis){}else if(s.grace){p="ghd";x_note-=4.5*stv_g.scale}else if(note.map&&note.map[0]){i=s.head;p=note.map[0][i]
1290 if(!s.grace){draw_acc(x,y+staffb,note.acc)}else{g_open(x,y+staffb,0,.75);draw_acc(0,0,note.acc)
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)}
1310 if(s.head==C.FULL||s.head==C.EMPTY){x1+=(s.grace?GSTEM_XOFF:3.5)*s.stem
1339 if(k1.grace&&k1.stem>0)
1403 if(k2.grace){y1=k1.y-8}else if(k1.beam_end&&k1.nflags>=-1&&(!k1.in_tuplet||k1.ys<y1+3)){if(k1.nflags>0){x1+=2;y1=k1.ys+3}else{y1=k1.ys+6}}}}}}
1447 if(k1.grace)
1449 if(k2.grace)
1532 if(gr1&&!(s2.grace&&s.v==s2.v&&s.time==s2.time)){do{path.push(s);s=s.next}while(s);s=gr1.next}else{path.push(s);if(s.grace)
1536 if(!s2.grace){while(s){if(s.v==v)
1540 s=s.ts_next}}else if(s.grace){while(1){path.push(s)
3401 if(s.grace)
6036 if(!s2.dur||s2.grace)
6278 if(sl.grace)
6279 sl.grace.sl1=true
6280 if(enote.s.grace)
6283 if(enote.grace){error(1,enote.s,errs.bad_slur_end)
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
6338 if(grace){s.grace=true}else{if(a_gch)
6384 note=parse_basic_note(line,s.grace?C.BLEN/4:curvoice.ulen<0?C.BLEN:curvoice.ulen)
6437 if(grace)
6438 curvoice.sls[curvoice.sls.length-1].grace=grace}}
6440 if(s.grace&&s.type!=C.NOTE){syntax(1,errs.bad_grace)
6444 if(s.notes){if(!grace){switch(curvoice.pos.stm){case C.SL_ABOVE:s.stem=1;break
6462 if(grace.stem)
6463 s.stem=grace.stem}
6469 if(grace)
6470 grace.tie_s=curvoice.tie_s=grace
6494 if(!grace){if(!curvoice.lyric_restart)
6500 if(parse.ottava.length){if(grace)
6501 grace.ottava=parse.ottava
6512 if(!s.grace){s.time=tim
6522 function parse_music_line(){var grace,last_note_sav,a_dcn_sav,no_eol,s,tps,tp=[],tpn=-1,sls=[],line=parse.line
6603 if(grace)
6604 grace.gr_shift=true}
6611 case'&':if(grace){syntax(1,errs.bad_grace)
6619 if(c>'0'&&c<='9'){if(grace){syntax(1,errs.bad_grace)
6632 if(c=='&'){if(grace){syntax(1,errs.bad_grace)
6663 case'"':if(grace){syntax(1,errs.bad_grace)
6670 if('|[]: "'.indexOf(c_next)>=0||(c_next>='1'&&c_next<='9')){if(grace){syntax(1,errs.bar_grace)
6674 if(line.buffer[line.index+2]==':'){if(grace){syntax(1,errs.bad_grace)
6682 case'n':s=self.new_note(grace,sls)
6685 if(grace||!s.notes)
6709 if(grace){syntax(1,"Cannot have a broken rhythm in grace notes")
6716 case'{':if(grace){syntax(1,"'{' in grace note")
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}
6719 switch(curvoice.pos.gst){case C.SL_ABOVE:grace.stem=1;break
6720 case C.SL_BELOW:grace.stem=-1;break
6721 case C.SL_HIDDEN:grace.stem=2;break}
6722 sym_link(grace);c=line.next_char()
6723 if(c=='/'){grace.sappo=true
6726 case'|':if(grace){syntax(1,errs.bar_grace)
6731 if(!grace||!s){syntax(1,errs.bad_char,c)
6734 syntax(1,"Decoration ignored");grace.extra=grace.next;grace.extra.prev=null;grace.next=null;curvoice.last_sym=grace;grace=null
6757 if(grace){syntax(1,"No end of grace note sequence");curvoice.last_sym=grace.prev;curvoice.last_note=last_note_sav
6758 if(grace.prev)
6759 grace.prev.next=null}
7260 if(s.grace)
7365 function out_stem(x,y,h,grace,nflags,straight){var dx=grace?GSTEM_XOFF:3.5,slen=-h
7375 if(h>0){if(!straight){if(!grace){xygl(x,y,"flu"+nflags)
7380 if(!grace){while(--nflags>=0){out_XYAB('MX Yl7 3.2 0 3.2 -7 -3.2z\n',x,y);y-=5.4}}else{while(--nflags>=0){out_XYAB('MX Yl3 1.5 0 2 -3 -1.5z\n',x,y);y-=3}}}}else{if(!straight){if(!grace){xygl(x,y,"fld"+nflags)
7385 if(!grace){while(--nflags>=0){out_XYAB('MX Yl7 -3.2 0 -3.2 -7 3.2z\n',x,y);y+=5.4}}}}
7596 if(s.dur&&!s.grace)
8479 while(s&&(s.type!=C.NOTE||s.grace))
8540 while(s&&(s.type!=C.NOTE||s.grace))