Lines Matching defs:sth
4 //sth.js-module to set the stem heights
5 abc2svg.sth={recal_beam:function(bm,s){var staff_tb=this.get_staff_tb(),y=staff_tb[s.st].y,s2=bm.s2,y2=staff_tb[s2.st].y
6 if(s.sth)
7 s.ys=s.sth
8 if(s2.sth)
9 s2.ys=s2.sth;bm.a=(s.ys+y-s2.ys-y2)/(s.xs-s2.xs);bm.b=s.ys-s.xs*bm.a+y
18 if(p_voice.sth!=null)
21 for(s=p_voice.sym;s;s=s.next){if(s.sth){sth_a=s.sth;s.sth=null}
34 s.sth=s.ys}}},calculate_beam:function(of,bm,s1){var done=of(bm,s1)
35 if(done&&bm.s2&&(s1.sth||bm.s2.sth))
36 abc2svg.sth.recal_beam.call(this,bm,s1)
38 if(curvoice.sth&&s&&s.type==C.NOTE){s.sth=curvoice.sth;curvoice.sth=null}
39 return s},set_fmt:function(of,cmd,param){if(cmd=="sth"){if(this.parse.state==2)
43 curvoice.sth=param.split(/[ \t;-]+/)
45 of(cmd,param)},set_stems:function(of){of();abc2svg.sth.set_sth.call(this)},set_hooks:function(abc){abc.calculate_beam=abc2svg.sth.calculate_beam.bind(abc,abc.calculate_beam);abc.new_note=abc2svg.sth.new_note.bind(abc,abc.new_note);abc.set_format=abc2svg.sth.set_fmt.bind(abc,abc.set_format);abc.set_stems=abc2svg.sth.set_stems.bind(abc,abc.set_stems)}}
46 abc2svg.modules.hooks.push(abc2svg.sth.set_hooks);abc2svg.modules.sth.loaded=true