- mugen Museum
- 33F 習作
- カメ太音頭(テクノ版)
カメ太音頭(テクノ版)
ドリトルで絵と音を同期させる実験
// カメ太音頭(テクノバージョン)
map=[|v s1 e1 s2 e2| s2+(e2-s2)*((v-s1)/(e1-s1))].
slc=[|slc; ary| ary=slc ! "," split. ary! (random(ary! size?)) get].
w=screen!width?. h=screen!height?.
sz=120. xn=ceil(w/sz). yn=ceil(h/sz). ws=sz. hs=sz.
kameta=array! create.
i=0. j=0.
[i=i+1.
[j=j+1.
x=!(j)(1)(xn+1)(w/-2)(w/2) map. y=!(i)(1)(yn+1)(h/2)(h/-2) map.
odoriko=! ("ayumi.png,ayumiRed.png") slc.
kameta! (turtle! create (odoriko) setshape penup (x+sz/2)(y-sz/2) position (1+random(10)/10) scale hide) add.
]! (xn) repeat.
j=0.
]! (yn) repeat.
i1=instrument! (39) create (50) velocity.
i2=instrument! (30) create (40) velocity.
t1=timer! create (1) interval (60) times [
[|i|
(kameta! (i) get)! (45) rightturn show
]! (xn*yn) repeat.
m1="__". [m1=m1+(! "d.e.a,f.g.a" slc)+"2"]! (2) repeat.
m2="". [m2=m2+(! "a,c,b,c,e,d,b,c" slc)+"4"]! (4) repeat.
t1=melody! create (i1) set (m1) add.
t2=melody! create (i2) set (m2) add.
t10=drumSet! create (100) velocity "ど4つ8つ8ど4つ8つ8" add.
band! create (120) tempo (t1)(t2)(t10) add play.
] execute.
https://youtu.be/0wb63zDR43g