@AA 上に移動 kerokero9696 --track0:小速大遅,1,4096,100,1 --track1:基準値,1,1000,240,1 --track2:効果持続,1,1000,30,1 --track3:Buf番号,1,9999,20,1 --dialog:ガイド表示/chk,chk2=1;保存先,al=0;分割数,div=40;表示形式/chk,chk1=0;図形/fig,fig="円";色/col,col1=0xaaaaaa;色/col,col2=0x00dbff;サイズ,fs=20;図形幅,fl=2;速度係数,coef=150; --------------------------------------- t0=math.floor(obj.track0) t1=math.floor(obj.track1) t2=math.floor(obj.track2) t3=math.floor(obj.track3) if(t3>=div)then t3=div elseif(t3<=1)then t3=1 end ogvz=obj.getvalue("zoom")/100 w=obj.screen_w h=obj.screen_h of=obj.frame otf=obj.totalframe ha=3600/h --------------------------------------- buf={} n=obj.getaudio(buf,"audiobuffer","spectrum",div) --------------------------------------- if(chk2==1)then for i=0,n-1 do if(chk1==0)then obj.load("figure",fig,col1,fs,fl) else obj.setfont("ms gothic",fs*0.8,0,col1,col2) obj.load("text",i+1) end x0=-w/2+w/n*i y0=h/2-buf[i+1]/ha obj.draw((x0+fs/2)*ogvz,y0*ogvz,0) end for i=0,1 do if(i==0)then obj.load("figure","四角形",col2,w*1.1) obj.aspect=-99.8/100 x1=0 y1=h/2-t1 else obj.load("figure","四角形",col2,h*1.1) obj.aspect=99.6/100 x1=-w/2+w/div*(t3-1) y1=0 end obj.draw((x1+fs/2)*ogvz,y1*ogvz,0) end for j=1,3 do if(j==1)then output="基準値:"..t1 x2=-w/2+fs*1.5 y2=h/2-t1+fs/2*j elseif(j==2)then output="Buf番号:"..t3 x2=w/3+fs*2.5 y2=-h/2+fs*(j-1) elseif(j==3)then output="Buf値:"..buf[t3]/ha x2=w/3+fs*2.5 y2=-h/2+fs*(j-1) end if(fs<12)then fs=12 end obj.setfont("ms gothic",fs*0.8,0,col2) obj.load("text",output) obj.draw((x2+fs/2)*ogvz,y2*ogvz,0) end end --------------------------------------- if(ot1==null)then ot1={} end if(ot2==null)then ot2={} end if(result==null)then result={} end if(idx==null)then idx={} end if(obj.frame==(0 or 1))then ot1[al]=0 ot2[al]=0 result[al]=false idx[al]=0 end v0=buf[t3]/ha if(v0>=t1)then result[al]=true ot1[al]=os.clock() idx[al]=idx[al]+1 elseif(v0=div)then t3=div elseif(t3<=1)then t3=1 end ogvz=obj.getvalue("zoom")/100 w=obj.screen_w h=obj.screen_h of=obj.frame otf=obj.totalframe ha=3600/h --------------------------------------- buf={} n=obj.getaudio(buf,"audiobuffer","spectrum",div) --------------------------------------- if(chk2==1)then for i=0,n-1 do if(chk1==0)then obj.load("figure",fig,col1,fs,fl) else obj.setfont("ms gothic",fs*0.8,0,col1,col2) obj.load("text",i+1) end x0=-w/2+w/n*i y0=h/2-buf[i+1]/ha obj.draw((x0+fs/2)*ogvz,y0*ogvz,0) end for i=0,1 do if(i==0)then obj.load("figure","四角形",col2,w*1.1) obj.aspect=-99.8/100 x1=0 y1=h/2-t1 else obj.load("figure","四角形",col2,h*1.1) obj.aspect=99.6/100 x1=-w/2+w/div*(t3-1) y1=0 end obj.draw((x1+fs/2)*ogvz,y1*ogvz,0) end for j=1,3 do if(j==1)then output="基準値:"..t1 x2=-w/2+fs*1.5 y2=h/2-t1+fs/2*j elseif(j==2)then output="Buf番号:"..t3 x2=w/3+fs*2.5 y2=-h/2+fs*(j-1) elseif(j==3)then output="Buf値:"..buf[t3]/ha x2=w/3+fs*2.5 y2=-h/2+fs*(j-1) end if(fs<12)then fs=12 end obj.setfont("ms gothic",fs*0.8,0,col2) obj.load("text",output) obj.draw((x2+fs/2)*ogvz,y2*ogvz,0) end end --------------------------------------- if(ot1==null)then ot1={} end if(ot2==null)then ot2={} end if(result==null)then result={} end if(idx==null)then idx={} end if(obj.frame==(0 or 1))then ot1[al]=0 ot2[al]=0 result[al]=false idx[al]=0 end v0=buf[t3]/ha if(v0>=t1)then result[al]=true ot1[al]=os.clock() idx[al]=idx[al]+1 elseif(v0=div)then t3=div elseif(t3<=1)then t3=1 end ogvz=obj.getvalue("zoom")/100 w=obj.screen_w h=obj.screen_h of=obj.frame otf=obj.totalframe ha=3600/h --------------------------------------- buf={} n=obj.getaudio(buf,"audiobuffer","spectrum",div) --------------------------------------- if(chk2==1)then for i=0,n-1 do if(chk1==0)then obj.load("figure",fig,col1,fs,fl) else obj.setfont("ms gothic",fs*0.8,0,col1,col2) obj.load("text",i+1) end x0=-w/2+w/n*i y0=h/2-buf[i+1]/ha obj.draw((x0+fs/2)*ogvz,y0*ogvz,0) end for i=0,1 do if(i==0)then obj.load("figure","四角形",col2,w*1.1) obj.aspect=-99.8/100 x1=0 y1=h/2-t1 else obj.load("figure","四角形",col2,h*1.1) obj.aspect=99.6/100 x1=-w/2+w/div*(t3-1) y1=0 end obj.draw((x1+fs/2)*ogvz,y1*ogvz,0) end for j=1,3 do if(j==1)then output="基準値:"..t1 x2=-w/2+fs*1.5 y2=h/2-t1+fs/2*j elseif(j==2)then output="Buf番号:"..t3 x2=w/3+fs*2.5 y2=-h/2+fs*(j-1) elseif(j==3)then output="Buf値:"..buf[t3]/ha x2=w/3+fs*2.5 y2=-h/2+fs*(j-1) end if(fs<12)then fs=12 end obj.setfont("ms gothic",fs*0.8,0,col2) obj.load("text",output) obj.draw((x2+fs/2)*ogvz,y2*ogvz,0) end end --------------------------------------- if(ot1==null)then ot1={} end if(ot2==null)then ot2={} end if(result==null)then result={} end if(idx==null)then idx={} end if(obj.frame==(0 or 1))then ot1[al]=0 ot2[al]=0 result[al]=false idx[al]=0 end v0=buf[t3]/ha if(v0>=t1)then result[al]=true ot1[al]=os.clock() idx[al]=idx[al]+1 elseif(v0=div)then t3=div elseif(t3<=1)then t3=1 end ogvz=obj.getvalue("zoom")/100 w=obj.screen_w h=obj.screen_h of=obj.frame otf=obj.totalframe ha=3600/h --------------------------------------- buf={} n=obj.getaudio(buf,"audiobuffer","spectrum",div) --------------------------------------- if(chk2==1)then for i=0,n-1 do if(chk1==0)then obj.load("figure",fig,col1,fs,fl) else obj.setfont("ms gothic",fs*0.8,0,col1,col2) obj.load("text",i+1) end x0=-w/2+w/n*i y0=h/2-buf[i+1]/ha obj.draw((x0+fs/2)*ogvz,y0*ogvz,0) end for i=0,1 do if(i==0)then obj.load("figure","四角形",col2,w*1.1) obj.aspect=-99.8/100 x1=0 y1=h/2-t1 else obj.load("figure","四角形",col2,h*1.1) obj.aspect=99.6/100 x1=-w/2+w/div*(t3-1) y1=0 end obj.draw((x1+fs/2)*ogvz,y1*ogvz,0) end for j=1,3 do if(j==1)then output="基準値:"..t1 x2=-w/2+fs*1.5 y2=h/2-t1+fs/2*j elseif(j==2)then output="Buf番号:"..t3 x2=w/3+fs*2.5 y2=-h/2+fs*(j-1) elseif(j==3)then output="Buf値:"..buf[t3]/ha x2=w/3+fs*2.5 y2=-h/2+fs*(j-1) end if(fs<12)then fs=12 end obj.setfont("ms gothic",fs*0.8,0,col2) obj.load("text",output) obj.draw((x2+fs/2)*ogvz,y2*ogvz,0) end end --------------------------------------- if(ot1==null)then ot1={} end if(ot2==null)then ot2={} end if(result==null)then result={} end if(idx==null)then idx={} end if(obj.frame==(0 or 1))then ot1[al]=0 ot2[al]=0 result[al]=false idx[al]=0 end v0=buf[t3]/ha if(v0>=t1)then result[al]=true ot1[al]=os.clock() idx[al]=idx[al]+1 elseif(v0=div)then t3=div elseif(t3<=1)then t3=1 end ogvz=obj.getvalue("zoom")/100 w=obj.screen_w h=obj.screen_h of=obj.frame otf=obj.totalframe ha=3600/h --------------------------------------- buf={} n=obj.getaudio(buf,"audiobuffer","spectrum",div) --------------------------------------- if(chk2==1)then for i=0,n-1 do if(chk1==0)then obj.load("figure",fig,col1,fs,fl) else obj.setfont("ms gothic",fs*0.8,0,col1,col2) obj.load("text",i+1) end x0=-w/2+w/n*i y0=h/2-buf[i+1]/ha obj.draw((x0+fs/2)*ogvz,y0*ogvz,0) end for i=0,1 do if(i==0)then obj.load("figure","四角形",col2,w*1.1) obj.aspect=-99.8/100 x1=0 y1=h/2-t1 else obj.load("figure","四角形",col2,h*1.1) obj.aspect=99.6/100 x1=-w/2+w/div*(t3-1) y1=0 end obj.draw((x1+fs/2)*ogvz,y1*ogvz,0) end for j=1,3 do if(j==1)then output="基準値:"..t1 x2=-w/2+fs*1.5 y2=h/2-t1+fs/2*j elseif(j==2)then output="Buf番号:"..t3 x2=w/3+fs*2.5 y2=-h/2+fs*(j-1) elseif(j==3)then output="Buf値:"..buf[t3]/ha x2=w/3+fs*2.5 y2=-h/2+fs*(j-1) end if(fs<12)then fs=12 end obj.setfont("ms gothic",fs*0.8,0,col2) obj.load("text",output) obj.draw((x2+fs/2)*ogvz,y2*ogvz,0) end end --------------------------------------- if(ot1==null)then ot1={} end if(ot2==null)then ot2={} end if(result==null)then result={} end if(idx==null)then idx={} end if(obj.frame==(0 or 1))then ot1[al]=0 ot2[al]=0 result[al]=false idx[al]=0 end v0=buf[t3]/ha if(v0>=t1)then result[al]=true ot1[al]=os.clock() idx[al]=idx[al]+1 elseif(v0=div)then t3=div elseif(t3<=1)then t3=1 end ogvz=obj.getvalue("zoom")/100 w=obj.screen_w h=obj.screen_h of=obj.frame otf=obj.totalframe ha=3600/h --------------------------------------- buf={} n=obj.getaudio(buf,"audiobuffer","spectrum",div) --------------------------------------- if(chk2==1)then for i=0,n-1 do if(chk1==0)then obj.load("figure",fig,col1,fs,fl) else obj.setfont("ms gothic",fs*0.8,0,col1,col2) obj.load("text",i+1) end x0=-w/2+w/n*i y0=h/2-buf[i+1]/ha obj.draw((x0+fs/2)*ogvz,y0*ogvz,0) end for i=0,1 do if(i==0)then obj.load("figure","四角形",col2,w*1.1) obj.aspect=-99.8/100 x1=0 y1=h/2-t1 else obj.load("figure","四角形",col2,h*1.1) obj.aspect=99.6/100 x1=-w/2+w/div*(t3-1) y1=0 end obj.draw((x1+fs/2)*ogvz,y1*ogvz,0) end for j=1,3 do if(j==1)then output="基準値:"..t1 x2=-w/2+fs*1.5 y2=h/2-t1+fs/2*j elseif(j==2)then output="Buf番号:"..t3 x2=w/3+fs*2.5 y2=-h/2+fs*(j-1) elseif(j==3)then output="Buf値:"..buf[t3]/ha x2=w/3+fs*2.5 y2=-h/2+fs*(j-1) end if(fs<12)then fs=12 end obj.setfont("ms gothic",fs*0.8,0,col2) obj.load("text",output) obj.draw((x2+fs/2)*ogvz,y2*ogvz,0) end end --------------------------------------- if(ot1==null)then ot1={} end if(ot2==null)then ot2={} end if(result==null)then result={} end if(idx==null)then idx={} end if(obj.frame==(0 or 1))then ot1[al]=0 ot2[al]=0 result[al]=false idx[al]=0 end v0=buf[t3]/ha if(v0>=t1)then result[al]=true ot1[al]=os.clock() idx[al]=idx[al]+1 elseif(v0