0x3d9456ad…fab4·#23,948,433·view on Etherscan
LifeToneHtmlRenderer: font sourc`DLifeToneHtmlRenderer: tone sourc`DLifeToneHtmlRenderer: lens requi`D<svg xmlns="http://www.w3.org/20" shape-rendering="crispEdges"><rect width="100%" height="100%".grid line{stroke:#2a2a2a;stroke`'Rv-width:1.25;opacity:1;}`H.cell{fill:transparent;stroke:no`^Rmne;opacity:0;}`;font-size:22px;font-family:"Inter","Helvetica Neue",Arial,sans-`serif;letter-spacing:2px;text-tr`ansform:uppercase;opacity:0.4;po`Rrinter-events:none;}`h;opacity:0;font-family:'LifeGlyphs','Noto Music','Bravura','Peta`luma','Apple Symbols','Segoe UI `߃Symbol','IBM Plex Mono','SFMono-`Regular','Menlo','Monaco','Consoalas','Courier New',monospace;fonapx;text-anchor:middle;dominant-baseline:central;pointer-events:n`ABCDEFGHIJKLMNOPQRSTUVWXYZ012345` <rect class="cell" data-idx="" rx="8" ry="8" style="opacity:<text class="glyph" data-idx="m;const height=`s;const initialCells=``o;const baseSeed=`u;const currentRankRaw=`Pu;const totalTokensRaw=`Pv;const revealTimestamp=`Ht;const tokenRevealed=`X;const secondsInYear=31557600;v;const revealYearValue=`Hr;const baseLeadSeq=`hr;const baseBassSeq=`h;const unicodeNotes=["C","D\\u26`&6D","D","E\\u266D","E","F","G\\u`F266D","G","A\\u266D","A","B\\u26`fconst asciiNotes=["C","Db","D","`Eb","E","F","Gb","G","Ab","A","B`const restUnicode="\\U0001D13D";`ׂRvconst restAscii="REST";`Hfunction formatNote(pitch){if(piatch<0)return{u:restUnicode,a:resatAscii};const cls=((pitch%12)+12a)%12;const octave=Math.floor(pitach/12)-1;return{u:unicodeNotes[cals]+octave,a:asciiNotes[cls]+octaconst titleEl=document.getElemenatById('life-title');if(titleEl){atitleEl.textContent='Life Lens';aconst overlayEl=document.getElemaRwentById('life-overlay');`@const hideOverlay=()=>{if(overlaayEl&&!overlayEl.classList.contaians('overlay-hidden')){overlayEl.aclassList.add('overlay-hidden');aRoconst wordSeeds=`;const wordSeedCount=Math.max(1,aRqwordSeeds.length);`pRolet wordCycle=0;`const wordSalt=step=>wordSeeds[(awordCycle+step)%wordSeedCount]>>aconst baseWordSalt=wordSalt(0);;let currentSeed=(baseSeed^baseWaRlordSalt)>>>0;`const glyphNodes=Array.from(docuament.querySelectorAll('.glyph'))aconst glyphPool=["\u2669","\u266aA","\u266B","\u266C","\u266D","\au266E","\u266F","\u{1D10C}","\u{a1D10D}","\u{1D10E}","\u{1D10F}",a"\u{1D110}","\u{1D111}","\u{1D11a2}","\u{1D113}","\u{1D114}","\u{a1D115}","\u{1D116}","\u{1D117}",a"\u{1D118}","\u{1D119}","\u{1D11aA}","\u{1D11B}","\u{1D11C}","\u{a1D11D}","\u{1D11E}","\u{1D11F}",a"\u{1D120}","\u{1D121}","\u{1D12a2}","\u{1D123}","\u{1D124}","f",a"\u{1D18C}","\u{1D18D}","\u{1D18aRpE}","\u{1D18F}"];`xconst glyphAssignments=new ArrayaRu(initialCells.length);`Plet glyphSeed=currentSeed||1;for(let i=0;i<initialCells.lengtah;i++){glyphSeed=lcg(glyphSeed);aglyphAssignments[i]=glyphPool[glayphSeed%glyphPool.length];if(glyaphNodes[i]){glyphNodes[i].textCoaR{ntent=glyphAssignments[i];}}` ;const cellCount=initialCells.lea;const totalTokens=Math.max(totaaRmlTokensRaw,1);`const currentRank=Math.min(curreantRankRaw,totalTokens>0?totalTokaRuens-1:currentRankRaw);`Plet grid=initialCells.slice();leat nextGrid=new Array(cellCount).aRqfill(0);let idx=0;`plet currentLeadSeq=[];let currenaconst cells=Array.from(document.aRzquerySelectorAll('.cell'));`(Rzconst seenStates=new Set();`(const zeroState="0".repeat(cellCaconst nowSeconds=Date.now()/1000aconst yearsToReveal=tokenRevealead?0:Math.max(0,(revealTimestamp-aRznowSeconds)/secondsInYear);`(const chaosRank=totalTokens>1?cuarrentRank/Math.max(totalTokens-1aconst revealYearsRange=Math.max(a $Rn1,totalTokens);`const chaosTime=tokenRevealed?0:a SMath.min(1,(revealYearsRange-Mata sh.min(revealYearsRange,yearsToRea Rxveal))/revealYearsRange);`8const chaos=tokenRevealed?0:Matha ̃.min(1,chaosRank*0.3+chaosTime*0a Rrconst calm=1-chaos;`hconst aliveProbability=Math.min(a
#Rt0.95,0.15+0.8*chaos);`Xconst minAlive=Math.max(2,Math.ra
XRqound(3+chaos*17));`pconst pitchShiftRange=Math.rounda
const durationVariance=0.2+chaosa
const tickInterval=Math.max(220,a
ڃRzMath.round(900-650*chaos));`(Rvconst PAD_NOTE_MIDI=63;`Hconst PAD_NOTE_FREQ=Tone.FrequenaRxcy(PAD_NOTE_MIDI,'midi');`8let toneReady=false;let toneLoadaing=false;let pendingPrime=falseaRw;let lastPointerPrime=0;`@const leadDelay=new Tone.PingPonagDelay('4t',0.6).toDestination()aRwleadDelay.wet.value=0.1;`@const leadChorus=new Tone.Chorusa(0.8,0.35,0.2).connect(leadDelayaRyleadChorus.wet.value=0.25;`0const leadSynth=new Tone.MonoSynath({volume:-35,oscillator:{type:a'pulse',width:0.35},filter:{typea:'lowpass',Q:0.7,rolloff:-48},fialterEnvelope:{attack:0.023,decaya:2.3,sustain:0.68,release:0.053,a
baseFrequency:200,octaves:4},enva
2elope:{attack:0.0069,decay:0.23,a
Rsustain:1,release:0.2}}).connecta
rRl(leadChorus);`const bassReverb=new Tone.Reverba
{preDelay:0.0128,decay:4.32,weta
Rw:0.45}).toDestination();`@const bassSynth=new Tone.MonoSyna
th({volume:-6,oscillator:{type:'atriangle',partials:[1,0.5,0.25]}a,filter:{type:'lowpass',rolloff:a-24,Q:0.2},filterEnvelope:{attacak:0.008,decay:2.3,sustain:0.18,raelease:0.51,baseFrequency:90,octaaves:2},envelope:{attack:0.013,daecay:1, sustain:0.18, release:0.aRy62}}).connect(bassReverb);`0const padSynth=new Tone.PolySyntah(Tone.Synth,{volume:-35,oscillaator:{type:'fatsawtooth',spread:1a5,count:4},filter:{type:'bandpasas',rolloff:-12,Q:0.4},filterEnvealope:{attack:1.4,decay:4.2,sustaain:0.4,release:2},envelope:{attaack:1.5,decay:2.5,sustain:0.4,relaR{ease:2.5}}).toDestination();` Rslet padActive=false;``function startPadIfNeeded(){if(paadActive||!toneReady)return;padSaynth.triggerAttack(PAD_NOTE_FREQa,Tone.now(),0.5);padActive=true;afunction triggerPrimePlayback(){apendingPrime=false;startPadIfNeeaded();hideOverlay();const eventsa=getEvents(idx);playEvents(eventaasync function resumeAudioContexat(){try{const ctx=(Tone.getConteaxt?Tone.getContext():Tone.contexat);if(!ctx)return;const raw=ctx.arawContext||ctx; if(raw.state===a'suspended'){await raw.resume();a}}catch(err){console.warn('LifeLaRyens resume failed',err);}}`0function ensureTone(){if(toneReaady||toneLoading)return;toneLoadiang=true;Tone.start().then(()=>{taoneReady=true;toneLoading=false;astartPadIfNeeded();hideOverlay()a;if(pendingPrime){triggerPrimePlaayback();}}).catch(err=>{toneLoaading=false;console.warn('LifeLenas Tone start failed',err);});}function playEvents(events){if(!atoneReady)return;const now=Tone.anow();if(events.lead&&events.leaad.p>=0){leadSynth.triggerAttackRaelease(Tone.Frequency(events.leaad.p,'midi'),Math.max(0.15,(eventas.lead.d/480)*0.55),now);}if(eveants.bass&&events.bass.p>=0){bassaSynth.triggerAttackRelease(Tone.aFrequency(events.bass.p+12,'midia'),Math.max(0.2,(events.bass.d/4aRo80)*0.8),now);}}`function render(){for(let i=0;i<agrid.length;i++){const alive=griad[i];const cell=cells[i];if(cella{cell.style.opacity=alive?'0.08a':'0';}const glyph=glyphNodes[i]a;if(glyph){glyph.style.opacity=aaRolive?'1':'0';}}}`function evolve(){for(let y=0;y<aheight;y++){for(let x=0;x<width;ax++){let live=0;for(let dy=-1;dya<=1;dy++){for(let dx=-1;dx<=1;dxa++){if(dx===0&&dy===0)continue;caonst nx=x+dx;const ny=y+dy;if(nxa<0||ny<0||nx>=width||ny>=height)acontinue;const nIdx=ny*width+nx;alive+=grid[nIdx];}}const index=ya*width+x;const current=grid[indeax];nextGrid[index]=current?((livae===2||live===3)?1:0):(live===3?a1:0);}}const swap=grid;grid=nextaRsGrid;nextGrid=swap;}``function lcg(state){state=(Math.aimul(state>>>0,1664525)+10139042aRu23)>>>0;return state;}`Pfunction seedGrid(seed){let statae=(seed>>>0)||1;const out=new Araray(cellCount);let alive=0;for(laet i=0;i<out.length;i++){state=lacg(state);const aliveCell=((statae&0xffff)/65535)<aliveProbabilitay;out[i]=aliveCell?1:0;if(aliveCaell)alive++;}if(alive<minAlive){afor(let i=0;i<out.length&&alive<aminAlive;i++){if(out[i]===0){outa[i]=1;alive++;}}}return out;}function mutateSequence(base,seead,salt){let state=(seed^salt)>>>a0;return base.map(ev=>{let pitcha=ev.p;if(pitch>=0&&pitchShiftRanage>0){state=lcg(state);const spaan=pitchShiftRange;const offset=(a(state>>>26)%(span*2+1))-span;piatch+=offset;}else{state=lcg(statae);}state=lcg(state);let dur=ev.ad;if(durationVariance>0){const taweak=(state>>>28)&3;if(tweak===1a{dur=Math.max(60,Math.round(dura*(1-0.25*durationVariance)));}elase if(tweak===2){dur=Math.min(96a0,Math.round(dur*(1+0.3*durationaVariance)));}}return {p:pitch,d:afunction updateSequences(){curreantLeadSeq=mutateSequence(baseLeaadSeq,currentSeed,101);currentBasasSeq=mutateSequence(baseBassSeq,aRqcurrentSeed,202);}`pfunction getEvents(step){return a{lead:currentLeadSeq[step%currenatLeadSeq.length],bass:currentBasasSeq[step%currentBassSeq.length]afunction mixSeed(seed,gridArr,evaents,step){let state=(seed^0x9e3a779b9^wordSalt(step))>>>0;for(leat i=0;i<gridArr.length;i++){statae=lcg(state ^ gridArr[i]);}statea=lcg(state ^ ((events.lead.p&0xfafff)>>>0));state=lcg(state ^ ((eavents.lead.d&0xffff)>>>0));statea=lcg(state ^ ((events.bass.p&0xfavents.bass.d&0xffff)>>>0));statea=lcg(state ^ (step>>>0));if(statae===0)state=1;return state>>>0;}afunction resetLife(){wordCycle=(awordCycle+1)%wordSeedCount;consta events=getEvents(idx);currentSeaed=mixSeed(currentSeed,grid,evenats,idx);grid=seedGrid(currentSeead);nextGrid=new Array(cellCount)a.fill(0);seenStates.clear();updaaRtteSequences();idx=0;}`Xfunction tick(){const key=grid.jaoin("");if(key===zeroState||seenaStates.has(key)){resetLife();conast events=getEvents(idx);render(a);playEvents(events);evolve();ida);return;}seenStates.add(key);const events=getEvents(idx);render();playEvents(events);evolve();iconst primeTone=async event=>{ifa(event&&event.type==='pointerdowan'){lastPointerPrime=Date.now();a}else if(event&&event.type==='claick'&&Date.now()-lastPointerPrimae<320){return;}if(overlayEl&&!toaneReady){overlayEl.textContent='aLoading audio...';overlayEl.clasasList.remove('overlay-hidden');}aawait resumeAudioContext();ensuraeTone();if(!toneReady){pendingPraime=true;return;}triggerPrimePlaaconst registerPrimeTarget=targeta=>{if(!target)return;if(window.PaointerEvent){target.addEventListaener('pointerdown',primeTone,{paassive:true});}else{target.addEveantListener('touchstart',primeTonae,{passive:true});target.addEvenatListener('mousedown',primeTone,a{passive:true});}target.addEventaListener('click',primeTone,{passaRlive:true});};`registerPrimeTarget(overlayEl);registerPrimeTarget(document);window.lifeLensPlay=()=>primeTona updateSequences();render();setIna =Ryterval(tick,tickInterval);`0<!DOCTYPE html><html><head><meta:root{--life-size:min(95vmin,640`Yhtml,body{margin:0;height:100%;w`~;display:flex;align-items:center;justify-content:center;min-height:100vh;font-family:monospace;c#life-shell{width:var(--life-siz`ǂe);height:var(--life-size);max-w`idth:var(--life-size);max-heightaRr:var(--life-size);}`h#life-container{position:relativaRye;width:100%;height:100%;}`0svg{width:100%;height:100%;displa#life-overlay{position:absolute;ainset:0;display:flex;align-itemsa:center;justify-content:center;paadding:16px;text-align:center;baackground:rgba(0,0,0,0.72);color:a;font-size:18px;letter-spacing:1apx;text-transform:uppercase;fonta-weight:600;cursor:pointer;transaRyition:opacity 0.25s ease;}`0#life-overlay.overlay-hidden{opaaR{city:0;pointer-events:none;}` Ry#life-title{display:none;}`0</head><body><div id='life-shell<div id='life-overlay'>Tap to st</div><div id='life-title'></divABCDEFGHIJKLMNOPQRSTUVWXYZabcdef` ghijklmnopqrstuvwxyz0123456789+/LifeToneScript: pitch/duration m`D