Lines Matching refs:conf

7 // changed default conf.sfu to point to CDN due to licensing issues
8 function AbcPlay(i_conf){var conf=i_conf,init={},audio=ToAudio(),audio5,midi5,current,abcplay={clear:audio.clear,add:audio.add,set_sfu:function(v){if(v==undefined)
9 return conf.sfu
10 conf.sfu=v},set_speed:function(v){if(v==undefined)
11 return conf.speed
12 conf.new_speed=v},set_vol:function(v){if(v==undefined)
13 return conf.gain;conf.gain=v
28 if(out.length==0){if(conf.onend)
29 conf.onend()
39 if(!res||o<0){if(conf.onend)
40 conf.onend()
47 conf.gain=0.7;conf.speed=1;(function get_param(){try{if(!localStorage)
51 conf.sfu=v;v=localStorage.getItem("volume")
53 conf.gain=Number(v)})()
55 midi5=Midi5(conf)
57 audio5=Audio5(conf);return abcplay}
255 d+=s.pdur/po.conf.speed
273 t=po.stim+s.ptim/po.conf.speed
274 if(po.conf.new_speed){d=po.get_time(po)
275 po.stim=d-(d-po.stim)*po.conf.speed/po.conf.new_speed
276 po.conf.speed=po.conf.new_speed
277 po.conf.new_speed=0
278 t=po.stim+s.ptim/po.conf.speed}
284 if(!po.repn&&(!s.rep_v||po.repv<s.rep_v.length)){po.stim+=(s.ptim-s.rep_p.ptim)/po.conf.speed
288 t=po.stim+s.ptim/po.conf.speed
293 if(s2){po.stim+=(s.ptim-s2.ptim)/po.conf.speed
295 t=po.stim+s.ptim/po.conf.speed
305 if(s2){po.stim+=(s.ptim-s2.ptim)/po.conf.speed
307 t=po.stim+s.ptim/po.conf.speed}else{s=po.s_end}}
312 case C.GRACE:for(g=s.extra;g;g=g.next){d=g.pdur/po.conf.speed
316 case C.NOTE:d=s.pdur/po.conf.speed
321 case C.REST:d=s.pdur/po.conf.speed
334 t=po.stim+s.ptim/po.conf.speed
350 -po.s_cur.ptim*po.conf.speed
358 function Audio5(i_conf){var po,conf=i_conf,empty=function(){},errmsg,ac,gain,instr=[],params=[],rates=[],w_instr=0
416 conf.instr_load(instr,function(sf2_bin){sf2_create(sf2_bin,instr)
457 if(!conf.sfu)
458 conf.sfu="https://cdn.jsdelivr.net/npm/abc2svg@1.20.16/Scc1t2"
459 if(!conf.instr_load){conf.instr_load=function(instr,done,fail){abc2svg.loadjs(conf.sfu+'/'+instr+'.js',function(){done(b64dcod(abcsf2[instr]))},fail)}}
460 return{get_outputs:function(){return(window.AudioContext||window.webkitAudioContext)?['sf2']:null},play:function(i_start,i_end,i_lvl){errmsg=conf.errmsg||alert
465 if(!gain){ac=conf.ac
466 if(!ac){conf.ac=ac=new(window.AudioContext||window.webkitAudioContext)
470 gain.gain.value=conf.gain}
473 po={conf:conf,onend:conf.onend||empty,onnote:conf.onnote||empty,s_end:i_end,s_cur:i_start,repv:i_lvl||0,tgen:2,get_time:get_time,midi_ctrl:midi_ctrl,note_run:note_run,ac:ac,gain:gain,params:params,rates:rates}
520 return null;return chunk};sf2.Riff.Parser.prototype.getNumberOfChunks=function(){return this.chunkList.length};return sf2}));function Midi5(i_conf){var po,conf=i_conf,empty=function(){},rf,op
554 break}}},play:function(i_start,i_end,i_lvl){po={conf:conf,onend:conf.onend||empty,onnote:conf.onnote||empty,s_end:i_end,s_cur:i_start,repv:i_lvl||0,tgen:2,get_time:get_time,midi_ctrl:midi_ctrl,note_run:note_run,op:op,c_i:[]}