@TC時間で画像切替シャッフル kerokero9696 --track0:時間,0,100,3,0.01 --track1:距離,0,4096,100,1 --track2:基準X,0,4096,160,1 --track3:基準Y,0,4096,90,1 --check0:読込情報,0 --dialog:File,file="C:\\UserName\\Picture\\IMG_001.jpg";Seed,sd=1;乱拡大[%],zm=25;フェード/chk,chk4=1;IN,fi=0.50;OUT,fo=0.50;画像サイズ統一/chk,chk1=1;基準[幅or高]/chk,chk2=0;数値入力/chk,chk3=1;統一幅,ww=400;統一高,hh=225;読込予定枚数,inum=100; ---------------------------------------- --正規表現がまだ勉強中で良くわかっていないので、Fileの読み込みが上手くいかないときはBの方を使ってくださいな!また、アドレスに日本語が含まれている場合も同様。 ---------------------------------------- t0=obj.track0 if(t0<=0)then t0=0.01 end t1=obj.track1 t2=obj.track2 t3=obj.track3 ogvz=obj.getvalue("zoom")/100 ot=obj.time ott=obj.totaltime of1=obj.framerate/1000 ct=math.floor(ot%t0*100)/100 sw=obj.screen_w sh=obj.screen_h al=obj.layer if(chk3==0)then ww=sw hh=sh end ---------------------------------------- cidx=math.floor(ot/t0) ---------------------------------------- ptrn1="%w*$" --拡張子取得 ptrn2="[%w|_]*%p%w*$" --filename ptrn2a="%d*$" --filename 数値取得 ptrn3="%w*%p*[%w|%s|%p|_]*\\" --drive&folder f1=string.match(file,ptrn1) --拡張子 f2=string.match(file,ptrn2) --ファイル全体 f2a=string.sub(f2,1,string.len(f2)-4) --ファイル名 f2b=string.match(f2a,ptrn2a) --ファイル名数値 f3=string.match(file,ptrn3) --ドライブ&フォルダ ---------------------------------------- if(flal==null)then flal={} end vv=math.floor(ott/t0)+1 for i=0,vv-1 do flal[i+1]=f2b+i end for i=0,vv-1 do local dest=0 dest=rand(0,vv-1,sd*(-1),i+1) local swap=flal[i+1] flal[i+1]=flal[dest+1] flal[dest+1]=swap end f2b=flal[cidx+1] ---------------------------------------- keta1=string.len(f2b) f2a=string.sub(f2a,1,-keta1-1) keta="%0"..keta1.."d" ff=f3..f2a..string.format(keta,(f2b)).."."..f1 ---------------------------------------- obj.load("image",ff) obj.ox=obj.rand(-t2,t2,sd,cidx*4+20+al) obj.oy=obj.rand(-t3,t3,sd,cidx*5+al) zm=obj.rand(-zm,zm,sd,cidx*3+al)/100*(t0-ct)/t0/2 if(chk4==1)then if(fi>=t0)then fi=t0 end if(fo>=t0)then fo=t0 end if(fi>=ct)then obj.alpha=ct/fi end if(fo>=t0-ct)then obj.alpha=(t0-ct)/fo end end obj.ox=(obj.ox+obj.rand(-t1,t1,sd,cidx+al)*(t0-ct)/t0/2)/ogvz obj.oy=(obj.oy+obj.rand(-t1/1.5,t1/1.5,sd,cidx*2+al)*(t0-ct)/t0/2)/ogvz ow,oh=obj.getpixel() if(chk1==1)then if(chk2==0)then obj.zoom=ww/ow+zm else obj.zoom=hh/oh+zm end end if(obj.check0)then obj.alpha=obj.alpha/2 end obj.effect() obj.draw() ---------------------------------------- if(obj.check0)then obj.setfont("gothic",24,2,0xffffff,0x000000) output="ファイル:"..ff.."\n切替間隔:"..t0.."秒".."\n完了時間"..inum*t0.."秒".."\n移動最大値:"..t1.."\nランダムシード:"..sd.."\n\n画像サイズ"..ow.."x"..oh.."\n統一サイズ"..ww.."x"..hh obj.load("text",output) obj.draw() end ---------------------------------------- @TC時間で画像切替A kerokero9696 --track0:時間,0,100,3,0.01 --track1:距離,0,4096,100,1 --track2:基準X,0,4096,160,1 --track3:基準Y,0,4096,90,1 --check0:読込情報,0 --dialog:File,file="C:\\UserName\\Picture\\IMG_001.jpg";Seed,sd=1000;乱拡大[%],zm=25;フェード/chk,chk4=1;IN,fi=0.50;OUT,fo=0.50;画像サイズ統一/chk,chk1=1;基準[幅or高]/chk,chk2=0;数値入力/chk,chk3=1;統一幅,ww=400;統一高,hh=225;読込予定枚数,inum=100; ---------------------------------------- --正規表現がまだ勉強中で良くわかっていないので、Fileの読み込みが上手くいかないときはBの方を使ってくださいな!また、アドレスに日本語が含まれている場合も同様。 ---------------------------------------- t0=obj.track0 if(t0<=0)then t0=0.01 end t1=obj.track1 t2=obj.track2 t3=obj.track3 ogvz=obj.getvalue("zoom")/100 ot=obj.time ott=obj.totaltime of1=obj.framerate/1000 ct=math.floor(ot%t0*100)/100 sw=obj.screen_w sh=obj.screen_h al=obj.layer if(chk3==0)then ww=sw hh=sh end ---------------------------------------- cidx=math.floor(ot/t0) ---------------------------------------- ptrn1="%w*$" --拡張子取得 ptrn2="[%w|_]*%p%w*$" --filename ptrn2a="%d*$" --filename 数値取得 ptrn3="%w*%p*[%w|%s|%p|_]*\\" --drive&folder f1=string.match(file,ptrn1) --拡張子 f2=string.match(file,ptrn2) --ファイル全体 f2a=string.sub(f2,1,string.len(f2)-4) --ファイル名 f2b=string.match(f2a,ptrn2a) --ファイル名数値 f3=string.match(file,ptrn3) --ドライブ&フォルダ keta1=string.len(f2b) f2a=string.sub(f2a,1,-keta1-1) keta="%0"..keta1.."d" ff=f3..f2a..string.format(keta,(f2b+cidx)).."."..f1 ---------------------------------------- obj.load("image",ff) obj.ox=obj.rand(-t2,t2,sd,cidx*4+20+al) obj.oy=obj.rand(-t3,t3,sd,cidx*5+al) zm=obj.rand(-zm,zm,sd,cidx*3+al)/100*(t0-ct)/t0/2 if(chk4==1)then if(fi>=t0)then fi=t0 end if(fo>=t0)then fo=t0 end if(fi>=ct)then obj.alpha=ct/fi end if(fo>=t0-ct)then obj.alpha=(t0-ct)/fo end end obj.ox=(obj.ox+obj.rand(-t1,t1,sd,cidx+al)*(t0-ct)/t0/2)/ogvz obj.oy=(obj.oy+obj.rand(-t1/1.5,t1/1.5,sd,cidx*2+al)*(t0-ct)/t0/2)/ogvz ow,oh=obj.getpixel() if(chk1==1)then if(chk2==0)then obj.zoom=ww/ow+zm else obj.zoom=hh/oh+zm end end if(obj.check0)then obj.alpha=obj.alpha/2 end obj.effect() obj.draw() ---------------------------------------- if(obj.check0)then obj.setfont("gothic",24,2,0xffffff,0x000000) output="ファイル:"..ff.."\n切替間隔:"..t0.."秒".."\n完了時間"..inum*t0.."秒".."\n移動最大値:"..t1.."\nランダムシード:"..sd.."\n\n画像サイズ"..ow.."x"..oh.."\n統一サイズ"..ww.."x"..hh obj.load("text",output) obj.draw() end ---------------------------------------- @TC時間で画像切替B kerokero9696 --track0:時間,0,100,3.00,0.01 --track1:距離,0,4096,100,1 --track2:基準X,0,4096,160,1 --track3:基準Y,0,4096,90,1 --check0:読込情報,0 --dialog:保存場所,fd="C:\\UserName\\Picture\\";file,fn="001.png";桁数,keta=3;Seed,sd=1000;乱拡大[%],zm=25;フェード/chk,chk4=1;IN,fi=0.50;OUT,fo=0.50;画像サイズ統一/chk,chk1=1;基準[幅or高]/chk,chk2=0;数値入力/chk,chk3=1;統一幅,ww=400;統一高,hh=225;読込予定枚数,inum=100; ---------------------------------------- t0=obj.track0 if(t0<=0)then t0=0.01 end t1=obj.track1 t2=obj.track2 t3=obj.track3 ogvz=obj.getvalue("zoom")/100 ot=obj.time ott=obj.totaltime of1=obj.framerate/1000 ct=math.floor(ot%t0*100)/100 sw=obj.screen_w sh=obj.screen_h al=obj.layer if(chk3==0)then ww=sw hh=sh end ---------------------------------------- cidx=math.floor(ot/t0) ---------------------------------------- f1=string.sub(fn,1,string.len(fn)-4) f2=string.sub(fn,-4) keta="%0"..keta.."d" ff=fd..string.format(keta,f1+cidx)..f2 ---------------------------------------- obj.load("image",ff) obj.ox=obj.rand(-t2,t2,sd,cidx*4+20+al) obj.oy=obj.rand(-t3,t3,sd,cidx*5+al) zm=obj.rand(0,zm,sd,cidx*3+al)/100*(t0-ct)/t0/2 if(chk4==1)then if(fi>=t0)then fi=t0 end if(fo>=t0)then fo=t0 end if(fi>=ct)then obj.alpha=ct/fi end if(fo>=t0-ct)then obj.alpha=(t0-ct)/fo end end obj.ox=(obj.ox+obj.rand(-t1,t1,sd,cidx+al)*(t0-ct)/t0/2)/ogvz obj.oy=(obj.oy+obj.rand(-t1/1.5,t1/1.5,sd,cidx*2+al)*(t0-ct)/t0/2)/ogvz ow,oh=obj.getpixel() if(chk1==1)then if(chk2==0)then obj.zoom=ww/ow+zm else obj.zoom=hh/oh+zm end end if(obj.check0)then obj.alpha=obj.alpha/2 end obj.effect() obj.draw() ---------------------------------------- if(obj.check0)then obj.setfont("gothic",24,2,0xffffff,0x000000) output="ファイル:"..ff.."\n切替間隔:"..t0.."秒".."\n完了時間"..inum*t0.."秒".."\n移動最大値:"..t1.."\nランダムシード:"..sd.."\n\n画像サイズ"..ow.."x"..oh.."\n統一サイズ"..ww.."x"..hh obj.load("text",output) obj.draw() end ---------------------------------------- --[[http://madeinpc.blog50.fc2.com/]]--