oo15ZvUKBYuzhxMWswBtdQmd5b8j9NYb38HH2KZBfGL7sLQSVseGenuary 2023 Day 10 - Generative Music
by carson
- Minted
- 28 / 32
- Published
- 2023-01-11
-- genuary #10 2023
-- generative music
-- by carson kompon
-- fxhash snippet
w=stat(6)s=1
for i=1,#w do
ch=ord(sub(w,i,i))s+=s*31+ch
end
srand(s)
-- init variables & palette
balls={}
size=8+rnd(20)
bounds={size,size,128-size,128-size}
pal({[0]=0,2,3,129,132,136,139,1,4,8,11,140,137,7},1)
-- create note
function make_note(inst,vol,pitch,effect)
b1=pitch+64*(inst%4)
b2=16effect+2vol+flr(inst/4)
return b1,b2
end
-- perc notes
function get_perc(p)
p=p%3
if p==0 then
-- kick
return make_note(0,7,0,3)
elseif p==1 then
-- snare
return make_note(6,7,0,3)
else
--hat
return make_note(6,7,0,5)
end
end
-- create all sfx procedurally
inst=rnd(6)\1
vol=6
effect=rnd({0,0,0,5,5,5,4,4,3})
rootnote=(rnd(12)\1)*(1+rnd(2)\1)
scale={0,2,4,5,7,9,11}
drumdens=2+rnd(8)
drum=0
for i=0,11 do
sfxa=0x3200+(8+i)*68
pitch=rootnote+rnd(scale)
b1,b2=make_note(inst,vol,pitch,effect)
if i%drumdens==0 then
b1,b2=get_perc(drum)
drum+=1
end
poke(sfxa,b1)
poke(sfxa+1,b2)
end
-- ball object
function spawn_ball(x,y,note)
add(balls,{
x=x,y=y,note=note,r=3,
col=9+rnd(4)\1,
hs=rnd(2)-1,
vs=rnd(2)-1,
update=function(self)
xto=self.x+self.hs
yto=self.y+self.vs
if xto<=bounds[1]+self.r then
self.hs=abs(self.hs)
xto+=self.hs
self:play()
elseif xto>=bounds[3]-self.r then
self.hs=-abs(self.hs)
xto+=self.hs
self:play()
end
if yto<=bounds[2]+self.r then
self.vs=abs(self.vs)
yto+=self.vs
self:play()
elseif yto>=bounds[4]-self.r then
self.vs=-abs(self.vs)
yto+=self.vs
self:play()
end
self.x=xto
self.y=yto
circfill(self.x,self.y,self.r,self.col)
end,
play=function(self)
sfx(8+self.note)
end
})
end
-- spawn balls
for i=1,8 do
spawn_ball(
63+rnd(32)-16,
63+rnd(32)-16,
i-1
)
end
cls()
::_::
-- burn the screen >:)
for i=1,200 do
x=rnd(128)
y=rnd(128)
c=pget(x,y)
if(c~=13)c=max(c-4)
circfill(x,y,1,c)
end
-- update balls
for ball in all(balls) do
ball:update()
end
-- draw box
color(13)
line(bounds[1],bounds[2],bounds[3],bounds[2])
line(bounds[3],bounds[2],bounds[3],bounds[4])
line(bounds[1],bounds[4],bounds[3],bounds[4])
line(bounds[1],bounds[2],bounds[1],bounds[4])
flip()
goto _
Project information
- fxhash project ID
- 23517
- Runtime
- fxhash snippet · params: no
- Network
- Tezos
- Token contract
KT1U6EHmNxJTkvaWJ4ThczG4FSDaHC21ssvi- Issuer (mint) contract
KT1BJC12dG17CVvPKJ1VYaNnaT5mzfnUTwXv- Artist addresses
tz1XqJ9e6NdouxdGvm2V3aknwFnGL6Kinu6A- Generator URI
ipfs://QmZtbj32kZxDfaGmvkPDu8hkWNAKKqLLmYiFtpbzcM4n7z
Editions 28
Ownership snapshot 2026-10-07ooZ2XBhbznpjDHBq5iuxN9UrUmQ2pw6MeaAKTmcdNqTajqQGyVEOwner: CoDexter - GENUARY2023
- Token ID
- 1469520
- Minted
- 2023-01-11
oouVf7fWYjFpg73zA2B1mwUBkdz6TsZX5D2DGtkWdsSP7PJwCKkooUhuiMrG1UZnR3rn5PE35dAzx2rr8kbYzSjVcf9AdGhP3Rnt7pooGmkQhsY1eqTLr4pDnZ85BmwMXndkZXPY7ughTQ4qMBePpWsxrOwner: tz1hPyXowqw4uZyMaSCZLVGu4gtumB4DUSHA
- Token ID
- 1469546
- Minted
- 2023-01-11
opZ5KPjhKcLkAuXM2dfBFbSB1KMmoaa51pUZnFG9mmtQddMaD35oneRK4xU7tNBT7kzX82UtFxUh5tiyTGVHgi8NMyuz7BW5TqXE37Owner: tz1Rbk8KFtGBxQA15wjM3AR8daQCVNo1YyAG
- Token ID
- 1469613
- Minted
- 2023-01-11
opZW9VGChnKBVtMUyhACEpP4iLZeLqaQbXfTFfw4XTE5fXQENbCOwner: tz1Rbk8KFtGBxQA15wjM3AR8daQCVNo1YyAG
- Token ID
- 1469632
- Minted
- 2023-01-11
op6oDTMpxAcSrVprSaSRrUB3wXiiNmdSJ2AMkiboh52vq7aPZBSopH35GTD2dHpfFVAqmFmu4emcMNjruTJgJLBsWiDCU7ZderuB5YootFp83T2UGPZrnHgpsEhmT7Xxo1PE8LK3ALbnxJMnhGMBohVZaopMx8WiEgWctpY4GkSESMdVdLD7BTQGc1bUpr5Wi8hpR9GcDjsJoniAe1zs4rvRyyvjD6kvLmGdXsQb7iTQaEGzUUfhVduzvJLgyHooo6Zrff7JkVbgRwSDk4HT8RSZ41tC6UWs1sfxAT6B4mLHYU9aWGopZJtEZ1YEfKx6msWQnaUhuUkdV7urcGgacFDx2ypJAu4tGiA55oovAwrDmU6xaieBxtsV1UacywLoW3Zrk62BnAV4rhX7fdzdci87op1Ko4nU6Gwf1Z8GKwGTReWPZD97reEeijih1JpJTjafwbqECdPop4NdU3ohYK1KdchpiyNBxC4etCfXkxGUKotp6N64UGbwY1yad7onyyvw4VASjHeyqMeTrbodq9ke7oCPArCp7kFbeykZXhczKYPoSookPRXWsQBrYUG9fwaxVDGhqiUKnGM1Bb2HazeohjE4xwiZCo3Woo3cZh2RbYhGBEWozEQA7zPbeFJXQdHBBcGYdxdPXvTa5cPPsXvooBa2uzdUSDimKLejXywZFeBkcLTqi2RCH9GhTdhtVmYVLnnWPSopQm1nsvTEttQaSyonbpaZrQPPec6avKvYDsKKZ8YpRQbJcKfVBopQvPZd76HP8CvMxu7BewXmejr6GcygwdDHpLZFiNyg3h3JttAVRelease
Current mint status and pricing are unavailable. Reload to retry.
Primary minting creates a new edition. This site replays existing editions.
Mint history
- Supply
- 32
- Indexed editions
- 28
- Mint scheduled
- 2023-01-11T00:35:44.000Z
- Primary mints recorded
- 28
- Prices paid at mint
- 1 tez · 28 priced mints
Current mint availability and pricing are shown on fxhash.
Market history
- Secondary trades
- 0
- Recorded volume
- 0 tez / wXTZ
Historical trades; not current asking prices. Summaries refresh within 30 seconds.
Last completed sales index sync
- fx(params) mint tickets
- Block 15275886
- fxhash issuer v1 (first)
- Block 15275886
- fxhash issuer v1
- Block 15275886
- fxhash issuer v2
- Block 15275886
- fxhash issuer fx(params)
- Block 15275886
- fxhash marketplace v2
- Block 15275886
- fxhash marketplace v1
- Block 15275886
- objkt.com marketplace v1
- Block 15275886
- objkt.com English auctions v2
- Block 15275886
- objkt.com marketplace v2
- Block 15275886
- objkt.com English auctions v1
- Block 15275886
- objkt.com marketplace v3.2
- Block 15275886
- objkt.com collection offers
- Block 15275886
- objkt.com English auctions v3
- Block 15275886
- objkt.com marketplace v3.1
- Block 15275886
- objkt.com Dutch auctions v1
- Block 15275886