0x92fb…1600

All memos sent from and to 0x92fb…1600.

// Three More Days by Aaron Penne (2024) const urlParams=new URL(window.location.s`mHash(){for(var r="0x",i=0;i<64;i++){Num=Math.flo :` ()*"0123456789abcdef".lengt ined"==typeof tokenData&&(Id:"5"});let in S6,8`2 /255)),[r,g!else{switch(s=.5<l?d/(2- '@2 r:h=(g-b)/d+(g<b?6:0);break;` ult=[],availab*Each((elem,idx)=>pzephyrBg=["#8F3935!E
_Three More Days_ focuses on three central points of evolving fields of color. Three origins, offering three potential futures: at times synchronized, at times divergent, yet always unique. Color fields burst into existence, then are erased by dark holes tearing through, each void spilling into light that radiates outward. This is a story of death and rebirth. As the artwork constructs and deconstructs itself, the diverging and converging points reveal the ever-evolving possibilities of darkness and light for everyone. Minted for the collection of the Sunderland Culture House in Sunderland, UK.
// 'One More Day' by Aaron Pen (2024) const urlParams=new URLSe(window.location.s`mHash(){for(var r="0x",i=0;i<64;i++){Num=Math.flo :` ()*"0123456789abcdef".lengt ined"==typeof tokenData&&(6,8`2 /255)),[r,g!else{switch(s=.5<l?d/(2- '@2 r:h=(g-b)/d+(g<b?6:0);break;` !/ ult=[],availab*zephyrBg=["#8F3935!P y' by Aaron Pe26 rHX =lerp(.003*:)!=0||infinite?re)#addEventListene)
// 'One More Day' by Aaron Pen (2024) const urlParams=new URLSe(window.location.s`mHash(){for(var r="0x",i=0;i<64;i++){Num=Math.flo :` ()*"0123456789abcdef".lengt ined"==typeof tokenData&&(Id:"18000199"}),6,8`2 /255)),[r,g!else{switch(s=.5<l?d/(2- '@2 r:h=(g-b)/d+(g<b?6:0);break;` !/ ult=[],availab*zephyrBg=["#8F3935!P y' by Aaron Pe2A)!=0||infinite?re)
A renewal, a bright morning, an epiphany. One More Day began in 2021 while anticipating the birth of our child. The artwork has come to represent the joyful expansion of each new day.
A renewal, a bright morning, an epiphany. One More Day began over 2 years prior while anticipating the birth of our child, and has since evolved to represent the unique expansion of each day
/* Zentrum by Herbert W. Franke Written in BASIC in 1982 Translated to JavaScript by Aaron Penne 2023 50 REM PROGRAMM "ZENTRUM" 80 HOME 90 W = - 16336 100 HGR2 110 HCOLOR= 2: GOTO 125 120 HCOLOR= INT ( RND (1) * 5) + 1 125 FOR M = 1 TO 50 126 SOUND = PEEK (W) 127 FOR PAUSE = 1 TO 10: NEXT PAUSE 128 NEXT M 130 N = 0 150 A = INT ( RND (1) * 279) 160 B = INT ( RND (1) * 279) 260 E = INT ( RND (1) * 2) + 2 262 X1 = A + N * E 263 Y1 = 279 - A - N * E 264 Z1 = 95 + N * E 265 Z2 = 95 - N * E 350 IF X1 > 278 THEN GOTO 120 355 IF X1 < 1 THEN GOTO 120 360 IF Y1 > 278 THEN GOTO 120 365 IF Y1 < 1 THEN GOTO 120 370 IF Z1 > 190 THEN GOTO 120 375 IF Z1 < 1 THEN GOTO 120 380 IF Z2 > 190 THEN GOTO 120 385 IF Z2 < 1 THEN GOTO 120 400 HPLOT X1,Z1 TO Y1,Z1 TO Y1,Z2 TO X1,Z2 TO X1,Z1 405 N = N + 1 410 SOUND = PEEK (W) 420 GOTO 262 */ const urlParams=new URLSearchParams(window.location.search);"undefined"==typeof tokenData&&(tokenData={hash:"0x"+Math.floor(1e11*Math.random()+1e11),tokenId:"18000199"}),urlParams.has("hash")&&(tokenData.hash=urlParams.get("hash"));let seed=gs(tokenData.hash);function getDim(){var e=windowWidth,n=windowHeight;return e/appW<n/appH?(cnvW=e,cnvH=e*(appH/appW)):(cnvH=n,cnvW=n*(appW/appH)),[cnvW,cnvH]}function download(){var e=`${document.title.replace(/\s+/g,"_").replace(/[^a-zA-Z0-9_]/g,"")}_${getTimestamp()}_${tokenData.hash}.png`;save(e)}function getTimestamp(){return(new Date).toISOString().replace(/[^T0-9]/g,"").replace("T","_")}function gs(e){return parseInt(tokenData.hash.slice(0,16),16)}function rd(){return seed^=seed<<13,seed^=seed>>17,seed^=seed<<5,(seed<0?1+~seed:seed)%1e3/1e3}function rb(e,n){return e+(n-e)*rd()}function rj(e,n){return rb(e-n,e+n)}function rc(e){return e[Math.floor(rb(0,.99*e.length))]}function rco(e){let t=[];return e.forEach((n,e)=>{for(let e=0;e<n.w;e++)t.push(n)}),rc(t)}function shuffle(n){for(let e=n.length-1;0<e;e--){var t=Math.floor(rd()*(e+1));[n[e],n[t]]=[n[t],n[e]]}}function gj(e,n,t=!1){let o=e.filter(({n:e})=>e==n);return t?(o=o.map(({v:e})=>e),[...o]):o[0]}function hex3to6(e){return 7<=(e="#"!=e[0]?"#"+e:e).length?e:e=e.split("").map(e=>"#"==e?e:e+e).join("")}let cnvW,cnvH,gW,gH,gC;const appW=280,appH=192,gB=.03;let offX,offY,go=!0,toggleIntro=!0,pp={pal:[{w:10,n:"Apple ][",v:["#2A6838","#7F6FFC","#ACBCDE","#111414","#B56742","#3994EE"]},{w:1,n:"Graustufe",v:["#111414","#4F4F4F","#F9F9F9","#808080","#B0B0B0","#D6D6D6"]}]},p={};for(let e in pp)p[e]=rco(pp[e]);for(let e=0;e<p.pal.v.length;e++)p.pal.v[e]=hex3to6(p.pal.v[e]);console.log("Zentrum\nby Herbert W. Franke\n\nWritten in BASIC in 1982\nTranslated to JavaScript by Aaron Penne 2023"),console.log("Token Hash:",tokenData.hash),console.log("Palette: ",p.pal.n),"Apple ]["==p.pal.n?(cG="#2A6838",cP="#7F6FFC",cT="#ACBCDE"):"Graustufe"==p.pal.n&&(cG="#111414",cP="#ffffff",cT="#F9F9F9");let flagsp=[{w:10,n:"Norm",v:!0},{w:8,n:"FS",v:!0},{w:6,n:"Alt OO",v:!0},{w:3,n:"Alt C",v:!0},{w:3,n:"GS",v:!0},{w:3,n:"PS",v:!0},{w:4,n:"FGS",v:!0},{w:4,n:"FPS",v:!0},{w:2,n:"FPG",v:!0},{w:1,n:"Hz Only",v:!0}],flags={w:1,n:"Norm",v:!0},n,a,e,c;rst(),c=p.pal.v[2];let vert=` attribute vec3 aPosition; attribute vec2 aTexCoord; varying vec2 vTexCoord; void main() { vTexCoord = vec2(aTexCoord.x, 1.0 - aTexCoord.y); vec4 positionVec4 = vec4(aPosition, 1.0); positionVec4.xy = positionVec4.xy * 2.0 - 1.0; gl_Position = positionVec4; } `,frag=` #ifdef GL_ES precision mediump float; #endif const float PI = 3.14159; const float MM = 2000.; varying vec2 vTexCoord; uniform sampler2D texture; uniform vec2 iResolution; void main() {vec2 uv = vTexCoord;vec3 c = texture2D(texture, uv).rgb; float sf = cos(PI * (uv.y + 0.008) * MM / 8.); float sc = clamp(0.05 * sf + 0.95, 0.0, 1.0) * 1.2; float sd = cos(PI * uv.x * MM / 3.); float ss = 0.85 + 0.15 * clamp(1.5 * sd, 0.0, 1.0); float cc = sc * ss; c *= cc; gl_FragColor = vec4(c, 1.); } `;function setup(){[cnvW,cnvH]=getDim(),gW=cnvW*(1-2*gB),gH=cnvH*(1-2*gB),gC=Math.round(gW/appW),gW=gC*appW,gH=gC*appH,cnvW=gW+2*gB*cnvW,cnvH=gH+2*gB*cnvH,offX=Math.round((cnvW-gW)/2),offY=Math.round((cnvH-gH)/2),createCanvas(cnvW,cnvH,WEBGL),sh=createShader(vert,frag),shader(sh),pg=createGraphics(cnvW,cnvH),pg.noStroke(),pg.rectMode(CORNERS),pg.strokeCap(PROJECT),frameRate(10),go||noLoop(),background("#111414"),pg.background("#111414"),document.body.style.backgroundColor="#111414",pg.textFont("monospace"),pg.textSize(8*gC),pg.textAlign(CENTER,CENTER);var e=appW/appH,n=innerWidth/innerHeight;let t=document.querySelector("canvas").style;e<n?(t.width=innerHeight*e+"px",t.height=innerHeight+"px"):(t.width=innerWidth+"px",t.height=innerWidth/e+"px")}function draw(){var t,o,g;toggleIntro&&frameCount<40?(pg.push(),pg.fill(cT),pg.text("RUN ZENTRUM",.5*width,.5*height),g=pg.textWidth("RUN ZENTRUM"),frameCount%10<5?(t=.5*width+g/2+5*gC,o=.5*height,pg.fill(cT),pg.rect(t,o-4.2*gC,t+6*gC,o+3*gC)):(o=.5*width+g/2+5*gC,g=.5*height,pg.fill("#111414"),pg.rect(o,g-4.2*gC,o+6*gC,g+3*gC)),pg.pop()):toggleIntro&&40==frameCount&&frameCount<50?pg.background("#111414"):(x1=a+n*e,y1=appH/2-1+n*e,x2=appW-1-a-n*e,y2=appH/2-1-n*e,push(),drawRectangle(x1,y1,x2,y2),pop(),n++,(x1>appW-2||x1<1||y1>appH-2||y1<1||x2>appW-2||x2<1||y2>appH-2||y2<1)&&rst()),sh.setUniform("texture",pg),sh.setUniform("iResolution",[width,height]),rect(0,0,width,height)}function drawRectangle(n,t,o,a){if(n*=gC,t*=gC,o*=gC,a*=gC,pg.push(),pg.translate(offX,offY),pg.noFill(),pg.stroke(c),pg.strokeWeight(1.01*gC),pg.line(n,t,o,t),pg.line(n,a,o,a),"Norm"==flags.n)pg.line(n,t,n,a),pg.line(o,t,o,a);else if("FS"==flags.n){for(let e=0;e<=3;e+=.5)pg.line(n+e*gC,t,n+e*gC,a);pg.line(o,t,o,a)}else if("Alt OO"==flags.n)frameCount%2==0&&pg.line(n,t,n,a),frameCount%2!=0&&pg.line(o,t,o,a);else if("Alt C"==flags.n)frameCount%2==0?(pg.stroke(cP),pg.line(n,t,n,a),pg.stroke(cG)):(pg.stroke(cG),pg.line(n,t,n,a),pg.stroke(cP)),pg.line(o,t,o,a);else if("GS"==flags.n)pg.stroke(cG),pg.line(n,t,n,a),pg.line(o,t,o,a);else if("PS"==flags.n)pg.stroke(cP),pg.line(n,t,n,a),pg.line(o,t,o,a);else if("FGS"==flags.n){pg.stroke(cG);for(let e=0;e<=3;e+=.5)pg.line(n+e*gC,t,n+e*gC,a);pg.line(o,t,o,a)}else if("FPS"==flags.n){pg.stroke(cP);for(let e=0;e<=3;e+=.5)pg.line(n+e*gC,t,n+e*gC,a);pg.line(o,t,o,a)}else if("FPG"==flags.n)for(let e=0;e<=3;e+=.5)pg.stroke(cP),pg.line(n+e*gC,t,n+e*gC,a),pg.stroke(cG),pg.line(o+e*gC,t,o+e*gC,a);else flags.n;pg.pop()}function rst(){n=0,a=Math.floor(279*rd()),e=Math.floor(2*rd())+2,c=rc(p.pal.v),flags=rco(flagsp)}function keyPressed(){"s"==key?download():"r"==key?window.location.reload():"p"==key&&(go=((go?noLoop:loop)(),!go))}function mouseClicked(){mouseY<.5*height?go=((go?noLoop:loop)(),!go):mouseY>.5*height&&download()}
"Receive Transmission" embodies the echoes of Peter Saville's iconic album cover, of Jocelyn Bell Burnell’s discovery of pulsars, and the powerful vibrations of Joy Division's music. Ripples radiate from the central core channeling the spinning pulsar. These stars exhibit symmetry, with two beams extending on either side, similar to a lighthouse's sweep. The composition follows a bending grid, similar to the paper that aided Jocelyn's work. Occasionally this grid is exposed as an overlay, a testament to the barriers confronting women and their ability to overcome them. There is a rhythmic cadence to the artwork, sometimes steady like Stephen Morris' drums or jagged and spontaneous like Ian Curtis' dance. From the distant pulses of a dying star to the timeless grooves on a vinyl record, the artwork encapsulates the endless ripples through time. A transmission received by all who look for it. -- Dame Jocelyn Bell Burnell, the pioneering scientist who discovered pulsars, was the sole woman radio astronomer at Cambridge University in 1967. She helped build a satellite and operated it alone, carefully studying the marks made by a pen across thousands of feet of graph paper. Jocelyn uncovered a mark that should not have been there. This signal, a transmission received from a perished star, continues to traverse time and space to wash our world in radio waves for eons to come. Her discovery was initially overshadowed by her professor's skepticism, who attributed the anomaly to interference or faulty wiring. To validate her intuition that this was a new celestial entity, Jocelyn continued working and discovered a second pulsar. Her work earned a Nobel Prize; however that prize was given to the male heads of her program. In 2018 when Jocelyn was awarded the Special Breakthrough Prize in Fundamental Physics for her pulsar discovery. She promptly donated the $3 million award to the Institute of Physics (IoP) to propel women and other underrepresented groups toward earning PhDs in physics. Her impact as a role model will carry on for generations.
const urlParams=new URLSearchParams(window.location.search);function download(){var e=`receive_transmission_${tokenData.tokenId}_${tokenData.hash}.png`;save(e)}function getTimestamp(){return(new Date).toISOString().replace(/[^T0-9]/g,"").replace("T","_")}"undefined"==typeof tokenData&&(tokenData={hash:"0x"+Math.round(1e12*Math.random()+1e12),tokenId:"18000199"});let debug=!1;urlParams.has("debug")&&(debug=!0),urlParams.has("hash")&&(tokenData.hash=urlParams.get("hash"));let seed=gs(tokenData.hash),aspect=16/9,fill=!1;if(urlParams.has("aspect")){let e=urlParams.get("aspect"),t=parseFloat(e);isNaN(t)||0===t?"fill"===e?fill=!0:console.warn("Invalid aspect ratio provided. Using default ",aspect):aspect=t}function getDim(e=1,t=!1){let n,r;return innerWidth/innerHeight>e?(r=innerHeight,n=r*e):(n=innerWidth,r=n/e),t&&(n=innerWidth,r=innerHeight),{w:n,h:r}}function lerpHex(e,t,n){var r=+e.replace("#","0x"),a=r>>16,e=r>>8&255,r=255&r,t=+t.replace("#","0x");return"#"+((1<<24)+(a+n*((t>>16)-a)<<16)+(e+n*((t>>8&255)-e)<<8)+(r+n*((255&t)-r))|0).toString(16).slice(1)}function hex3to6(e){return 7<=(e="#"!=e[0]?"#"+e:e).length?e:e=e.split("").map(e=>"#"==e?e:e+e).join("")}function lerp(e,t,n){return e*(1-n)+t*n}function mapRng(e,t,n,r,a){return(e-t)/(n-t)*(a-r)+r}function titleCase(t){t=t.toLowerCase().split(" ");for(let e=0;e<t.length;e++)t[e]=t[e].charAt(0).toUpperCase()+t[e].slice(1);return t.join(" ")}function urlP(e){return urlParams.get(e)?lower(urlParams.get(e)):""}function gs(e){return parseInt(tokenData.hash.slice(0,16),16)}function rd(){return seed^=seed<<13,seed^=seed>>17,seed^=seed<<5,(seed<0?1+~seed:seed)%1e3/1e3}function rb(e,t){return e+(t-e)*rd()}function rj(e,t){return rb(e-t,e+t)}function rc(e){return e[Math.floor(rb(0,.99*e.length))]}function rco(e){let n=[];return e.forEach((t,e)=>{for(let e=0;e<t.w;e++)n.push(t)}),rc(n)}function shuffle(t){for(let e=t.length-1;0<e;e--){var n=Math.floor(rd()*(e+1));[t[e],t[n]]=[t[n],t[e]]}}function gj(e,t,n=!1){let r=e.filter(({n:e})=>e==t);return n?(r=r.map(({v:e})=>e),[...r]):r[0]}function linGrad(e,t,n,r,a,o,s=drawingContext){let c=s.createLinearGradient(e,t,n,r);c.addColorStop(0,a),c.addColorStop(1,o),s.fillStyle=c}function mapEase(e,t,n,r,a,o){let s=(e-t)/(n-t);switch(o){case"linear":return r+s*(a-r);case"sineIn":return r+(1-cos(s*PI/2))*(a-r);case"sineOut":return r+sin(s*PI/2)*(a-r);case"sineInOut":return r+(1-cos(PI*s))/2*(a-r);case"quadIn":return r+s*s*(a-r);case"quadOut":return r+s*(2-s)*(a-r);case"quadInOut":return s<.5?r+2*s*s*(a-r):r+(4-2*s)*s*(a-r);case"cubicIn":return r+s*s*s*(a-r);case"cubicOut":return r+--s*s*s*(a-r);case"c":return s<.5?r+4*s*s*s*(a-r):r+--s*s*s*4*(a-r);case"expoIn":return 0===s?r:r+pow(2,10*(s-1))*(a-r);case"expoOut":return 1===s?r+(a-r):r+(1-pow(2,-10*s))*(a-r);case"expoInOut":return 0===s?r:1===s?r+(a-r):(s*=2)<1?r+pow(2,10*(s-1))/2*(a-r):r+(2-pow(2,-10*--s))/2*(a-r);case"expoOutIn":return s<.5?0===s?r:r+(1-pow(2,2*s*-10))/2*(a-r):(s=2*(s-.5),1===s?r+(a-r)/2:r+(pow(2,10*(s-1))/2+.5)*(a-r));default:return r+s*(a-r)}}function rgbToHsl(e,t,n){e/=255,t/=255,n/=255;var r=Math.max(e,t,n),a=Math.min(e,t,n);let o,s,c=(r+a)/2;if(r==a)o=s=0;else{var i=r-a;switch(s=.5<c?i/(2-r-a):i/(r+a),r){case e:o=(t-n)/i+(t<n?6:0);break;case t:o=(n-e)/i+2;break;case n:o=(e-t)/i+4}o/=6}return[o,s,c]}function hslToRgb(e,t,n){let r,a,o;function s(e,t,n){return n<0&&(n+=1),1<n&&--n,n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}return 0==t?r=a=o=n:(t=2*n-(n=n<.5?n*(1+t):n+t-n*t),r=s(t,n,e+1/3),a=s(t,n,e),o=s(t,n,e-1/3)),[255*r,255*a,255*o]}function findLum(e,t=255){var n=e.width,r=e.height;let a=createGraphics(n,r);a.image(e,0,0,n,r);let o=255,s=0;a.loadPixels();for(let e=0;e<a.pixels.length;e+=4){var c=.299*a.pixels[e]+.587*a.pixels[e+1]+.114*a.pixels[e+2];c<o&&(o=c),c>s&&(s=c)}return o=map(o,0,255,0,t),s=map(s,0,255,0,t),a.remove(),{min:o,max:s}}function keyPressed(){"s"==key?download():"r"==key?window.location.reload():"d"==key&&showcaseDebug()}function mouseClicked(){(mouseX<width/2&&mouseY>height/2?download:showcaseDebug)()}function showcaseDebug(){pad=.003,showcase=(showcase+1)%showcaseMax,1===showcase?image(texC,0,0,width,height):image(sA,0,0,width,height,width*pad,height*pad,width*(1-2*pad),height*(1-2*pad))}function varyHSL(e,t,n,r,a="exact"){var o=color(e),s=hue(o),e=saturation(o),o=lightness(o);"jitter"==a&&(t=rj(0,t),n=rj(0,n),r=rj(0,r)),s=(s+t)%360,e=constrain(e+n,0,100),o=constrain(o+r,0,100),push(),colorMode(HSL,360,100,100);o=color(s,e,o);return pop(),o}let cw="#F5F8F8",cb="#050505",zephyrPal=["#4E6E61","#365","#4C3F5D","#336","#358","#45A","#576","#5493B6","#7AC","#89292D","#87A","#8F3935","#A33","#B8513B","#B78","#C54","#C95","#D57C30","#D94","#DA9","#C99","#DEC254"],palette=[{w:5,n:"Cat's Cradle",v:["#45A","#336","#358","#5493B6",cw,cb]},{w:20,n:"Jocelyn",v:[cw,cb,cw]},{w:15,n:"Zephyr",v:zephyrPal},{w:60,n:"Oracle",v:[cb,cw,rc(zephyrPal)],cb:cb,cw:cw},{w:3,n:"Halcyon",v:["#756485","#835061","#9A95A0","#B6A5C8","#9B85A2","#835061","#C58FAD","#BC849E","#883E3F","#BD636E","#CF707D","#703946","#8C495C","#B9627D","#683D4D","#3F2D39","#7F4364","#5E3750","#252830","#4A354F","#3A2D3E","#1E231D","#242525","#212322","#1C211E","#2E272D","#42303D","#26262D","#482F37","#7B4048","#4C3037","#442F35","#A9554E","#9C4E47","#4E282B","#B26A53","#CE7C5D","#884331","#9A605B","#C48A8C","#A06B6A","#714A4F","#A88DB1","#A38AAE","#594662","#B1A9B4","#242525","#212322","#1C211E"]},{w:10,n:"Ian",v:["#000000","#000102","#010101","#020202","#030302","#030303","#040302","#060504","#070707","#080808","#090A08","#0B0D11","#0D0E10","#0E0F10","#0F0E0D","#0F0F0E","#110C05","#111110","#141313","#161616","#171717","#191816","#1A1919","#1A1A1B","#1F2021","#202020","#212021","#23211D","#252424","#2B2522","#2F2D2D","#322E2D","#393633","#3C3837","#3F3C3B","#52504E","#544E4A","#615E5A","#6F6962","#706D67","#786D65","#7F746B","#96958F","#9F9B94","#A09990","#EEE4D9","#EEEAE2","#F4EBE1","#FAF3E8","#FCF6EE","#FDF5EA","#FFFAEF","#060506"]},{w:10,n:"Basil Gogos",v:["#823d65","#83ABAB",cb,"#7A4280",cb,cw]},{w:2,n:"Young Again",v:["#a36aa5","#006eb8","#fcb315","#e31f26",cw,cb]}];baseVertShader=` attribute vec3 aPosition; attribute vec2 aTexCoord; varying vec2 vTexCoord; void main() { vTexCoord = aTexCoord; vec4 positionVec4 = vec4(aPosition, 1.0); positionVec4.xy = positionVec4.xy * 2.0 - 1.0; gl_Position = positionVec4; }`,blurFragShader=` #ifdef GL_ES precision highp float; precision highp int; #endif varying vec2 vTexCoord; uniform sampler2D tex0; uniform vec2 direction; // https://software.intel.com/en-us/blogs/2014/07/15/an-investigation-of-fast-real-time-gpu-based-image-blur-algorithms vec3 gaussianBlur( sampler2D t, vec2 texUV, vec2 stepSize ){ vec3 colOut = vec3( 0.0 ); const int stepCount = 9; float gWeights[stepCount]; gWeights[0] = 0.10855; gWeights[1] = 0.13135; gWeights[2] = 0.10406; gWeights[3] = 0.07216; gWeights[4] = 0.04380; gWeights[5] = 0.02328; gWeights[6] = 0.01083; gWeights[7] = 0.00441; gWeights[8] = 0.00157; float gOffsets[stepCount]; gOffsets[0] = 0.66293; gOffsets[1] = 2.47904; gOffsets[2] = 4.46232; gOffsets[3] = 6.44568; gOffsets[4] = 8.42917; gOffsets[5] = 10.41281; gOffsets[6] = 12.39664; gOffsets[7] = 14.38070; gOffsets[8] = 16.36501; vec2 maxCoord = vec2(1.0, 1.0) - stepSize; vec2 minCoord = stepSize; for( int i = 0; i < stepCount; i++ ){ vec2 texCoordOffset = gOffsets[i] * stepSize; vec2 clampedPos = clamp(texUV + texCoordOffset, minCoord, maxCoord); vec2 clampedNeg = clamp(texUV - texCoordOffset, minCoord, maxCoord); vec3 col = texture2D( t, clampedPos ).xyz + texture2D( t, clampedNeg ).xyz; col *= gWeights[i]; colOut += col; } return colOut; } void main() { vec2 uv = vTexCoord; uv = 1.0 - uv; vec3 blur = gaussianBlur(tex0, uv, .0015 * direction); gl_FragColor = vec4(blur, 1.0); }`,addFragShader=` precision highp float; varying vec2 vTexCoord; uniform sampler2D tex0; uniform sampler2D tex1; void main() { vec4 color0 = texture2D(tex0, vTexCoord); vec4 color1 = texture2D(tex1, vTexCoord); vec4 outputColor = color0 + color1; gl_FragColor = outputColor; } `,subtractFragShader=` precision highp float; varying vec2 vTexCoord; uniform sampler2D tex0; uniform sampler2D tex1; void main() { vec4 color0 = texture2D(tex0, vTexCoord); vec4 color1 = texture2D(tex1, vTexCoord); vec4 outputColor = color1 - color1; gl_FragColor = outputColor; } `,snapFragShader=` precision highp float; varying vec2 vTexCoord; uniform sampler2D tex; uniform float minLum, maxLum; float map(float value, float min1, float max1, float min2, float max2) { return min2 + (value - min1) * (max2 - min2) / (max1 - min1); } void main() { vec2 uv = vTexCoord; uv.y = 1.0 - uv.y; vec3 c = texture2D(tex, uv).rgb; float lum = dot(c, vec3(0.299, 0.587, 0.114)); lum = map(lum, minLum, maxLum, 0., 1.); c = vec3(lum); gl_FragColor = vec4(c, 1.0); }`,colorizeFragShader=` #ifdef GL_ES precision highp float; precision highp int; #endif varying vec2 vTexCoord; uniform sampler2D texA, texB, texC; uniform float fc; float map(float value, float min1, float max1, float min2, float max2) { return min2 + (value - min1) * (max2 - min2) / (max1 - min1); } void main() { vec2 uv = vTexCoord; uv.y = 1.0 - uv.y; vec3 c = vec3(0.); vec3 cA = texture2D(texA, uv).rgb; vec3 cB = texture2D(texB, uv).rgb; float lumA = dot(cA, vec3(0.299, 0.587, 0.114)); float lumB = dot(cB, vec3(0.299, 0.587, 0.114)); float x, y; x = lumA + lumB; y = lumB - lumA; c = texture2D(texC, vec2(lumA, lumB)).rgb; gl_FragColor = vec4(c, 1.0); } `;let showcase=1,showcaseMax=2,dim,dimFixedMin,shBlurHor,shBlurVer,shBlurHorB,shBlurVerB,shColorize,shCombine,shSnapA,shSnapB,s,texC,sA,sB,rrr=rd(),pp={dirHA:[{w:4,n:"XS",v:[0,1]},{w:5,n:"S",v:[0,1.3]},{w:7,n:"M",v:[0,1.6]},{w:8,n:"L",v:[0,2]},{w:2,n:"XL",v:[0,10]},{w:1,n:"XXL",v:[0,20]}],dirVA:[{w:4,n:"XS",v:[1,0]},{w:4,n:"S",v:[1.3,0]}],dirHB:[{w:4,n:"0 Degrees",v:[0,1]},{w:5,n:"30 Degrees",v:[0,1.3]},{w:7,n:"60 Degrees",v:[0,1.6]},{w:8,n:"90 Degrees",v:[0,2]},{w:2,n:"120 Degrees",v:[0,10]},{w:1,n:"180 Degrees",v:[0,20]}],dirVB:[{w:4,n:"30 Degrees",v:[1,0]},{w:4,n:"60 Degrees",v:[1.3,0]}],blurPassesA:[{w:0,n:"None",v:0},{w:6,n:"Light",v:4},{w:3,n:"Medium",v:5},{w:2,n:"Heavy",v:6},{w:1,n:"Extra Heavy",v:8}],blurPassesB:[{w:0,n:"None",v:0},{w:6,n:"Out of Phase",v:4},{w:3,n:"Incremental",v:5},{w:2,n:"In Phase",v:6},{w:1,n:"Locked",v:8}],bands:[{w:1,n:"AM",v:0},{w:50,n:"FM",v:1}],imgAType:[{w:30,n:"Stable",v:"gridWithOffsetCircles"},{w:1,n:"Interference",v:"drawConcentricRects"}],imgBType:[{w:20,n:"Stable",v:"gridWithOffsetCircles"},{w:1,n:"Interference",v:"drawConcentricRects"}],imgCType:[{w:1,n:"Kelly",v:"randomGrid"}],gridded:[{w:10,n:"No",v:!1},{w:1,n:"Yes",v:!0}],pal:palette},p={};for(let e in pp)p[e]=rco(pp[e]);for(let e=0;e<p.pal.v.length;e++)p.pal.v[e]=hex3to6(p.pal.v[e]);function setup(){switch(pixelDensity(2),dim=getDim(aspect,fill),dimFixed={w:800,h:round(800/aspect)},dimFixedMin=min(dimFixed.w,dimFixed.h),createCanvas(dim.w,dim.h),noStroke(),colorMode(HSL,360,100,100,100),rr=rb(9,16),cc=rb(9,26),debug&&console.log("drawing A"),p.imgAType.v){case"gridWithOffsetCircles":sA=drawGridWithOffsetCircles(rr,cc);break;case"drawConcentricRects":sA=drawConcentricRects(rr,cc);break;case"draw3Rects":sA=draw3Rects()}switch(sA.noStroke(),debug&&console.log("drawing B"),p.imgBType.v){case"gridWithOffsetCircles":sB=drawGridWithOffsetCircles(rr,cc);break;case"drawConcentricRects":sB=drawConcentricRects(rr,cc);break;case"draw3Rects":sB=draw3Rects()}sB.noStroke(),debug&&console.log("drawing C"),"randomGrid"===p.imgCType.v&&(texC=drawC_randomGrid()),debug&&(img_a=createGraphics(dim.w/2,dim.h/2),img_b=createGraphics(dim.w/2,dim.h/2),img_a_blur=createGraphics(dim.w/2,dim.h/2),img_b_blur=createGraphics(dim.w/2,dim.h/2),img_a.background(cb),img_b.background(cb),img_a_blur.background(cb),img_b_blur.background(cb)),img_out=createGraphics(dim.w,dim.h),img_out.background(cb),document.body.style.backgroundColor="black",debug&&(console.log("img_a and img_b"),img_a.image(sA,0,0,dim.w/2,dim.h/2),img_b.image(sB,0,0,dim.w/2,dim.h/2));for(let e=0;e<p.blurPassesA.v;e++)sA=blur(sA,shBlurHor,shBlurVer,p.dirHA.v,p.dirVA.v);for(let e=0;e<p.blurPassesB.v;e++)sB=blur(sB,shBlurHorB,shBlurVerB,p.dirHB.v,p.dirVB.v);lumA=findLum(sA,1),sA=snap(sA,shSnapA,lumA.min,lumA.max),lumB=findLum(sB,1),sB=snap(sB,shSnapB,lumB.min,lumB.max),debug&&(img_a_blur.image(sA,0,0,dim.w/2,dim.h/2),img_b_blur.image(sB,0,0,dim.w/2,dim.h/2)),sAFull=createGraphics(dim.w,dim.h,WEBGL),sAFull.translate(-dim.w/2,-dim.h/2),sAFull.image(sA,0,0,dim.w,dim.h),sBFull=createGraphics(dim.w,dim.h,WEBGL),sBFull.translate(-dim.w/2,-dim.h/2),sBFull.image(sB,0,0,dim.w,dim.h),sA=colorize(sAFull,sBFull,texC),img_out.image(sA,0,0,dim.w,dim.h)}function draw(){showcaseDebug(),noLoop()}function drawGridWithOffsetCircles(r,i){var a=dimFixed.w,s=dimFixed.h;let e=createGraphics(a,s,WEBGL);e.colorMode(HSL,360,100,100,100),e.translate(-a/2,-s/2);let t=createGraphics(a,s);t.colorMode(HSL,360,100,100,100),t.background("black"),t.rectMode(CORNERS),t.noStroke(),t.fill("black"),t.rect(0,0,a,s);var n=a/r,d=s/i;let o=0,l=0;rd()<.5&&(t.fill("red"),t.rect(.4*a,0,.6*a,s));for(let e=0;e<r;e++){l=0;var c=n*e/(r-1);for(let e=0;e<i;e++){var h=d*e/(i-1);t.fill("white"),t.triangle(o,l,o,l+h,o+c,l),t.triangle(a-o,l,a-o,l+h,a-o-c,l),t.triangle(o,s-l,o,s-l-h,o+c,s-l),t.triangle(a-o,s-l,a-o,s-l-h,a-o-c,s-l),l+=h}o+=c}return rd()<.5&&(t.fill("blue"),t.rectMode(CENTER),t.rect(a/2,s/2,.02*a,.1*s)),e.image(t,0,0),t.remove(),e}function drawConcentricRects(r,i){var a=dimFixed.w,s=dimFixed.h;let e=createGraphics(a,s,WEBGL);e.colorMode(HSL,360,100,100,100),e.translate(-a/2,-s/2);let t=createGraphics(a,s);t.colorMode(HSL,360,100,100,100),t.background("black"),t.rectMode(CORNERS),t.noStroke(),t.fill("black"),t.rect(0,0,a,s),sw=.001*dimFixedMin*rb(5,10),shadowOffset=.5*sw;var n=a/r,d=s/i;let o=0,l=0;for(let e=0;e<=r;e++){l=0;var c=n*e/(r-1);for(let e=0;e<=i;e++){var h=d*e/(i-1);t.stroke("gray"),t.strokeWeight(sw),t.line(o+shadowOffset,0,o+shadowOffset,s),t.line(a-o-shadowOffset,0,a-o-shadowOffset,s),t.line(0,l+shadowOffset,a,l+shadowOffset),t.line(0,s-l-shadowOffset,a,s-l-shadowOffset),l+=h}o+=c}o=0;for(let e=l=0;e<=r;e++){l=0;var m=n*e/(r-1);for(let e=0;e<=i;e++){var g=d*e/(i-1);t.stroke("white"),t.strokeWeight(sw),t.line(o,0,o,s),t.line(a-o,0,a-o,s),t.line(0,l,a,l),t.line(0,s-l,a,s-l),l+=g}o+=m}return e.image(t,0,0,a,s),t.remove(),e}function drawC_randomGrid(){var e=dimFixed.w,r=dimFixed.h;g3=createGraphics(e,r,WEBGL),g3.colorMode(HSL,360,100,100,100),g3.translate(-e/2,-r/2),g=createGraphics(e,r),g.colorMode(HSL,360,100,100,100),g.background(255),g.noStroke();for(var i=floor(rb(30,50)),a=floor(i*(r/e)),s=e/i,t=r/a,n=i/2,d=a/2,o=0;o<i;o++)for(var l=0;l<a;l++){var c=o*s,h=l*t,m=dist(o,l,n,d),w=Math.min(i,a)/3,w=exp(-.5*pow(m/w,2));p.gridded.v&&(w=.8),col=rd()<w?varyHSL(rc(p.pal.v),5,10,5,"jitter"):varyHSL(cb,0,10,5,"jitter"),g.fill(col),g.rect(c,h,1.1*s,1.1*t)}return g3.image(g,0,0,e,r),g.remove(),g3}function blur(e,r,i,a,s){var t=e.width,n=e.height;return e.shader(r),r.setUniform("tex0",e),r.setUniform("direction",a),r.setUniform("resolution",[t,n]),e.rect(0,0,t,n),e.resetShader(),e.shader(i),i.setUniform("tex0",e),i.setUniform("direction",s),i.setUniform("resolution",[t,n]),e.rect(0,0,t,n),e.resetShader(),e}function snap(e,r,i=0,a=1){var s=e.width,t=e.height;return g=createGraphics(s,t,WEBGL),g.translate(-s/2,-t/2),g.image(e,0,0),g.shader(r),r.setUniform("tex",g),r.setUniform("minLum",i),r.setUniform("maxLum",a),g.rect(0,0,s,t),g.resetShader(),g.remove(),g}function colorize(e,r,i,a=0,s){var t=e.width,n=e.height;return e.shader(shColorize),shColorize.setUniform("texA",e),shColorize.setUniform("texB",r),shColorize.setUniform("texC",i),shColorize.setUniform("fc",frameCount),e.rect(0,0,t,n),e.resetShader(),e}"Oracle"==p.pal.n?p.prophecy={w:1,n:`${p.pal.v[2].replace("#","")}`,v:!0}:p.prophecy={w:1,n:"None",v:!1},p.gridded.v&&(p.imgAType=gj(pp.imgAType,"Interference"),p.blurPassesA=gj(pp.blurPassesA,"None")),console.table("Receive Transmission by Aaron Penne (2023)"),console.log("token id: ",tokenData.tokenId),console.log("token hash: ",tokenData.hash),console.table({Colors:p.pal.n,Bands:p.bands.n,"Data Refinement":p.blurPassesA.n,"Radio Tuning":p.blurPassesB.n,"Horizontal Calibration":p.dirHA.n,"Vertical Calibration":p.dirVA.n,Azimuth:p.dirHB.n,Declination:p.dirVB.n,"Signal A":p.imgAType.n,"Signal B":p.imgBType.n,"Palette Structure":p.imgCType.n,"Graph Paper":p.gridded.n,Prophecy:p.prophecy.n}),shBlurHor=new p5.Shader(this._renderer,baseVertShader,blurFragShader),shBlurVer=new p5.Shader(this._renderer,baseVertShader,blurFragShader),shBlurHorB=new p5.Shader(this._renderer,baseVertShader,blurFragShader),shBlurVerB=new p5.Shader(this._renderer,baseVertShader,blurFragShader),shAdd=new p5.Shader(this._renderer,baseVertShader,addFragShader),shSubtract=new p5.Shader(this._renderer,baseVertShader,subtractFragShader),shSnapA=new p5.Shader(this._renderer,baseVertShader,snapFragShader),shSnapB=new p5.Shader(this._renderer,baseVertShader,snapFragShader),shColorize=new p5.Shader(this._renderer,baseVertShader,colorizeFragShader);
const urlParams=new URLSearchParams(window.location.search);function download(){var e=`receive_transmission_${tokenData.tokenId}_${tokenData.hash}.png`;save(e)}function getTimestamp(){return(new Date).toISOString().replace(/[^T0-9]/g,"").replace("T","_")}"undefined"==typeof tokenData&&(tokenData={hash:"0x"+Math.round(1e12*Math.random()+1e12),tokenId:"18000199"});let debug=!1;urlParams.has("debug")&&(debug=!0),urlParams.has("hash")&&(tokenData.hash=urlParams.get("hash"));let seed=gs(tokenData.hash),aspect=16/9,fill=!1;if(urlParams.has("aspect")){let e=urlParams.get("aspect"),t=parseFloat(e);isNaN(t)||0===t?"fill"===e?fill=!0:console.warn("Invalid aspect ratio provided. Using default ",aspect):aspect=t}function getDim(e=1,t=!1){let n,r;return innerWidth/innerHeight>e?(r=innerHeight,n=r*e):(n=innerWidth,r=n/e),t&&(n=innerWidth,r=innerHeight),{w:n,h:r}}function lerpHex(e,t,n){var r=+e.replace("#","0x"),a=r>>16,e=r>>8&255,r=255&r,t=+t.replace("#","0x");return"#"+((1<<24)+(a+n*((t>>16)-a)<<16)+(e+n*((t>>8&255)-e)<<8)+(r+n*((255&t)-r))|0).toString(16).slice(1)}function hex3to6(e){return 7<=(e="#"!=e[0]?"#"+e:e).length?e:e=e.split("").map(e=>"#"==e?e:e+e).join("")}function lerp(e,t,n){return e*(1-n)+t*n}function mapRng(e,t,n,r,a){return(e-t)/(n-t)*(a-r)+r}function titleCase(t){t=t.toLowerCase().split(" ");for(let e=0;e<t.length;e++)t[e]=t[e].charAt(0).toUpperCase()+t[e].slice(1);return t.join(" ")}function urlP(e){return urlParams.get(e)?lower(urlParams.get(e)):""}function gs(e){return parseInt(tokenData.hash.slice(0,16),16)}function rd(){return seed^=seed<<13,seed^=seed>>17,seed^=seed<<5,(seed<0?1+~seed:seed)%1e3/1e3}function rb(e,t){return e+(t-e)*rd()}function rj(e,t){return rb(e-t,e+t)}function rc(e){return e[Math.floor(rb(0,.99*e.length))]}function rco(e){let n=[];return e.forEach((t,e)=>{for(let e=0;e<t.w;e++)n.push(t)}),rc(n)}function shuffle(t){for(let e=t.length-1;0<e;e--){var n=Math.floor(rd()*(e+1));[t[e],t[n]]=[t[n],t[e]]}}function gj(e,t,n=!1){let r=e.filter(({n:e})=>e==t);return n?(r=r.map(({v:e})=>e),[...r]):r[0]}function linGrad(e,t,n,r,a,o,s=drawingContext){let c=s.createLinearGradient(e,t,n,r);c.addColorStop(0,a),c.addColorStop(1,o),s.fillStyle=c}function mapEase(e,t,n,r,a,o){let s=(e-t)/(n-t);switch(o){case"linear":return r+s*(a-r);case"sineIn":return r+(1-cos(s*PI/2))*(a-r);case"sineOut":return r+sin(s*PI/2)*(a-r);case"sineInOut":return r+(1-cos(PI*s))/2*(a-r);case"quadIn":return r+s*s*(a-r);case"quadOut":return r+s*(2-s)*(a-r);case"quadInOut":return s<.5?r+2*s*s*(a-r):r+(4-2*s)*s*(a-r);case"cubicIn":return r+s*s*s*(a-r);case"cubicOut":return r+--s*s*s*(a-r);case"c":return s<.5?r+4*s*s*s*(a-r):r+--s*s*s*4*(a-r);case"expoIn":return 0===s?r:r+pow(2,10*(s-1))*(a-r);case"expoOut":return 1===s?r+(a-r):r+(1-pow(2,-10*s))*(a-r);case"expoInOut":return 0===s?r:1===s?r+(a-r):(s*=2)<1?r+pow(2,10*(s-1))/2*(a-r):r+(2-pow(2,-10*--s))/2*(a-r);case"expoOutIn":return s<.5?0===s?r:r+(1-pow(2,2*s*-10))/2*(a-r):(s=2*(s-.5),1===s?r+(a-r)/2:r+(pow(2,10*(s-1))/2+.5)*(a-r));default:return r+s*(a-r)}}function rgbToHsl(e,t,n){e/=255,t/=255,n/=255;var r=Math.max(e,t,n),a=Math.min(e,t,n);let o,s,c=(r+a)/2;if(r==a)o=s=0;else{var i=r-a;switch(s=.5<c?i/(2-r-a):i/(r+a),r){case e:o=(t-n)/i+(t<n?6:0);break;case t:o=(n-e)/i+2;break;case n:o=(e-t)/i+4}o/=6}return[o,s,c]}function hslToRgb(e,t,n){let r,a,o;function s(e,t,n){return n<0&&(n+=1),1<n&&--n,n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}return 0==t?r=a=o=n:(t=2*n-(n=n<.5?n*(1+t):n+t-n*t),r=s(t,n,e+1/3),a=s(t,n,e),o=s(t,n,e-1/3)),[255*r,255*a,255*o]}function findLum(e,t=255){var n=e.width,r=e.height;let a=createGraphics(n,r);a.image(e,0,0,n,r);let o=255,s=0;a.loadPixels();for(let e=0;e<a.pixels.length;e+=4){var c=.299*a.pixels[e]+.587*a.pixels[e+1]+.114*a.pixels[e+2];c<o&&(o=c),c>s&&(s=c)}return o=map(o,0,255,0,t),s=map(s,0,255,0,t),a.remove(),{min:o,max:s}}function keyPressed(){"s"==key?download():"r"==key?window.location.reload():"d"==key&&showcaseDebug()}function mouseClicked(){(mouseX<width/2&&mouseY>height/2?download:showcaseDebug)()}function showcaseDebug(){pad=.003,showcase=(showcase+1)%showcaseMax,1===showcase?image(texC,0,0,width,height):image(sA,0,0,width,height,width*pad,height*pad,width*(1-2*pad),height*(1-2*pad))}function varyHSL(e,t,n,r,a="exact"){var o=color(e),s=hue(o),e=saturation(o),o=lightness(o);"jitter"==a&&(t=rj(0,t),n=rj(0,n),r=rj(0,r)),s=(s+t)%360,e=constrain(e+n,0,100),o=constrain(o+r,0,100),push(),colorMode(HSL,360,100,100);o=color(s,e,o);return pop(),o}let cw="#F5F8F8",cb="#050505",zephyrPal=["#4E6E61","#365","#4C3F5D","#336","#358","#45A","#576","#5493B6","#7AC","#89292D","#87A","#8F3935","#A33","#B8513B","#B78","#C54","#C95","#D57C30","#D94","#DA9","#C99","#DEC254"],palette=[{w:5,n:"Cat's Cradle",v:["#45A","#336","#358","#5493B6",cw,cb]},{w:20,n:"Jocelyn",v:[cw,cb,cw]},{w:15,n:"Zephyr",v:zephyrPal},{w:60,n:"Oracle",v:[cb,cw,rc(zephyrPal)],cb:cb,cw:cw},{w:3,n:"Halcyon",v:["#756485","#835061","#9A95A0","#B6A5C8","#9B85A2","#835061","#C58FAD","#BC849E","#883E3F","#BD636E","#CF707D","#703946","#8C495C","#B9627D","#683D4D","#3F2D39","#7F4364","#5E3750","#252830","#4A354F","#3A2D3E","#1E231D","#242525","#212322","#1C211E","#2E272D","#42303D","#26262D","#482F37","#7B4048","#4C3037","#442F35","#A9554E","#9C4E47","#4E282B","#B26A53","#CE7C5D","#884331","#9A605B","#C48A8C","#A06B6A","#714A4F","#A88DB1","#A38AAE","#594662","#B1A9B4","#242525","#212322","#1C211E"]},{w:10,n:"Ian",v:["#000000","#000102","#010101","#020202","#030302","#030303","#040302","#060504","#070707","#080808","#090A08","#0B0D11","#0D0E10","#0E0F10","#0F0E0D","#0F0F0E","#110C05","#111110","#141313","#161616","#171717","#191816","#1A1919","#1A1A1B","#1F2021","#202020","#212021","#23211D","#252424","#2B2522","#2F2D2D","#322E2D","#393633","#3C3837","#3F3C3B","#52504E","#544E4A","#615E5A","#6F6962","#706D67","#786D65","#7F746B","#96958F","#9F9B94","#A09990","#EEE4D9","#EEEAE2","#F4EBE1","#FAF3E8","#FCF6EE","#FDF5EA","#FFFAEF","#060506"]},{w:10,n:"Basil Gogos",v:["#823d65","#83ABAB",cb,"#7A4280",cb,cw]},{w:2,n:"Young Again",v:["#a36aa5","#006eb8","#fcb315","#e31f26",cw,cb]}];baseVertShader=` attribute vec3 aPosition; attribute vec2 aTexCoord; varying vec2 vTexCoord; void main() { vTexCoord = aTexCoord; vec4 positionVec4 = vec4(aPosition, 1.0); positionVec4.xy = positionVec4.xy * 2.0 - 1.0; gl_Position = positionVec4; }`,blurFragShader=` #ifdef GL_ES precision highp float; precision highp int; #endif varying vec2 vTexCoord; uniform sampler2D tex0; uniform vec2 direction; // https://software.intel.com/en-us/blogs/2014/07/15/an-investigation-of-fast-real-time-gpu-based-image-blur-algorithms vec3 gaussianBlur( sampler2D t, vec2 texUV, vec2 stepSize ){ vec3 colOut = vec3( 0.0 ); const int stepCount = 9; float gWeights[stepCount]; gWeights[0] = 0.10855; gWeights[1] = 0.13135; gWeights[2] = 0.10406; gWeights[3] = 0.07216; gWeights[4] = 0.04380; gWeights[5] = 0.02328; gWeights[6] = 0.01083; gWeights[7] = 0.00441; gWeights[8] = 0.00157; float gOffsets[stepCount]; gOffsets[0] = 0.66293; gOffsets[1] = 2.47904; gOffsets[2] = 4.46232; gOffsets[3] = 6.44568; gOffsets[4] = 8.42917; gOffsets[5] = 10.41281; gOffsets[6] = 12.39664; gOffsets[7] = 14.38070; gOffsets[8] = 16.36501; vec2 maxCoord = vec2(1.0, 1.0) - stepSize; vec2 minCoord = stepSize; for( int i = 0; i < stepCount; i++ ){ vec2 texCoordOffset = gOffsets[i] * stepSize; vec2 clampedPos = clamp(texUV + texCoordOffset, minCoord, maxCoord); vec2 clampedNeg = clamp(texUV - texCoordOffset, minCoord, maxCoord); vec3 col = texture2D( t, clampedPos ).xyz + texture2D( t, clampedNeg ).xyz; col *= gWeights[i]; colOut += col; } return colOut; } void main() { vec2 uv = vTexCoord; uv = 1.0 - uv; vec3 blur = gaussianBlur(tex0, uv, .0015 * direction); gl_FragColor = vec4(blur, 1.0); }`,addFragShader=` precision highp float; varying vec2 vTexCoord; uniform sampler2D tex0; uniform sampler2D tex1; void main() { vec4 color0 = texture2D(tex0, vTexCoord); vec4 color1 = texture2D(tex1, vTexCoord); vec4 outputColor = color0 + color1; gl_FragColor = outputColor; } `,subtractFragShader=` precision highp float; varying vec2 vTexCoord; uniform sampler2D tex0; uniform sampler2D tex1; void main() { vec4 color0 = texture2D(tex0, vTexCoord); vec4 color1 = texture2D(tex1, vTexCoord); vec4 outputColor = color1 - color1; gl_FragColor = outputColor; } `,snapFragShader=` precision highp float; varying vec2 vTexCoord; uniform sampler2D tex; uniform float minLum, maxLum; float map(float value, float min1, float max1, float min2, float max2) { return min2 + (value - min1) * (max2 - min2) / (max1 - min1); } void main() { vec2 uv = vTexCoord; uv.y = 1.0 - uv.y; vec3 c = texture2D(tex, uv).rgb; float lum = dot(c, vec3(0.299, 0.587, 0.114)); lum = map(lum, minLum, maxLum, 0., 1.); c = vec3(lum); gl_FragColor = vec4(c, 1.0); }`,colorizeFragShader=` #ifdef GL_ES precision highp float; precision highp int; #endif varying vec2 vTexCoord; uniform sampler2D texA, texB, texC; uniform float fc; float map(float value, float min1, float max1, float min2, float max2) { return min2 + (value - min1) * (max2 - min2) / (max1 - min1); } void main() { vec2 uv = vTexCoord; uv.y = 1.0 - uv.y; vec3 c = vec3(0.); vec3 cA = texture2D(texA, uv).rgb; vec3 cB = texture2D(texB, uv).rgb; float lumA = dot(cA, vec3(0.299, 0.587, 0.114)); float lumB = dot(cB, vec3(0.299, 0.587, 0.114)); float x, y; x = lumA + lumB; y = lumB - lumA; c = texture2D(texC, vec2(lumA, lumB)).rgb; gl_FragColor = vec4(c, 1.0); } `;let showcase=1,showcaseMax=2,dim,dimFixedMin,shBlurHor,shBlurVer,shBlurHorB,shBlurVerB,shColorize,shCombine,shSnapA,shSnapB,s,texC,sA,sB,pp={dirHA:[{w:4,n:"XS",v:[0,1]},{w:5,n:"S",v:[0,1.3]},{w:7,n:"M",v:[0,1.6]},{w:8,n:"L",v:[0,2]},{w:2,n:"XL",v:[0,10]},{w:1,n:"XXL",v:[0,20]}],dirVA:[{w:4,n:"XS",v:[1,0]},{w:4,n:"S",v:[1.3,0]}],dirHB:[{w:4,n:"0 Degrees",v:[0,1]},{w:5,n:"30 Degrees",v:[0,1.3]},{w:7,n:"60 Degrees",v:[0,1.6]},{w:8,n:"90 Degrees",v:[0,2]},{w:2,n:"120 Degrees",v:[0,10]},{w:1,n:"180 Degrees",v:[0,20]}],dirVB:[{w:4,n:"30 Degrees",v:[1,0]},{w:4,n:"60 Degrees",v:[1.3,0]}],blurPassesA:[{w:0,n:"None",v:0},{w:6,n:"Light",v:4},{w:3,n:"Medium",v:5},{w:2,n:"Heavy",v:6},{w:1,n:"Extra Heavy",v:8}],blurPassesB:[{w:0,n:"None",v:0},{w:6,n:"Out of Phase",v:4},{w:3,n:"Incremental",v:5},{w:2,n:"In Phase",v:6},{w:1,n:"Locked",v:8}],bands:[{w:1,n:"AM",v:0},{w:50,n:"FM",v:1}],imgAType:[{w:30,n:"Stable",v:"gridWithOffsetCircles"},{w:1,n:"Interference",v:"drawConcentricRects"}],imgBType:[{w:20,n:"Stable",v:"gridWithOffsetCircles"},{w:1,n:"Interference",v:"drawConcentricRects"}],imgCType:[{w:1,n:"Kelly",v:"randomGrid"}],gridded:[{w:10,n:"No",v:!1},{w:1,n:"Yes",v:!0}],pal:palette},p={};for(let e in pp)p[e]=rco(pp[e]);for(let e=0;e<p.pal.v.length;e++)p.pal.v[e]=hex3to6(p.pal.v[e]);function setup(){switch(pixelDensity(2),dim=getDim(aspect,fill),dimFixed={w:800,h:round(800/aspect)},dimFixedMin=min(dimFixed.w,dimFixed.h),createCanvas(dim.w,dim.h),noStroke(),colorMode(HSL,360,100,100,100),rr=rb(9,16),cc=rb(9,26),debug&&console.log("drawing A"),p.imgAType.v){case"gridWithOffsetCircles":sA=drawGridWithOffsetCircles(rr,cc);break;case"drawConcentricRects":sA=drawConcentricRects(rr,cc);break;case"draw3Rects":sA=draw3Rects()}switch(sA.noStroke(),debug&&console.log("drawing B"),p.imgBType.v){case"gridWithOffsetCircles":sB=drawGridWithOffsetCircles(rr,cc);break;case"drawConcentricRects":sB=drawConcentricRects(rr,cc);break;case"draw3Rects":sB=draw3Rects()}sB.noStroke(),debug&&console.log("drawing C"),"randomGrid"===p.imgCType.v&&(texC=drawC_randomGrid()),debug&&(img_a=createGraphics(dim.w/2,dim.h/2),img_b=createGraphics(dim.w/2,dim.h/2),img_a_blur=createGraphics(dim.w/2,dim.h/2),img_b_blur=createGraphics(dim.w/2,dim.h/2),img_a.background(cb),img_b.background(cb),img_a_blur.background(cb),img_b_blur.background(cb)),img_out=createGraphics(dim.w,dim.h),img_out.background(cb),document.body.style.backgroundColor="black",debug&&(console.log("img_a and img_b"),img_a.image(sA,0,0,dim.w/2,dim.h/2),img_b.image(sB,0,0,dim.w/2,dim.h/2));for(let e=0;e<p.blurPassesA.v;e++)sA=blur(sA,shBlurHor,shBlurVer,p.dirHA.v,p.dirVA.v);for(let e=0;e<p.blurPassesB.v;e++)sB=blur(sB,shBlurHorB,shBlurVerB,p.dirHB.v,p.dirVB.v);lumA=findLum(sA,1),sA=snap(sA,shSnapA,lumA.min,lumA.max),lumB=findLum(sB,1),sB=snap(sB,shSnapB,lumB.min,lumB.max),debug&&(img_a_blur.image(sA,0,0,dim.w/2,dim.h/2),img_b_blur.image(sB,0,0,dim.w/2,dim.h/2)),sAFull=createGraphics(dim.w,dim.h,WEBGL),sAFull.translate(-dim.w/2,-dim.h/2),sAFull.image(sA,0,0,dim.w,dim.h),sBFull=createGraphics(dim.w,dim.h,WEBGL),sBFull.translate(-dim.w/2,-dim.h/2),sBFull.image(sB,0,0,dim.w,dim.h),sA=colorize(sAFull,sBFull,texC),img_out.image(sA,0,0,dim.w,dim.h)}function draw(){showcaseDebug(),noLoop()}function drawGridWithOffsetCircles(r,i){var a=dimFixed.w,s=dimFixed.h;let e=createGraphics(a,s,WEBGL);e.colorMode(HSL,360,100,100,100),e.translate(-a/2,-s/2);let t=createGraphics(a,s);t.colorMode(HSL,360,100,100,100),t.background("black"),t.rectMode(CORNERS),t.noStroke(),t.fill("black"),t.rect(0,0,a,s);var n=a/r,d=s/i;let o=0,l=0;rd()<.5&&(t.fill("red"),t.rect(.4*a,0,.6*a,s));for(let e=0;e<r;e++){l=0;var c=n*e/(r-1);for(let e=0;e<i;e++){var h=d*e/(i-1);t.fill("white"),t.triangle(o,l,o,l+h,o+c,l),t.triangle(a-o,l,a-o,l+h,a-o-c,l),t.triangle(o,s-l,o,s-l-h,o+c,s-l),t.triangle(a-o,s-l,a-o,s-l-h,a-o-c,s-l),l+=h}o+=c}return rd()<.5&&(t.fill("blue"),t.rectMode(CENTER),t.rect(a/2,s/2,.02*a,.1*s)),e.image(t,0,0),t.remove(),e}function drawConcentricRects(r,i){var a=dimFixed.w,s=dimFixed.h;let e=createGraphics(a,s,WEBGL);e.colorMode(HSL,360,100,100,100),e.translate(-a/2,-s/2);let t=createGraphics(a,s);t.colorMode(HSL,360,100,100,100),t.background("black"),t.rectMode(CORNERS),t.noStroke(),t.fill("black"),t.rect(0,0,a,s),sw=.001*dimFixedMin*rb(5,10),shadowOffset=.5*sw;var n=a/r,d=s/i;let o=0,l=0;for(let e=0;e<=r;e++){l=0;var c=n*e/(r-1);for(let e=0;e<=i;e++){var h=d*e/(i-1);t.stroke("gray"),t.strokeWeight(sw),t.line(o+shadowOffset,0,o+shadowOffset,s),t.line(a-o-shadowOffset,0,a-o-shadowOffset,s),t.line(0,l+shadowOffset,a,l+shadowOffset),t.line(0,s-l-shadowOffset,a,s-l-shadowOffset),l+=h}o+=c}o=0;for(let e=l=0;e<=r;e++){l=0;var m=n*e/(r-1);for(let e=0;e<=i;e++){var g=d*e/(i-1);t.stroke("white"),t.strokeWeight(sw),t.line(o,0,o,s),t.line(a-o,0,a-o,s),t.line(0,l,a,l),t.line(0,s-l,a,s-l),l+=g}o+=m}return e.image(t,0,0,a,s),t.remove(),e}function drawC_randomGrid(){var e=dimFixed.w,r=dimFixed.h;g3=createGraphics(e,r,WEBGL),g3.colorMode(HSL,360,100,100,100),g3.translate(-e/2,-r/2),g=createGraphics(e,r),g.colorMode(HSL,360,100,100,100),g.background(255),g.noStroke();for(var i=floor(rb(30,50)),a=floor(i*(r/e)),s=e/i,t=r/a,n=i/2,d=a/2,o=0;o<i;o++)for(var l=0;l<a;l++){var c=o*s,h=l*t,m=dist(o,l,n,d),w=Math.min(i,a)/3,w=exp(-.5*pow(m/w,2));p.gridded.v&&(w=.8),col=rd()<w?varyHSL(rc(p.pal.v),5,10,5,"jitter"):varyHSL(cb,0,10,5,"jitter"),g.fill(col),g.rect(c,h,1.1*s,1.1*t)}return g3.image(g,0,0,e,r),g.remove(),g3}function blur(e,r,i,a,s){var t=e.width,n=e.height;return e.shader(r),r.setUniform("tex0",e),r.setUniform("direction",a),r.setUniform("resolution",[t,n]),e.rect(0,0,t,n),e.resetShader(),e.shader(i),i.setUniform("tex0",e),i.setUniform("direction",s),i.setUniform("resolution",[t,n]),e.rect(0,0,t,n),e.resetShader(),e}function snap(e,r,i=0,a=1){var s=e.width,t=e.height;return g=createGraphics(s,t,WEBGL),g.translate(-s/2,-t/2),g.image(e,0,0),g.shader(r),r.setUniform("tex",g),r.setUniform("minLum",i),r.setUniform("maxLum",a),g.rect(0,0,s,t),g.resetShader(),g.remove(),g}function colorize(e,r,i,a=0,s){var t=e.width,n=e.height;return e.shader(shColorize),shColorize.setUniform("texA",e),shColorize.setUniform("texB",r),shColorize.setUniform("texC",i),shColorize.setUniform("fc",frameCount),e.rect(0,0,t,n),e.resetShader(),e}"Oracle"==p.pal.n?p.prophecy={w:1,n:`${p.pal.v[2].replace("#","")}`,v:!0}:p.prophecy={w:1,n:"None",v:!1},p.gridded.v&&(p.imgAType=gj(pp.imgAType,"Interference"),p.blurPassesA=gj(pp.blurPassesA,"None")),console.table("Receive Transmission by Aaron Penne (2023)"),console.log("token id: ",tokenData.tokenId),console.log("token hash: ",tokenData.hash),console.table({Colors:p.pal.n,Bands:p.bands.n,"Data Refinement":p.blurPassesA.n,"Radio Tuning":p.blurPassesB.n,"Horizontal Calibration":p.dirHA.n,"Vertical Calibration":p.dirVA.n,Azimuth:p.dirHB.n,Declination:p.dirVB.n,"Signal A":p.imgAType.n,"Signal B":p.imgBType.n,"Palette Structure":p.imgCType.n,"Graph Paper":p.gridded.n,Prophecy:p.prophecy.n}),shBlurHor=new p5.Shader(this._renderer,baseVertShader,blurFragShader),shBlurVer=new p5.Shader(this._renderer,baseVertShader,blurFragShader),shBlurHorB=new p5.Shader(this._renderer,baseVertShader,blurFragShader),shBlurVerB=new p5.Shader(this._renderer,baseVertShader,blurFragShader),shAdd=new p5.Shader(this._renderer,baseVertShader,addFragShader),shSubtract=new p5.Shader(this._renderer,baseVertShader,subtractFragShader),shSnapA=new p5.Shader(this._renderer,baseVertShader,snapFragShader),shSnapB=new p5.Shader(this._renderer,baseVertShader,snapFragShader),shColorize=new p5.Shader(this._renderer,baseVertShader,colorizeFragShader);
let av_data=[],av_data_old=[],fps=20,spf=0,spf0=0,spfChord=23,spfChord0=0,fades_a_flag=!0,fades_b_flag=!0,chordPerSec=0,fpsArray=Array(20).fill(fps);urlP("hash")&&66==urlP("hash").length&&(tokenData.hash=urlP("hash"));class Random{constructor(){this.useA=!1;let e=function(e){let n=parseInt(e.substr(0,8),16),t=parseInt(e.substr(8,8),16),a=parseInt(e.substr(16,8),16),o=parseInt(e.substr(24,8),16);return function(){n|=0,t|=0,a|=0,o|=0;let e=(n+t|0)+o|0;return o=o+1|0,n=t^t>>>9,t=a+(a<<3)|0,a=a<<21|a>>>11,a=a+e|0,(e>>>0)/4294967296}};this.prngA=new e(tokenData.hash.substr(2,32)),this.prngB=new e(tokenData.hash.substr(34,32));for(let e=0;e<1e6;e+=2)this.prngA(),this.prngB()}random_dec(){return this.useA=!this.useA,this.useA?this.prngA():this.prngB()}random_num(e,n){return e+(n-e)*this.random_dec()}random_int(e,n){return Math.floor(this.random_num(e,n+1))}random_bool(e){return this.random_dec()<e}random_choice(e){return e[this.random_int(0,e.length-1)]}jitter(e,n){return R.random_num(e-n,e+n)}}let R=new Random,audioRandSeed=R.random_dec();const PARAMS={rotation_mult:.25,positive_space_amt:5,uTCM:0,fadeA:1,fadeB:1,zoomA:1.2,zoomB:.9,colorize:!0,paused:!1};let colorize=PARAMS.colorize,paused=PARAMS.paused;const cnv_scale=2;let show_gui=!0,zIndex="-99",prev_dim={};const average=e=>e.reduce(((e,n)=>e+n))/e.length;function titleCase(e){e=e.toLowerCase().split(" ");for(let n=0;n<e.length;n++)e[n]=e[n].charAt(0).toUpperCase()+e[n].slice(1);return e.join(" ")}function urlP(e){return urlParams=new URLSearchParams(window.location.search),urlParams.get(e)?titleCase(urlParams.get(e)):""}function rco(e){let n=[];return e.forEach(((e,t)=>{for(let t=0;t<e.w;t++)n.push(e)})),R.random_choice(n)}function shuffle(e){for(let n=e.length-1;n>0;n--){const t=Math.floor(R.random_dec()*(n+1));[e[n],e[t]]=[e[t],e[n]]}}function gj(e,n,t=!1){let a=e.filter((({n:e})=>e==n));return t?(a=a.map((({v:e})=>e)),[...a]):a[0]}function hexRgb(e){let n=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);return n?{r:parseInt(n[1],16),g:parseInt(n[2],16),b:parseInt(n[3],16)}:null}function hexV3(e){let n,t=/^\#([A-Fa-f\d]+)$/.exec(e)[1];return 3===t.length?n=[parseInt(t[0]+t[0],16)/255,parseInt(t[1]+t[1],16)/255,parseInt(t[2]+t[2],16)/255]:6===t.length&&(n=[parseInt(t[0]+t[1],16)/255,parseInt(t[2]+t[3],16)/255,parseInt(t[4]+t[5],16)/255]),n}function lerpHex(e,n,t){let a=+e.replace("#","0x"),o=a>>16,r=a>>8&255,i=255&a,u=+n.replace("#","0x");return"#"+((1<<24)+(o+t*((u>>16)-o)<<16)+(r+t*((u>>8&255)-r)<<8)+(i+t*((255&u)-i))|0).toString(16).slice(1)}function hex3to6(e){return"#"!=e[0]&&(e="#"+e),e.length>=7?e:e=e.split("").map((e=>"#"==e?e:e+e)).join("")}function lerp(e,n,t){return e*(1-t)+n*t}function mapRng(e,n,t,a,o){return(e-n)/(t-n)*(o-a)+a}function getDate(e=!1){let n=(new Date).toLocaleString("en-US",{timeZone:"America/Los_Angeles"}),t=new Date(n).getDay(),a=n.split("/");return e?t:a[0]+a[1]}function getDim(){let e={};return e.w_scaled_small=window.innerWidth,e.h_scaled_small=window.innerHeight,e.min_scaled_small=Math.min(e.w_scaled_small,e.h_scaled_small),e.w=e.w_scaled_small*cnv_scale,e.h=e.h_scaled_small*cnv_scale,urlP("dl")&&(console.log("Rendering in HD..."),e.w=5700,e.h=5700),e.min=Math.min(e.w,e.h),e.max=Math.max(e.w,e.h),e}function resize(){dim=getDim(),cnv.width=dim.w,cnv.height=dim.h,cnv.style.width=dim.w_scaled_small+"px",cnv.style.height=dim.h_scaled_small+"px",prev_dim=dim,gl.viewport(0,0,dim.w,dim.h),document.body.style.backgroundColor="#000000"}function keyup(e){"p"==e.key?(paused=!paused,setTimeout((e=>requestAnimationFrame(render)),p.ms.v)):"r"==e.key?location.reload():"s"==e.key?download():"g"==e.key?paused=!1:"c"==e.key?(paused=!1,p.ms=gj(pp.ms,"Conceptual")):"m"==e.key&&(paused=!1,p.ms=gj(pp.ms,"Meditative"))}function download(){let e=document.createElement("a");fn=`passages_${get_timestamp()}_${tokenData.hash}.png`,e.download=fn,e.href=cnv.toDataURL("image/png"),console.log(`Downloading ${fn}`),e.click()}function get_timestamp(){return(new Date).toISOString().replace(/[^T0-9]/g,"").replace("T","_")}function createTex(e,n=!1){const t=e.createTexture();return e.bindTexture(e.TEXTURE_2D,t),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.LINEAR),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,e.LINEAR),n=n?e.CLAMP_TO_EDGE:e.REPEAT,e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,n),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,n),e.pixelStorei(e.UNPACK_ALIGNMENT,1),t}function nearestPowOf2(e){return e|=e>>1,e|=e>>2,e|=e>>4,e|=e>>8,e|=e>>16,(e|=e>>32)-(e>>1)}function loadSvg(e,n){let t=new Image;return t.src="data:image/svg+xml, "+encodeURIComponent(e),t.width=dim.w,t.height=dim.h,t.onload=n,t}function loadSvgs(e,n){let t=[],a=e.length,o=()=>{--a,0===a&&n(t)};for(let n=0;n<a;n++){let a=loadSvg(e[n],o);t.push(a)}}function setupShader(e,n,t,a){if(shader=n.createShader(n.VERTEX_SHADER),n.shaderSource(shader,t),n.compileShader(shader),n.attachShader(e,shader),shader=n.createShader(n.FRAGMENT_SHADER),n.shaderSource(shader,a),n.compileShader(shader),n.attachShader(e,shader),n.linkProgram(e),!n.getProgramParameter(e,n.LINK_STATUS))throw new Error(n.getProgramInfoLog(e));n.useProgram(e);const o=n.getAttribLocation(e,"aPosition"),r=n.getAttribLocation(e,"aTexCoord"),i=n.createBuffer();n.bindBuffer(n.ARRAY_BUFFER,i),n.bufferData(n.ARRAY_BUFFER,Float32Array.of(0,1,0,0,1,1,1,0),n.STATIC_DRAW);const u=n.createBuffer();return n.bindBuffer(n.ARRAY_BUFFER,u),n.bufferData(n.ARRAY_BUFFER,Float32Array.of(0,1,0,0,1,1,1,0),n.STATIC_DRAW),n.useProgram(e),n.enableVertexAttribArray(o),n.bindBuffer(n.ARRAY_BUFFER,i),n.vertexAttribPointer(o,2,n.FLOAT,!1,0,0),n.enableVertexAttribArray(r),n.bindBuffer(n.ARRAY_BUFFER,u),n.vertexAttribPointer(r,2,n.FLOAT,!1,0,0),e}function getPalRgb(e,n,t,a=50,o=cw){let r=[],i=[];for(let t=0;t<e.length-1;t++){numSteps=n[t];for(let n=0;n<numSteps;n++)r.push(lerpHex(e[t],e[t+1],n/numSteps))}r=r.slice(0,333);for(let e=0;e<a;e++)r.push(o);numSteps=5;for(let e=0;e<numSteps;e++)r.push(lerpHex(r[r.length-1],r[0],e/numSteps));return i=[],r.forEach((e=>{cRgb=hexRgb(e),i.push(cRgb.r,cRgb.g,cRgb.b)})),[e,i]}function svgElement(e,n){obj_string="";for(const[e,t]of Object.entries(n))obj_string+=` ${e}="${t}"`;return`<${e} ${obj_string}/>`}function easeOut(e,n,t,a){return-t/2*(Math.cos(Math.PI*e/a)-1)+n}function rT(e,n=5){return parseFloat(e.toFixed(n))}let cw="#F2F3EE",cb="#222222",zephyrPal=["#4E6E61","#365","#4C3F5D","#336","#358","#CCC","#45A","#576","#5493B6","#7AC","#89292D","#87A","#8F3935","#A33","#B8513B","#B78","#C54","#C95","#D57C30","#D94","#DA9","#C99","#DEC254"],palette=[{w:2,n:"Riley",v:["#E8E2D6","#656463","#333","#111","#F3F3EF","#000",cw,cb]},{w:5,n:"Front Row",v:["#336","#5493B6","#89292D","#87A",cw,cb]},{w:3,n:"Halo",v:["#0D4D62","#073542","#12485D","#1C5E78","#175166","#113C4A","#122F3C","#194455","#1F4A5E","#2D3D49","#292E35","#33323C","#413F49","#474651","#666370","#69646F","#443234","#604F54","#5E4849","#5F4244","#83656B","#92747A","#815F62","#6D4544","#815354","#AF7477","#9E5D5D","#BA6D6C","#D18688","#D97472","#E36B67","#C76C67","#F3ACA9","#EFA9A9","#FAC5C8","#E4B5B6","#E6C6C3","#FAECEC","#D9C9C0","#F6F2ED"]},{w:7,n:"Liquid Dusk",v:["#F6DAA8","#B68662","#230D00","#B68662","#BF8C61","#C88F5A","#D19559","#D39959","#D69B55","#E8A557","#EFA953","#E3A64B","#E5BA5C","#EFD171","#E6C96D","#E8CE81","#EBDDAC","#E9E7CE","#ECE3E4","#E4E5E9","#E6E7E1","#F5E3BD","#E7BC6E","#BD7E1F","#B36F1C","#995317","#7F3B0E","#7F4017","#86522A","#895F35","#F2F3EE","#926B40","#A2774C","#BF9469","#9C7347","#784F31","#6A4027","#643A24","#6C4633","#5D3C2B","#2C1609","#F2F3EE","#6D452C","#8E5D35","#B47F49","#D09E61","#DDB67B","#F6DAA8","#D7C499","#E5C384","#BF9D5E","#F2F3EE","#F2F3EE"]},{w:6,n:"Darkness",v:["#111","#656463",cb,"#333",cb,"#000","#454443",cb,"#000","#656463","#313035"]},{w:8,n:"Oracle",v:["#000",R.random_choice(zephyrPal),cb,cw,cb,cw]},{w:5,n:"Young Again",v:["#a36aa5","#006eb8","#fcb315","#e31f26",cw,cb]},{w:1,n:"Squidgit",v:["#7a4456","#c2ae93","#c27544","#762c19",cw,cb]},{w:1,n:"BB",v:["#12354e","#c2ae93","#bb7125","#eea78c",cw,cb]},{w:6,n:"Zephyr",v:[...zephyrPal,cw,cw,cb]},{w:5,n:"Moonpool",v:["#9DADC6","#F2F3EE","#F2F3EE","#6E8FB0","#758EAD","#8495AF","#79859D","#8B97AF","#9DADC6","#F2F3EE","#5D718C","#6D7E98","#7989A2","#8999B2","#8A9BB7","#8099B7","#446584","#42698A","#3C6787","#537696","#F2F3EE","#626169","#F2F3EE","#587794","#496783","#445E79","#4D657F","#5E748C","#72849A","#788596","#394050","#00010F","#71788A","#525F72","#0E1D34","#08172E","#485367","#636B7E","#5A7995","#F2F3EE","#2E4863","#34455F","#1F2B45","#34405A","#687892","#73839D","#1C2A44","#434D66","#5F6680","#1E2841","#F2F3EE","#626169","#4D5973","#606F84","#3E4A5A","#00000B","#626169","#6C809B","#4E627D","#F2F3EE","#F2F3EE"]},{w:1,n:"Dimension",v:["#82FBFF","#83FCF5","#CF77D0","#B376BF","#CA5D94","#A1386D","#BA6775","#C49A9C","#A2B4B1","#42352E","#000000","#3A1C2E","#2D1019","#3F2329","#322200","#653E48","#9C0078","#B7A0A5","#CAB274","#D4EDA6","#80EBFF","#00D7FF","#A7FFF4","#D8D54A","#C1AB5E","#AEC48E","#8AA1B8","#9A408A","#405059","#3C4D47","#280000","#3B3733","#717368","#394B46","#1B2D1E","#0A110D","#231D16","#231D10","#221920","#272027"]},{w:5,n:"Ceremony",v:["#BA3813","#BD3B15","#BE3E16","#C24418","#C94C1A","#BD491A","#BB541D","#CE6924","#D6842E","#CF9637","#E1B93D","#EBCC40","#E9D13F","#89AF54","#7FAE5D","#5E8C56","#599168","#46755B","#40766A","#3D7A72","#356F6F","#2D6167","#26494F","#23444D","#275A6D","#27576D","#224C60","#203945","#203C49","#244A5B","#254755","#2B4954","#2B454B","#314749","#2B3433","#303531","#3F433E","#3F4038","#413E34","#473E32","#4A3E2F","#524131","#3A2B1C"]},{w:7,n:"Laraaji",v:["#F36C32","#D26C62","#D26D62","#DB796A","#D67669","#D56C5C","#D690A4","#DAA6C5","#C98A90","#B9735F","#B4705E","#D37967","#CD7665","#F8DDB1","#F6B692","#F3A684","#F39879","#F6BC93","#F0B385","#F6CAB6","#FADBE0","#F9D5D8","#F5A598","#F49073","#F59980","#EF7E6A","#F28A73","#EF7B69","#F48872","#F3896F","#EF7A67","#F39078","#EF8A75","#D65A59","#F1692E","#F4723B","#D86038","#832110","#DC5525","#F3672C","#F2692E","#F36C32","#F13921","#EE3822","#F03620","#E95127","#D54723","#F34B23","#F1622B","#F36D31","#F3692D","#D65A59"]},{w:5,n:"Awake",v:["#D79837","#D7892E","#CD7D4E","#CD9C83","#455FAF","#0F5AB0","#C9AE98","#E3A336","#DB8F34","#D1946B","#606EAC","#677BB4","#DBAF79","#E7B33D","#E4B266","#9892AF","#A39CA7","#F1E2AA","#E3F2F8",cw,"#EAE3BA",cw,"#E4A336","#DC9542","#E8C870","#EFD97F","#EDC64D","#B85626","#B55229","#C6742E","#C06E4F","#A56633","#CE9055","#D49349","#E4B43B","#B6522C","#C05D26","#C76D26","#C06E44","#C26D38","#CE7F30","#CD843B","#BC6B3E","#BC441B","#B9411D","#A24033","#874B5F","#736295","#4E64B4","#2D60C6","#1857BB","#2055B0"]},{w:5,n:"Stonesteps",v:["#675C7E","#3D7ECD","#3661AD","#13459A","#415AA6","#7A86C5","#6175B6","#5F72BB","#7B90D1","#A2AEDF","#6A759D","#675C7E","#78688E","#6F75A2",cb,"#766285","#835A78","#9C6982","#B1B3D6","#979BC8","#8B82B1","#9674A3","#997092","#9A7384","#A67C7B","#B38A7A","#BB9577","#B7B28B","#9EC9CB","#ABD4E3","#edefe2","#96C0B7","#C0AD84","#BA937A","#AF827E","#A9787B","#A68396","#AB96B2","#BEB4CB","#A995AE","#7868A6","#8B5E82","#2F70B1","#4F4D87","#5A5695","#28428F","#7D7BAB","#8E9DCD","#788ECE","#647CBF","#4261AE","#3D6ABC","#4D73C3","#2F5BB4","#1F50AC","#406DB7","#6B91D5","#3A56AA"]},{w:4,n:"Halcyon",v:["#3F2D39","#9A95A0","#756485","#B6A5C8","#9B85A2","#835061","#C58FAD","#BC849E","#883E3F","#BD636E","#CF707D","#703946","#8C495C","#B9627D","#683D4D","#7F4364","#3F2D39","#5E3750","#252830","#4A354F","#3A2D3E","#1E231D","#242525","#222523","#222423","#212322","#212322","#212322","#9C4E47","#4E282B","#B26A53","#CE7C5D","#884331","#9A605B","#C48A8C","#A06B6A","#714A4F","#A88DB1","#A38AAE","#594662","#B1A9B4"]}],pp={path:[{w:77,n:"Inner",v:!1},{w:15,n:"Earth",v:!1},{w:7,n:"Earth & Sky",v:!0}],ms:[{w:0,n:"Conceptual",v:120},{w:1,n:"Meditative",v:15}],shadow:[{w:18,n:"Sealed",v:!0},{w:1,n:"Open",v:!1}],song:[{w:5,n:"Pathway",v:0},{w:5,n:"Plane",v:1},{w:5,n:"Beyond",v:2},{w:5,n:"Positive Space",v:3},{w:5,n:"Corridor",v:4},{w:5,n:"Flux",v:5},{w:0,n:"Expand",v:6}],chords:[{w:5,n:"I iii IV ii V",v:0},{w:5,n:"ii IV iii IV i",v:1},{w:5,n:"I IV V I V",v:2},{w:5,n:"vi I iii ii I",v:3},{w:5,n:"I IV V I I",v:4},{w:5,n:"vi vi IV iii I",v:5},{w:5,n:"vi I vi ii I",v:6},{w:5,n:"ii iii V vi I",v:7},{w:5,n:"ii V I ii IV",v:8},{w:5,n:"V V I I iii",v:9},{w:5,n:"I ii ii I vi",v:10},{w:1,n:"I ii V vi vii°",v:11}],cRep:[{w:1,n:"Few",v:5},{w:1,n:"Some",v:7},{w:1,n:"Many",v:9}],gtick:[{w:1,n:"True",v:!0},{w:100,n:"False",v:!1}],midnighttick:[{w:1,n:"True",v:!0},{w:100,n:"False",v:!1}],aspectMult:[{w:0,n:"Firefox",v:["uv.xy","uv.xy"]},{w:0,n:"Regular",v:["uv.x","uv.y"]}],prophecy:[{w:1,n:"Chosen",v:"Untold"}],pal:palette},p={};for(let e in pp)p[e]=rco(pp[e]);p.gtick.v&&(p.shadow=gj(pp.shadow,"Open"),p.pal=gj(pp.pal,"Liquid Dusk")),p.midnighttick.v&&(p.shadow=gj(pp.shadow,"Open"),p.pal=gj(pp.pal,"Darkness")),11==p.chords.v&&(p.song=gj(pp.song,"Expand"));for(let e=0;e<p.pal.v.length;e++)p.pal.v[e]=hex3to6(p.pal.v[e]);pal=p.pal.v,palRand=[];for(let e=0;e<p.cRep.v;e++)palRand=palRand.concat(pal);let pal_steps=[];if(palRand.forEach((e=>{pal_steps.push(2*R.random_dec()+1)})),"Oracle"==p.pal.n){let e=gj(pp.pal,"Oracle");e=e.v[1],p.prophecy.v=e.replace("#","")}"Inner"==p.path.n?p.path.a=0:p.path.a=.18;for(let e=0;e<p.pal.v.length;e++)p.pal.v[e]=hex3to6(p.pal.v[e]);console.table(p),-1!=navigator.userAgent.indexOf("Firefox")?p.aspectMult=gj(pp.aspectMult,"Firefox"):p.aspectMult=gj(pp.aspectMult,"Regular");let cnv,dim=getDim();console.log(tokenData.hash);let frameCount=0,main_run_count=0,chordFrameCount=0,chordFrameCountLongA=0,chordFrameCountLongB=0,colorTriggerCount=0,colorCount=0,colorIdx=0,chordDuration=900,chordDurationLongA=400,chordDurationLongB=400,zooms_a=[1.2,1.4],zooms_b=[.9,.75],fades_a=[1,1],fades_b=[1,1],positive_space_amt_positions=[0,10];function svgTemplate(e,n=0){return zoomView=`viewBox="0 0 ${dim.max} ${dim.max}"`,blur_base=.003,fix_blur_clip='x="-50%" y="-50%" width="200%" height="200%"',`\n<svg xmlns="http://www.w3.org/2000/svg" width="${dim.max}" height="${dim.max}" \n${zoomView}\nstroke="black"\nfill="black"\nstroke-width="5"\n>\n\n<filter id="blurMultiple" ${fix_blur_clip}>\n<feGaussianBlur stdDeviation="${rT(dim.min*blur_base*n)}"/>\n</filter> \n\n\n\n<g filter="url(#blurMultiple)" >\n${e}\n</g>\n\n</svg>\n`}function svgEmpty(){return svgTemplate("")}function svgRays(e=5,n=.02,t=.3,a="white",o=!1,r=50,i=1,u=360,l=-dim.max,s=2*dim.max,m=!1,c=0,d=.44){dash=o?rT(Math.hypot(s-l,s-l)/r,5):"";let p=`\n<mask id="donut">\n<rect width="100%" height="100%" fill="black" />\n<circle r="${rT(dim.min*d)}" cx="${rT(dim.max/2)}" cy="${rT(dim.max/2,5)}" fill="white" />\n</mask>`;for(p+='<g mask="url(#donut)">',ray=svgElement("line",{id:"ray",x1:rT(l,5),y1:rT(l,5),x2:rT(s,5),y2:rT(s,5),"stroke-width":rT(dim.max*n,5),"stroke-opacity":t,stroke:a,"stroke-dasharray":dash}),p+=ray,idx=1;idx<e;idx++)p+=`<use href="#ray" transform="rotate(${rT(idx/e*u)}, ${rT(dim.max/2,5)}, ${rT(dim.max/2)})"/>`,m&&(p+=`<use href="#ray" transform="rotate(${180+rT(idx/e*u)}, ${rT(dim.max/2,5)}, ${rT(dim.max/2)})"/>`);return p+="</g>",svgTemplate(p,i)}function svgRayDonut(e=20,n=360,t=20,a=.1,o=.05,r=.1,i="white",u=1,l=.15,s=.4,m=!1,c=!1,d=!1){let p=`\n<mask id="donut">\n<rect width="100%" height="100%" fill="black" />\n<circle r="${rT(dim.min*s)}" cx="${rT(dim.max/2)}" cy="${rT(dim.max/2,5)}" fill="white" />\n</mask>`;for(p+='<g mask="url(#donut)">',c&&(p+=svgElement("rect",{width:"100%",height:"100%",fill:"black","fill-opacity":1})),p+='<g id="ray" >',idx=0;idx<t;idx++)ray=svgElement("line",{x1:rT(dim.max/2-dim.min*a,5),y1:rT(dim.max/2+dim.min*idx/t,5),x2:rT(dim.max/2+dim.min*a,5),y2:rT(dim.max/2+dim.min*idx/t,5),"stroke-width":rT(dim.min*o,5),"stroke-opacity":r,stroke:i}),p+=ray;for(p+="</g>",idx=1;idx<e;idx++)p+=`<use href="#ray" transform="rotate(${rT(idx/e*n)}, ${rT(.5*dim.max)}, ${rT(.5*dim.max)})"/>`;return d&&(p+=svgElement("rect",{width:"100%",height:"100%",fill:"red","fill-opacity":.2})),p+="</g>",m&&(p+=`<radialGradient id="radial${l}" >\n<stop offset="80%" stop-color="#ff000000" />\n<stop offset="100%" stop-color="#ff0000c0" />\n</radialGradient>`,obj={cx:rT(dim.max/2,5),cy:rT(dim.max/2,5),r:rT(dim.min*s,5),stroke:"none",fill:`url('#radial${l}')`,"fill-opacity":1,transform:`rotate(${rT(R.random_num(0,360))}, ${rT(dim.max/2)}, ${rT(dim.max/2)})`},p+=svgElement("circle",obj)),svgTemplate(p,u)}function main(){let e=R.random_choice([[R.random_num(.15,.25),R.random_num(.18,.3),.46]]);raycountAB=2*Math.round(R.random_num(15,35)/2),raycountCD=2*Math.round(R.random_num(20,35)/2),raycountEF=2*Math.round(R.random_num(25,40)/2),numlinesAB=Math.round(R.random_num(5,40)),numlinesCD=Math.round(R.random_num(5,40)),numlinesEF=Math.round(R.random_num(40,40)),widthmultAB=R.random_num(.1,.4),widthmultCD=R.random_num(.2,.5),widthmultEF=R.random_num(.3,.5),strokemultAB=R.random_num(.01,.02),strokemultCD=R.random_num(.01,.028),strokemultEF=R.random_num(.01,.022),svgsTxt=[svgRayDonut(rayCount=raycountAB,degrees=360,num_lines=numlinesAB,widthMult=widthmultAB,strokeMult=strokemultAB,opacity=.1,color="white",blur_amount=1,cutA=-.05,cutB=e[0],shadow=p.shadow.v,bg=!0),svgRayDonut(rayCount=raycountCD,degrees=360,num_lines=numlinesCD,widthMult=widthmultCD,strokeMult=strokemultCD,opacity=.1,color="white",blur_amount=.8,cutA=e[0],cutB=e[1],shadow=p.shadow.v,bg=!0),svgRayDonut(rayCount=raycountEF,degrees=360,num_lines=numlinesEF,widthMult=widthmultEF,strokeMult=strokemultEF,opacity=.1,color="white",blur_amount=1,cutA=e[1],cutB=e[2],shadow=p.shadow.v,bg=!0),svgRayDonut(rayCount=1.5*raycountEF,degrees=360,num_lines=.5*numlinesEF,widthMult=1.2*widthmultEF,strokeMult=strokemultEF,opacity=.12,color="red",blur_amount=1.5,cutA=e[2],cutB=2,bg=!0),svgRayDonut(rayCount=1.5*raycountEF,degrees=360,num_lines=.5*numlinesEF,widthMult=2.1*widthmultEF,strokeMult=1.1*strokemultEF,opacity=.1,color="white",blur_amount=1,cutA=e[2],cutB=2),svgRays(rayCount=Math.round(R.random_num(25,40)),strokeMult=R.random_num(.02,.05),opacity=p.path.a,color="white",dashed=!0,dash_count=R.random_num(80,120),blur_amount=Math.round(R.random_num(1,1.8)),degrees=92.5,start_point=0*dim.max,end_point=.48*dim.max,double=p.path.v),svgEmpty(),svgEmpty(),svgEmpty(),svgEmpty(),svgEmpty(),svgEmpty(),svgEmpty(),svgEmpty(),svgEmpty(),svgEmpty()],loadSvgs(svgsTxt,getProgram),console.log("primary color:",p.pal.v[0])}[p.pal.v,palRgb]=getPalRgb(palRand,pal_steps,p.cRep.v,PARAMS.positive_space_amt),cnv=document.createElement("canvas"),cnv.id="artwork",gl=cnv.getContext("webgl",{antialias:!1,preserveDrawingBuffer:!0}),gl.getExtension("OES_standard_derivatives");let getProgram=e=>{const n=`\n#define PI 3.1415926538\n#ifdef GL_OES_standard_derivatives\n#extension GL_OES_standard_derivatives : enable\n#endif\n\nprecision highp float; \nuniform vec2 uR;\nuniform float uT;\nuniform float uTCM;\nuniform float uFPS;\nuniform bool uColorize;\nuniform float uGuiA;\nuniform float uFadeA;\nuniform float uFadeB;\nuniform float uZoomA;\nuniform float uZoomB;\nuniform sampler2D texPal;\nuniform sampler2D texA;\nuniform sampler2D texB;\nuniform sampler2D texC;\nuniform sampler2D texD;\nuniform sampler2D texE;\nuniform sampler2D texF;\nuniform sampler2D texG;\nuniform sampler2D texH;\nvarying vec2 vTC;\n\nfloat uTC = mod(floor(uT * 60./uFPS), 6531.)/6531.+uTCM;\nfloat uTS = mod(floor(uT * 60./uFPS), 2000.)/2000.;\n\nfloat map(float val, float start1, float stop1, float start2, float stop2) {\nreturn ((val - start1) / (stop1 - start1)) * (stop2 - start2) + start2;\n}\n\nvec4 getSvg(vec2 uv, sampler2D tex) {\nvec4 tx = texture2D(tex, vec2(uv.x, uv.y));\nreturn tx;\n}\n\nvec3 colorize(vec2 uv, vec4 c) {\nvec4 cOut = c;\nfloat cBrightness = (c.r + c.g + c.b) / 3.;\nfloat d = distance(uv, vec2(.0));\n\nvec4 cMapped = texture2D(texPal, vec2(mod(cBrightness+uTC+${R.random_dec()+1e-4}, 1.)));\ncOut = mix(cMapped, vec4(.0), (c.r-c.b)*1.5);\n\nfloat colorizeThreshold = 0.12;\nif (cBrightness < colorizeThreshold) {\ncOut = vec4(.1,.1,.1,1.);\n}\n\n\nreturn vec3(cOut.r, cOut.g, cOut.b);\n}\n\nfloat quadraticInOut(float t) {\nfloat p = 2.0 * t * t;\nreturn t < 0.5 ? p : -p + (4.0 * t) - 1.0;\n}\n\nvec2 zoomCos(vec2 uv, float amp, float phase_offset, float speed) {\nreturn uv * (amp*cos(speed*2.*PI+2.*PI*phase_offset)+1.);\n}\n\nmat2 rot(float a){\na *= 2.*PI;\nreturn mat2(cos(a), -sin(a), sin(a), cos(a));\n}\n\nvec2 rotate(vec2 uv, float amp, float phase_offset, float speed) {\nreturn uv * rot(amp*sin(speed*2.*PI+2.*PI*phase_offset));\n}\n\nvec2 translate(vec2 uv, float amp, float phase_offset, float speed) {\nreturn uv + amp*sin(speed*2.*PI+2.*PI*phase_offset);\n}\n\nvec3 draw(vec2 uv) {\nvec3 c = vec3(0.);\nvec4 cOut = vec4(0., 0., 0., 1.);\n\nvec2 point5 = vec2(0.5);\n\nfloat aspect = uR.x/uR.y;\nif (aspect < 1.) {\n${p.aspectMult.v[0]} *= aspect;\n} else {\n${p.aspectMult.v[1]} *= 1./aspect;\n}\n\nvec2 uvTemp = uv;\nuv *= uZoomA;\nfloat amp = ${R.random_num(.002,.015)};\nfloat phase = ${R.random_dec()}; \nuv = rotate(uv, amp, phase, -uTS);\nvec4 cA = getSvg(uv+.5, texA);\n\nuv = uvTemp;\nuv *= uZoomB;\namp = ${R.random_num(.002,.015)};\nphase = ${R.random_dec()}; \nuv = rotate(uv, amp, phase, -uTS);\nvec4 cB = getSvg(uv+.5, texB);\n\nuv = uvTemp;\namp = ${R.random_num(.002,.015)};\nphase = ${R.random_dec()}; \nuv = rotate(uv, amp, phase, -uTS);\nvec4 cC = getSvg(uv+.5, texC);\n\nuv = uvTemp;\namp = ${R.random_num(.001,.002)};\nphase = ${R.random_dec()}; \nuv = rotate(uv, amp, phase, -uTS);\nvec4 cD = getSvg(uv+.5, texD); \n\nuv = uvTemp;\nuv = rotate(uv, amp, phase, uTS);\nvec4 cE = getSvg(uv+.5, texE); \n\nuv = uvTemp;\nvec4 cF = getSvg(uv+.5, texF); \n\nuv = uvTemp;\namp = ${R.random_num(.001,.006)};\nphase = ${R.random_dec()}; \nuv = rotate(uv, amp, phase, -uTS);\nvec4 cG = getSvg(uv+.5, texG); \n\nuv = uvTemp;\nuv = rotate(uv, amp, phase, uTS);\nvec4 cH = getSvg(uv+.5, texH); \ncOut = mix(cOut, cE, mix(0., cE.a, 1.));\ncOut = mix(cOut, cD, mix(0., cD.a, 1.));\ncOut = mix(cOut, cC, mix(0., cC.a, 1.));\ncOut = mix(cOut, cB, mix(0., cB.a, uFadeB)); \ncOut = mix(cOut, cA, mix(0., cA.a, uFadeA));\n\ncOut = mix(cOut, cF, mix(0., cF.a, 1.));\n\nuv = uvTemp;\n\nc = vec3(cOut.r, cOut.g, cOut.b);\n\nif (uColorize){\nc = colorize(uv, vec4(c,1.));\n} \n\nreturn c;\n}\n\nvoid main() {\nvec2 uv = (gl_FragCoord.xy/uR.xy);\nuv -= .5;\n\nvec3 c = vec3(0.);\nc = draw(uv);\n\nconst vec2 H2=vec2(.5698402909980532,.7548776662466927);\nconst float aa=1.5, ns=8.;\nfloat ps=1./uR.y;\n\nfor(float i=0.;i<ns;i+=1.){\nvec2 d=fract(H2*i+.5)-.5;\nc += draw(uv+d*ps*aa);\n}\nc/=ns;\n\nvec4 col = vec4(c,1.);\n\ngl_FragColor = col;\n\n}\n`;let t=gl.createProgram();t=setupShader(t,gl,"\nprecision highp float;attribute vec2 aPosition;attribute vec2 aTexCoord;varying vec2 vTC;\nvoid main(){vTC=aTexCoord;vec4 p4=vec4(aPosition*2.-1.,0,1.);gl_Position=p4;}\n",n),colorMap=createTex(gl,clamp=!0),gl.texImage2D(gl.TEXTURE_2D,0,gl.RGB,palRgb.length/3,1,0,gl.RGB,gl.UNSIGNED_BYTE,new Uint8Array(palRgb)),textures=[colorMap];for(let n=0;n<e.length;++n)svg=createTex(gl,clamp=!0),gl.texImage2D(gl.TEXTURE_2D,0,gl.RGBA,gl.RGBA,gl.UNSIGNED_BYTE,e[n]),textures.push(svg);for(let e=0;e<textures.length;e++)gl.activeTexture(gl.TEXTURE0+e),gl.bindTexture(gl.TEXTURE_2D,textures[e]);uR=gl.getUniformLocation(t,"uR"),uT=gl.getUniformLocation(t,"uT"),uTCM=gl.getUniformLocation(t,"uTCM"),uFPS=gl.getUniformLocation(t,"uFPS"),uGuiA=gl.getUniformLocation(t,"uGuiA"),uFadeA=gl.getUniformLocation(t,"uFadeA"),uFadeB=gl.getUniformLocation(t,"uFadeB"),uZoomA=gl.getUniformLocation(t,"uZoomA"),uZoomB=gl.getUniformLocation(t,"uZoomB"),uColorize=gl.getUniformLocation(t,"uColorize"),texPal=gl.getUniformLocation(t,"texPal"),texA=gl.getUniformLocation(t,"texA"),texB=gl.getUniformLocation(t,"texB"),texC=gl.getUniformLocation(t,"texC"),texD=gl.getUniformLocation(t,"texD"),texE=gl.getUniformLocation(t,"texE"),texF=gl.getUniformLocation(t,"texF"),texG=gl.getUniformLocation(t,"texG"),texH=gl.getUniformLocation(t,"texH"),gl.uniform1i(texPal,0),gl.uniform1i(texA,1),gl.uniform1i(texB,2),gl.uniform1i(texC,3),gl.uniform1i(texD,4),gl.uniform1i(texE,5),gl.uniform1i(texF,6),gl.uniform1i(texG,7),gl.uniform1i(texH,8),document.body.appendChild(cnv),addEventListener("keyup",keyup),addEventListener("resize",resize),resize(),render(),urlP("dl")&&(paused=!0,download())};function render(){0==av_data[0]&&av_data!=av_data_old&&av_data.length>0&&(fades_a_flag&&chordFrameCountLongA>=chordDurationLongA&&R.random_dec()<.7&&(PARAMS.fadeA<.5?(chordFrameCountLongA=0,chordDurationLongA=fades_a[0]==fades_a[1]?.8*chordDuration:chordDuration*R.random_int(2,4)*.8,fades_a=[0,1]):R.random_dec()<.3&&(chordFrameCountLongA=0,chordDurationLongA=fades_a[0]==fades_a[1]?.8*chordDuration:chordDuration*R.random_int(2,4)*.8,fades_a=[1,0])),fades_b_flag&&chordFrameCountLongB>=chordDurationLongB&&R.random_dec()<.7&&(PARAMS.fadeB<.5?(chordFrameCountLongB=0,chordDurationLongB=fades_b[0]==fades_b[1]?.8*chordDuration:chordDuration*R.random_int(2,4)*.8,fades_b=[0,1]):R.random_dec()<.3&&(chordFrameCountLongB=0,chordDurationLongB=fades_b[0]==fades_b[1]?.8*chordDuration:chordDuration*R.random_int(2,4)*.8,fades_b=[1,0])),colorTriggerCount%2==0?(zooms_a=[1.4,1.2],zooms_b=[.75,.9],positive_space_amt_positions=[0,10]):(zooms_a=[1.2,1.4],zooms_b=[.9,.75],positive_space_amt_positions=[0,10]),colorTriggerCount++,chordFrameCount=0),PARAMS.zoomA=easeOut(chordFrameCount,zooms_a[0],zooms_a[1]-zooms_a[0],chordDuration),PARAMS.zoomB=easeOut(chordFrameCount,zooms_b[0],zooms_b[1]-zooms_b[0],chordDuration),PARAMS.fadeA=easeOut(chordFrameCountLongA,fades_a[0],fades_a[1]-fades_a[0],chordDurationLongA),PARAMS.fadeB=easeOut(chordFrameCountLongB,fades_b[0],fades_b[1]-fades_b[0],chordDurationLongB),PARAMS.fadeC=easeOut(chordFrameCountLongB,fades_b[0],fades_b[1]-fades_b[0],chordDurationLongB),paused=PARAMS.paused,paused&&0!=frameCount||(gl.uniform2f(uR,dim.w,dim.h),gl.uniform1f(uT,frameCount),gl.uniform1f(uTCM,PARAMS.uTCM),gl.uniform1f(uFPS,fps),gl.uniform1f(uGuiA,PARAMS.rotation_mult),gl.uniform1f(uFadeA,PARAMS.fadeA),gl.uniform1f(uFadeB,PARAMS.fadeB),gl.uniform1f(uZoomA,PARAMS.zoomA),gl.uniform1f(uZoomB,PARAMS.zoomB),gl.uniform1f(uColorize,PARAMS.colorize),gl.drawArrays(gl.TRIANGLE_STRIP,0,4),[p.pal.v,palRgb]=getPalRgb(palRand,pal_steps,p.cRep.v,PARAMS.positive_space_amt),gl.texImage2D(gl.TEXTURE_2D,0,gl.RGB,palRgb.length/3,1,0,gl.RGB,gl.UNSIGNED_BYTE,new Uint8Array(palRgb)),gl.bindTexture(gl.TEXTURE_2D,textures[0])),!paused&&av_data.length>0&&(av_data_old=av_data,setTimeout((e=>requestAnimationFrame((()=>{if(render(),frameCount<500){if(!spf0)return spf0=performance.now(),void(fps=30);performance.now()!=spf0&&(spf=(performance.now()-spf0)/1e3),spf0=performance.now(),fpsIdx=frameCount%500,fpsArray[fpsIdx]=1/spf,fps=average(fpsArray),chordDuration=Math.floor(.8*spfChord*fps)}}))),p.ms.v),chordFrameCount<=chordDuration&&av_data.length>0&&chordFrameCount++,chordFrameCountLongA<=chordDurationLongA&&av_data.length>0&&chordFrameCountLongA++,chordFrameCountLongB<=chordDurationLongB&&av_data.length>0&&chordFrameCountLongB++,frameCount++),0==frameCount&&(av_data=[R.random_num(0,1e3)])}
let audioPresets=[[.02,.17,-21.3,5.8,16.8,-20,-60,-10,5.47,9,52.61,514.08,5.43,8.13,1.5,.47,.33,2,35.251,.5926,-12,395.1517,.5071,-23.2,-17.3,.01,1.8,.01,2.3,1.3333,.6,4,2,329,.58,.24,2,64.3403,.4662,1,1383.1598,.4225,.25,.5,-2,2,.0032,.001,.0014,-21.5,.1,5,.5,-1,4,.0044,726.16,1.5,.8,29.5258,.1051,4,1771.6487,.5,2.7468,.03,.12,-10,10.2,15,12,0,1,.25,1,1,.25,.5,.1,.36,0,10,26,8,20,0,32],[.08,.24,-60,8.7,21.6,-11.5,-4.4,-10.2,5.11,13.49,100,590.24,5.6,8.7,5.59,.46,.22,2,14.2103,.1396,-6.98,207.9667,.1999,-15.4,-16.6,.98,2.73,3.35,3.52,.2,0,1,.5,458,.5,.5,1,1072.3497,.4206,2,174.4577,.3413,.5,.5,6,4,9e-4,.001,.0029,-26.4,3.71,12.08,.5,4,4,0,1352.17,1.68,.97,14.6017,.1378,0,0,0,0,.03,.01,-14,8.5,20,9,0,.2,.5,1,.2,0,.85,.5,.41,0,0,0,14,24,25,20],[.08,.24,-60,8.7,21.6,-10.7,-3.5,-10.2,5.11,13.49,100,1352.17,5.6,8.7,5.59,.46,.22,2,10,.1516,-6.98,207.9667,.1999,-13.5,-15.2,.98,2.73,3.35,3.52,.2,0,1,.5,458,.5,.5,1,1072.3497,.4206,2,174.4577,.3413,.5,.5,6,4,.0015,.001,.0029,-26.4,3.71,12.08,.5,4,4,0,1352.17,1.68,.97,14.6017,.1378,0,0,0,0,.03,.01,-14,8.5,20,10,0,.2,.5,1,.2,0,.85,.5,.41,0,0,0,14,24,25,20],[.08,.24,-25.3,5,28.2,-30.3,-60,4.1,4.21,7.32,100,2e3,1.5,6,1.5,.45,.33,2,45.7762,.6282,-12,392.8229,.3784,-14.8,-13.5,.01,1.8,.01,2.3,1.3333,.6,.5,2,391,.23,.19,2,345.6608,.2689,0,0,0,.5,.5,13,12,.0035,.0045,.0041,-19.8,4.27,5,1,6,2,.0044,447.74,1.5,7.01,18.2275,.5788,0,0,0,0,.02,.15,-14,7.7,6,10,0,1,.25,1,1,.25,.5,4.2,.33,1,7,16,20,19,15,26],[.08,.24,-24.7,8.7,21.6,-10.4,-60,-5,3.66,7.18,100,2e4,1.5,6,1.5,.45,.33,4,1200,.5,-12,216.2127,.3022,-20.5,-16.7,.01,1.8,.01,2.3,.2,.6,.5,4,329,.52,.39,2,158.9157,.3232,0,0,0,.5,.25,0,1,.0026,.001,.0015,-60,.1,5,1,-3,.5,.0016,957.26,1.5,.8,33.4396,.4727,0,0,0,0,.02,.01,-15,9.2,3,9,.55,.5,.5,.49,.2,.33,.5,.1,.4,0,5,14,0,17,0,40],[.08,.24,-24.1,8.7,21.6,-10.4,-60,-5,3.66,7.18,100,10740.6396,3.87,10.25,1.5,.45,.33,4,1200,.5,-12,188.9513,.1,-18,-17.6,.01,1.8,.01,2.3,.2,.6,.5,4,329,.52,.39,2,158.9157,.3232,0,0,0,.5,.25,0,1,.0026,.001,.0015,-60,.1,5,1,-3,.5,.0016,957.26,1.5,.8,33.4396,.4727,0,0,0,0,.02,.01,-15,9.2,3,9,.55,.5,.5,.49,.2,.33,.5,.1,.4,0,15,5,8,17,0,40],[.08,.24,-24.6,6.8,21.6,-10.4,-60,-5,3.66,7.18,100,2e4,1.5,6,1.5,.45,.33,4,1200,.5,-12,216.2127,.3022,-20.5,-16.7,.01,1.8,.01,2.3,.2,.45,.5,4,329,.52,.39,2,158.9157,.3232,0,0,0,.5,.25,0,1,.0026,.001,.0015,-60,.1,5,1,-3,.5,.0016,957.26,1.5,.8,15.0746,.1311,0,0,0,0,.02,.01,-12,8.8,12,9,.55,.5,.5,.49,.2,.33,.5,.1,.4,0,0,0,6,22,0,10]],chordPresets=[[5,164.8138,412.0345,494.4413,206.0172,494.4413,618.0517,219.7517,-1,659.2551,185.4155,439.5034,549.3793,123.6103,309.0258,741.662],[5,92.7077,439.5034,185.4155,219.7517,549.3793,329.6276,206.0172,494.4413,206.0172,219.7517,549.3793,329.6276,164.8138,412.0345,247.2207],[5,82.4069,412.0345,247.2207,219.7517,549.3793,329.6276,247.2207,618.0517,370.831,164.8138,412.0345,247.2207,247.2207,618.0517,370.831],[5,274.6896,329.6276,-1,164.8138,206.0172,-1,206.0172,247.2207,824.0689,185.4155,219.7517,-1,164.8138,494.4413,-1],[5,164.8138,412.0345,-1,219.7517,549.3793,-1,247.2207,618.0517,741.662,164.8138,412.0345,-1,164.8138,618.0517,-1],[5,274.6896,659.2551,-1,274.6896,659.2551,-1,219.7517,549.3793,659.2551,206.0172,494.4413,-1,164.8138,618.0517,-1],[5,274.6896,659.2551,-1,164.8138,412.0345,-1,274.6896,659.2551,824.0689,185.4155,439.5034,-1,164.8138,618.0517,-1],[5,185.4155,439.5034,-1,206.0172,494.4413,-1,247.2207,618.0517,741.662,274.6896,659.2551,-1,164.8138,618.0517,-1],[5,185.4155,439.5034,-1,247.2207,618.0517,-1,164.8138,412.0345,494.4413,185.4155,439.5034,-1,219.7517,824.0689,-1],[5,247.2207,618.0517,-1,247.2207,618.0517,-1,164.8138,412.0345,494.4413,164.8138,412.0345,-1,206.0172,741.662,-1],[5,164.8138,412.0345,-1,185.4155,439.5034,-1,185.4155,439.5034,549.3793,164.8138,412.0345,-1,274.6896,659.2551,-1],[5,164.8138,412.0345,-1,185.4155,439.5034,-1,123.6103,618.0517,741.662,274.6896,659.2551,988.8827,309.0258,741.662,1098.7585]],wasmCode="AGFzbQEAAAABcg9gBX99fX19AGABfwBgBX9/fX19AGAAAX9gCn9/fX19f319fX0AYAJ/fwBgA399fQBgBH9/f38AYAZ/fX19fX0AYAV/fX1/fwBgBX9/f31/AX9gB39/f399f30AYAh/f31/fX9/fQF9YAN9f38Bf2AAAAIZAgNlbnYGbWVtb3J5AgACA2VudgNldnQAAAMREAEAAgMEBQYHCAkKCwwNDg4GCAF/AUGQlwQLBw8DAmkxAA4CaTIADwFwABAK95kBEAkAIABCADcCAAupAgECfyAAQpqz5vTz4u3oODcCICAAIAQ4AhQgACADOAIQIAAgAjgCDCAAIAE4AggCQAJAQxEwu78gA5VD8sbdPpRDpptUQJQiA0MAAP5CkiADIAOOkyIDIAMgA5STQ3jurT6Uk0MAAABLlCIDi0MAAABPXUUNACADqCEFDAELQYCAgIB4IQULIAAgBTYCGAJAAkBD+UgTwSAElUPyxt0+lEOmm1RAlCIEQwAA/kKSIAQgBI6TIgQgBCAElJNDeO6tPpSTQwAAAEuUIgSLQwAAAE9dRQ0AIASoIQYMAQtBgICAgHghBgsgACAGNgIcIABEAAAAAAAA8D8gBb67oUQAAADQzMz0P6K2OAIoIABEAAAAAAAA8D8gBr67oUQAAADg4jYav6K2OAIsC8gHAQZ9IAAgBDgCDCAAIAM4AgggACACOAIEIAAgATYCACACQ9sPyUCUIgJD2w/JwJIgAiACQ9sPSUBeGyIFIAWLQ3qBz76UQ4P5oj+SlCIFIAWLlCAFk0NmZmY+lCAFkiEFIAJD2w/JP5IiAkPbD8nAkiACIAJD2w9JQF4bIgIgAotDeoHPv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AAAAAA";window.onload=async()=>{main(),await new Promise((A=>setTimeout(A,200)));let A=new AudioContext({latencyHint:.2});A.suspend();let I=128*Math.round(Math.max(1,A.sampleRate/48e3)),g=p.song.v,C=p.chords.v;urlP("preset")&&(g=urlP("preset")),urlP("chords")&&(C=urlP("chords"));let Q=chordPresets[C];await A.audioWorklet.addModule(`data:application/javascript;base64,${btoa(`registerProcessor("w",class extends AudioWorkletProcessor{constructor(){super();this.port.onmessage=(e)=>{let m=new WebAssembly.Memory({initial:${I},maximum:${I}});WebAssembly.instantiate(e.data.w,{env:{memory:m,evt:(...a)=>this.port.postMessage(a)}}).then(wasm=>{this.w=wasm.instance.exports;this.o=new Float32Array(m.buffer,this.w.i1(sampleRate,${audioRandSeed},${audioPresets[g].length+Q.length}));this.o.set(new Float32Array(e.data.p),256);this.w.i2();});};}process(i,o){if(!this.w)return true;this.w.p();o[0][0].set(this.o.subarray(0,128));o[0][1].set(this.o.subarray(128,256));return true;}})`)}`),worklet=new AudioWorkletNode(A,"w",{numberOfInputs:0,numberOfOutputs:1,outputChannelCount:[2]});let B=audioPresets[g].map((A=>"number"==typeof A?A:0===A[0]?R.random_num(...A[1]):R.random_choice(A[1])));worklet.port.postMessage({w:Uint8Array.from(atob(wasmCode),(A=>A.charCodeAt(0))).buffer,p:new Float32Array([...B,...Q]).buffer}),worklet.port.onmessage=A=>{A.data[0],av_data=A.data},worklet.connect(A.destination),document.documentElement.addEventListener("click",(function(){A.resume(),render()}),{once:!0})};
Rituals combines generative music and generative artwork to create 1000 unique windows into a singular parametric universe. The music and art are crafted to infinitely evolve, giving collectors a subtly new experience upon each viewing. If left running, a single Ritual will continue generating music and art without repeating for ~9 million years. We invite you to hold space for yourself and enjoy a moment of mindful stillness. The first 200 were minted in real life at Bright Moments in Venice, CA, USA in September 2021. Best experienced on modern equipment. Click to start. Artwork by Aaron Penne (@aaronpenne), music by Boreta (@boreta), music system produced by Counterpoint (ctpt.co).
Rituals combines generative music and generative artwork to create 1000 unique windows into a singular parametric universe. The music and art are crafted to infinitely evolve, giving collectors a subtly new experience upon each viewing. If left running, a single Ritual will continue generating music and art without repeating for ~9 million years. We invite you to hold space for yourself and enjoy a moment of mindful stillness. The first 200 were minted IRL in Venice, CA, USA in September 2021. Best experienced on modern equipment. Click to start. Artwork by Aaron Penne (@aaronpenne), music by Boreta (@boreta), music system produced by Counterpoint (ctpt.co).
Rituals combines generative music and generative artwork to create 1000 unique windows into a singular parametric universe. The music and art are crafted to infinitely evolve, giving collectors a subtly new experience upon each viewing. If left running, a single Ritual will continue generating music and art without repeating for ~9 million years. We invite you to hold space for yourself and enjoy a moment of mindful stillness. Best experienced on modern equipment. Click to start. Artwork by Aaron Penne (@aaronpenne), music by Boreta (@boreta), music system produced by Counterpoint (ctpt.co).
Rituals combines generative music and generative artwork to create 1000 unique windows into a singular parametric universe. The music and art are crafted to infinitely evolve, giving collectors a subtly new experience upon each viewing. If left running, a single Ritual will continue generating music and art without repeating for ~9 million years. We invite you to hold space for yourself and enjoy a moment of mindful stillness. Best experienced on modern equipment. Click to start. Artwork by Aaron Penne (@aaronpenne), music by Boreta (@boreta), music system produced by Counterpoint (ctpt.co). First 200 mints are IRL in Venice, CA. Remaining 800 are a Dutch Auction on Sept 26 at 9:30 Central Time with a starting price of 20 ETH, resting price of 0.2 ETH. Price reduced every 5 minutes. 20 > 15 > 12.5 > 10 > 8 > 6 > 5 > 4 > 3.5 > 3 > 2.5 > 2 > 1.5 > 1 > 0.5 > 0.2
function hti(e){let n=[];for(let e=0;e<32;e++)n.push(tokenData.hash.slice(2+2*e,4+2*e));return n.map(e=>parseInt(e,16))}function get_seed(e){return parseInt(tokenData.hash.slice(0,16),16)}function map_v(e,n=0,a=1){return map_r(hash_ints[e],0,255,n,a)}function map_v_str(e,n=0,a=1){return map_v(e,n,a).toFixed(6).toString()}function map_r(e,n,a,t,i){return(e-n)/(a-n)*(i-t)+t}function rr(){return Math.random()}function rd(){return seed^=seed<<13,seed^=seed>>17,seed^=seed<<5,((seed<0?1+~seed:seed)%1e3/1e3).toFixed(5)}function rb(e,n){return(e+(n-e)*rd()).toFixed(5)}function rc(e){return e[Math.floor(rb(0,.99*e.length))]}function rco(e){return a=[],e.forEach((e,n)=>{for(i=0;i<e.w;i++)a.push(e)}),rc(a)}function shn(e){return e.toFixed(5)}function lerp_hex(e,n,a){var t=+e.replace("#","0x"),i=t>>16,e=t>>8&255,t=255&t,n=+n.replace("#","0x");return"#"+((1<<24)+(i+a*((n>>16)-i)<<16)+(e+a*((n>>8&255)-e)<<8)+(t+a*((255&n)-t))|0).toString(16).slice(1)}function get_obj(e,n,a=!1){let t=e.filter(({n:e})=>e==n);return a?(t=t.map(({v:e})=>e),[...t]):t[0]}function shuffle(n){for(let e=n.length-1;0<e;e--){var a=Math.floor(rd()*(e+1));[n[e],n[a]]=[n[a],n[e]]}}cv=document.querySelector("canvas"),document.body.style.backgroundColor="#000",gl=cv.getContext("webgl"),st=(new Date).getTime(),tok_id=parseInt(tokenData.tokenId.slice(-4)).toFixed(5),MEQLOW=FC=fc=0,NDO=["32n","16n","8n","4n","2n","1n"],synth_flaga=0,synth_flagb=0,synth_list=[];let seed=get_seed(tokenData.hash),hash_ints=hti(tokenData.hash),hns=hash_ints.map((e,n)=>map_v_str(n,.1,1)),hnss=hash_ints.map((e,n)=>map_v_str(n,1,10));function expandClusterScale(a,e){let t=[];for(let n=0;n<e;n++)t=[...t,...a.map(e=>e<a[0]&&"C"<=e?`${e}${n+1}`:`${e}${n}`)];return t=[...t,`${a[0]}${e}`],t}function generateCluster(n,a,e,t,i,l,p,s=null){let r=[];var o=NDO.indexOf(e),c=Math.max(o,NDO.indexOf(t));let u=Math.floor(rb(0,n.length)),F=0;var x=Math.round(rb(i,l));for(let e=0;e<x;e++){var v=NDO[Math.round(rb(o,c))];if(r.push({t:F,note:n[u],duration:Tone.getTransport().toSeconds(v)}),s&&e===x-2){let e=a.indexOf(s.replace(/\d+/,""))-a.indexOf(n[u].replace(/\d+/,""));e<-a.length/2&&(e+=a.length),e>a.length/2&&(e-=a.length),u+e>=n.length&&(e-=a.length),u+e<0&&(e+=a.length),u+=e}else{var m=Math.ceil(rr()*p);let e=Math.sign(rr()-.5);0===u&&e<0&&(e=1),u===n.length-1&&0<e&&(e=-1),u=Math.max(0,Math.min(n.length-1,u+m*e))}F+=Tone.getTransport().toSeconds(v)}return r}function shiftClusterNote(e,n){let a=n.indexOf(e);return rr()<.5&&0<a?a--:a<n.length-1&&a++,n[a]}function n2f(n,a){if("just"!==a.tuning?.type)return new Tone.Frequency(n).toFrequency();{var[,t,n]=/([^\d]+)(\d+)/.exec(n),a=a.scale.indexOf(t);let e=n-4;return t<"E"&&"C"<=t&&--e,329.628*[1,1.125,1.265625,1.5,1.6875][a]*Math.pow(2,e)}}pho=90;let ae={init:(s,e="interactive")=>{ae.SScale=expandClusterScale(s.scale,1),Tone.setContext(new Tone.Context({latencyHint:e})),Tone.getTransport().bpm.value=60,ae.M=new Tone.Gain(0).toDestination(),ae.MEQ=new Tone.EQ3(s.M.eq).connect(ae.M),ae.MEnv=new Tone.Gain(0).connect(ae.MEQ),ae.MEnvLFO=new Tone.LFO({frequency:s.M.envelope.baseFrequency,partials:s.M.envelope.partials,phase:s.M.envelope.phase,min:s.M.envelope.minGain,max:s.M.envelope.maxGain,amplitude:1}).connect(ae.MEnv.gain),ae.comp=new Tone.Compressor(s.M.compressor).connect(ae.MEnv),ae.reverb=new Tone.Reverb({decay:10,preDelay:s.returns.reverb.pre/1e3}).connect(ae.MEnv),ae.reverb.generate(),ae.BDirectOut=new Tone.Gain(s.binauralSends.direct).connect(ae.MEQ),ae.BReverbOut=new Tone.Gain(s.binauralSends.reverb).connect(ae.reverb),ae.BEQ=new Tone.EQ3(s.binauralEq).connect(ae.BDirectOut).connect(ae.BReverbOut),ae.B1Volume=new Tone.Gain(0).connect(ae.BEQ),ae.B1VolLFO=new Tone.LFO({min:s.B1.volMin,max:s.B1.volMax,frequency:s.B1.volLFORate,amplitude:1}).connect(ae.B1Volume.gain),ae.B1Filter=new Tone.Filter({frequency:s.B1.filterFrequency,Q:s.B1.filterResonance,type:"lowpass",rolloff:"-24"}).connect(ae.B1Volume);e=(new Tone.Merge).connect(ae.B1Filter);ae.B1OscLeft=new Tone.Oscillator({frequency:new Tone.Frequency(s.B1.note).toFrequency(),volume:-15,channelCount:1}).connect(e,0,0),ae.B1OscRight=new Tone.Oscillator({frequency:new Tone.Frequency(s.B1.note).toFrequency()+s.B1.difference,volume:-15,channelCount:1}).connect(e,0,1),ae.B2Volume=new Tone.Gain(0).connect(ae.BEQ),ae.B2VolLFO=new Tone.LFO({min:s.B2.volMin,max:s.B2.volMax,frequency:s.B2.volLFORate,amplitude:1}).connect(ae.B2Volume.gain),ae.B2Filter=new Tone.Filter({frequency:s.B2.filterFrequency,Q:s.B2.filterResonance,type:"lowpass",rolloff:"-24"}).connect(ae.B2Volume);e=(new Tone.Merge).connect(ae.B2Filter);ae.B2OscLeft=new Tone.Oscillator({frequency:new Tone.Frequency(s.B2.note).toFrequency(),volume:-15,channelCount:1}).connect(e,0,0),ae.B2OscRight=new Tone.Oscillator({frequency:new Tone.Frequency(s.B2.note).toFrequency()+s.B2.difference,volume:-15,channelCount:1}).connect(e,0,1),ae.DDirectOut=new Tone.Gain(s.D.sends.direct).connect(ae.comp),ae.DReverbOut=new Tone.Gain(s.D.sends.reverb).connect(ae.reverb),ae.DGain=new Tone.Gain(0).connect(ae.DReverbOut).connect(ae.DDirectOut),ae.DGainLFO=new Tone.LFO({min:s.D.gainLFOMin??1,max:s.D.gainLFOMax??1,frequency:s.D.gainLFORate,amplitude:1}).connect(ae.DGain.gain),ae.DVolume=new Tone.Volume(s.D.vol).connect(ae.DGain),ae.DEQ=new Tone.EQ3(s.D.eq).connect(ae.DVolume),ae.DAP=new Tone.AutoPanner(s.D.autoPan).connect(ae.DEQ),ae.DF=new Tone.AutoFilter({frequency:s.D.filterRate,octaves:s.D.filterDepth,baseFrequency:s.D.filterFrequency,filter:{type:"lowpass",rolloff:"-12",Q:s.D.filterResonance}}).connect(ae.DAP),ae.DSynths=Array.from({length:3},(e,p)=>s.D.oscillators.map(({coarse:e,fine:n,vol:a})=>{n=1200*Math.log2(e)+n;let t=new Tone.Oscillator({type:"sawtooth",frequency:n2f(s.D.chord[p]??"E2",s),detune:n,volume:a}).connect(ae.DF),i=!1,l;return{triggerAttack:()=>{clearTimeout(l),i||(t.start(),i=!0)},triggerRelease:()=>{i&&(i=!1,l=setTimeout(()=>{t.stop()},1e3*s.M.fadeIn))},setFrequency:e=>{e?(t.frequency.value=e,i&&t.start()):i&&t.stop()},osc:t}})),ae.SDirectOut=new Tone.Gain(s.S.sends.direct).connect(ae.comp),ae.SReverbOut=new Tone.Gain(s.S.sends.reverb).connect(ae.reverb),ae.SVolume=new Tone.Volume(s.S.vol).connect(ae.SReverbOut).connect(ae.SDirectOut),ae.SEQ=new Tone.EQ3(s.S.eq).connect(ae.SVolume),ae.SAP=new Tone.AutoPanner(s.S.autoPan).connect(ae.SEQ),ae.SChorus=new Tone.Chorus(s.S.chorus).connect(ae.SAP),ae.SF=new Tone.Filter({type:"lowpass",rolloff:s.S.filterRolloff??"-24",Q:s.S.filterResonance}).connect(ae.SChorus),ae.SFEnv=new Tone.FrequencyEnvelope({baseFrequency:s.S.filterFrequency,...s.S.filterEnvelope}).connect(ae.SF.frequency),ae.SSynth=new Tone.Synth({oscillator:{type:s.S.oscillatorType},envelope:s.S.amplitudeEnvelope}).connect(ae.SF),ae.PDirectOut=new Tone.Gain(s.padSends.direct).connect(ae.comp),ae.PReverbOut=new Tone.Gain(s.padSends.reverb).connect(ae.reverb),ae.PVolume=new Tone.Volume(s.padVol).connect(ae.PDirectOut).connect(ae.PReverbOut),ae.PEQ=new Tone.EQ3(s.padEq).connect(ae.PVolume),ae.PChorus=new Tone.Chorus(s.padChorus).connect(ae.PEQ),ae.Ps=Array.from({length:2},(e,n)=>{let a=s[`P${n+1}`],t={};return t.gain=new Tone.Gain(0).connect(ae.PChorus),t.gainLFO=new Tone.LFO({min:a.gainLFOMin??1,max:a.gainLFOMax??1,frequency:a.gainLFORate,amplitude:1}).connect(t.gain.gain),t.autoPan=new Tone.AutoPanner(a.autoPan).connect(t.gain),t.pan=new Tone.Panner(a.pan).connect(t.autoPan),t.filter=new Tone.Filter({type:"lowpass",rolloff:a.filterRolloff??"-12",Q:a.filterResonance}).connect(t.pan),t.filterEnv=new Tone.FrequencyEnvelope({baseFrequency:a.filterFrequency,...a.filterEnvelope}).connect(t.filter.frequency),t.synths=Array.from({length:a.polyphony},()=>new Tone.Synth({oscillator:{type:a.oscillatorType,detune:a.detune},envelope:a.amplitudeEnvelope}).connect(t.filter)),t})},started:!(pz={B1:[rd()*pho,rr()*pho],B2:[rd()*pho,rr()*pho],Dp:[rd()*pho,rr()*pho],Df:[rd()*pho,rr()*pho],D:[rd()*pho,rr()*pho],M:[rd()*pho,rr()*pho],P1p:[rd()*pho,rr()*pho],P1:[rd()*pho,rr()*pho],P2p:[rd()*pho,rr()*pho],P2:[rd()*pho,rr()*pho],S:[90,90],Sp:[rd()*pho,rr()*pho],Q1:[rd()*pho,rr()*pho],Q2:[rd()*pho,rr()*pho],Q4:[rd()*pho,rr()*pho],Q8:[rd()*pho,rr()*pho],Q14:[rd()*pho,rr()*pho],Q20:[rd()*pho,rr()*pho]}),start:async(t,e)=>{if(!ae.started){await Tone.start(),Tone.getTransport().start(),clearTimeout(ae.lastBinauralStopper),t.B1.note&&(ae.B1OscLeft.start(),ae.B1OscRight.start()),t.B2.note&&(ae.B2OscLeft.start(),ae.B2OscRight.start()),ae.DSynths.forEach((e,n)=>e.forEach(e=>t.D.chord[n]&&e.triggerAttack())),ae.SCluster=generateCluster(ae.SScale,t.scale,t.S.minNoteDuration,t.S.maxNoteDuration,1,t.S.maxClusterSize,2,t.B1.note),ae.SPattern=new Tone.Pattern({callback:e=>{rr()<t.S.clusterProbability&&ae._playSynth(e,t)},values:[!0],interval:t.S.clusterInterval}).start(),ae.PPatterns=ae.Ps.map((e,n)=>{let a=t[`P${n+1}`];return new Tone.Pattern({callback:e=>{rr()<a.repeatProbability&&ae._playPad(n,e,t)},values:[!0],interval:a.repeatInterval}).start()}),ae.MEnvLFO.phase=pz.M[1],ae.B1VolLFO.phase=pz.B1[1],ae.B2VolLFO.phase=pz.B2[1],ae.DAP.phase=pz.Dp[1],ae.DGainLFO.phase=pz.D[1],ae.DF.phase=pz.Df[1],ae.SAP.phase=pz.Sp[1],ae.Ps[0].autoPan._lfo.phase=pz.P1p[1],ae.Ps[0].gainLFO.phase=pz.P1[1],ae.Ps[1].autoPan._lfo.phase=pz.P2p[1],ae.Ps[1].gainLFO.phase=pz.P2[1],ae.MEnvLFO.start(),ae.B1VolLFO.start(),ae.B2VolLFO.start(),ae.DAP.start(),ae.DGainLFO.start(),ae.DF.start(),ae.SAP.start(),ae.SChorus.start();for(var n of ae.Ps)n.autoPan.start(),n.gainLFO.start();ae.PChorus.start(),ae.M.gain.setValueAtTime(0,Tone.now()),ae.M.gain.linearRampToValueAtTime(t.M.gain,Tone.now()+t.M.fadeIn),ae.SVolume.volume.setValueAtTime(-1e3,Tone.now()),ae.SVolume.volume.linearRampToValueAtTime(sp.S.vol,Tone.now()+t.M.fadeIn+7),ae.started=!0}},_playSynth:(i,l)=>{let p=[...ae.SCluster];for(let e=1;e<p.length;e++){var n,a,t;rr()<.1&&(n=Tone.getTransport().toSeconds(l.S.minNoteDuration)/2,a=p[e],t=p[e-1],rr()<.5?(p[e-1]={...t,duration:t.duration-n},p[e]={...a,t:a.t-n,duration:a.duration+n}):(p[e-1]={...t,duration:t.duration+n},p[e]={...a,t:a.t+n,duration:a.duration-n}))}synth_flaga=0,synth_flagb=0,synth_list=[];for(let t=0;t<p.length;t++){let{t:e,note:n,duration:a}=p[t];t!==p.length-1&&rr()<.1&&(n=shiftClusterNote(n,ae.SScale));var s=n2f(n,l)*Math.pow(2,l.S.octave),r=.07*rr();ae.playSynthNote(i+e+r,s,a)}},playSynthNote:(e,n,a)=>{--synth_flaga,synth_flagb+=1,synth_list.push(a),ae.SSynth.triggerAttackRelease(n,a,e),ae.SFEnv.triggerAttackRelease(a,e)},_playPad:(a,t,i)=>{var l=i[`P${a+1}`],p=Tone.getTransport().toSeconds(l.repeatInterval)/3,s=.07*rr();for(let n=0;n<l.chord.length;n++){var r=l.chord[n];let e=ae.Ps[a].synths[n];r&&e.triggerAttackRelease(n2f(r,i),p,t+s),ae.Ps[a].filterEnv.triggerAttackRelease(p,t+s)}}},pp={pal:[{w:15,n:"Awe",v:"F2F3EEF2F3EEF0EDDA7D88975269939B361CF0EDDA39609400155F9B361CE5E6D8FAE193CC948200337F394F77D6AAA5A2938D5C98B43989A93D0000C66C5656526F905B5FDC9B80F0ECDB939690F5EBD9CC94828E74894DA9CC6D492BD8D1BEF3EED9F2F3EEF2F3EE"},{w:8,n:"Elysium",v:"F2F3EEF2F3EECBC6D5BDB4BD636474F2F3EE424D389794A0F2F3EEF2F3EE9A9AB08D73777A5663F2F3EE70595D935C689D8798B7BDC8817D7F9A9FA8F2F3EEF2F3EE888789967E8759454A474B467A5663F2F3EE70595D935C68564E49F2F3EEF2F3EE848A925A687C291F007A566370595D935C6835362EF2F3EEF2F3EE"},{w:8,n:"Liquid Dusk",v:"F2F3EEF2F3EEB68662230D00B68662BF8C61C88F5AD19559D39959D69B55E8A557EFA953E3A64BE5BA5CEFD171E6C96DE8CE81EBDDACE9E7CEECE3E4E4E5E9E6E7E1F5E3BDE7BC6EBD7E1FB36F1C9953177F3B0E7F401786522A895F35F2F3EE926B40A2774CBF94699C7347784F316A4027643A246C46335D3C2B2C16092C1609F2F3EEF2F3EE6D452C8E5D35B47F49D09E61DDB67BF6DAA8D7C499E5C384BF9D5EF2F3EEF2F3EE"},{w:8,n:"Chimera",v:"F2F3EEF2F3EE064f6e064f6ef68c5040456af3a257F2F3EEF2F3EE064f6e064f6ef68c5040456af3a257F2F3EEF2F3EE"},{w:8,n:"Moonpool",v:"F2F3EEF2F3EE6E8FB09DADC65D718C6D7E987989A28099B74465845E748C72849A78859639405071788A525F720E1D3408172E485367636B7E5A7995F2F3EEF2F3EE2E486334455F1F2B4573839D1C2A44434D665F66801E28416261694D5973606F843E4A5A00000B6261696C809B4E627DF2F3EEF2F3EE"},{w:10,n:"Body Electric",v:"F2F3EEF2F3EE0000001212120000003636368484847A7A7A5C5C5C4747471313132727271313130000001717172D2D2D707070B4B4B4F2F3EEF2F3EECBCBCBC0C0C02121211A1A1AF2F3EEF2F3EE969696C9C9C98181810000000202025C5C5C454545959595CBCBCBBEBEBEC9C9C92121211A1A1A646464BCBCBCAAAAAAF2F3EEAEAEAE646464010101272727010101010101F2F3EEF2F3EE"},{w:11,n:"Holotropic",v:"F2F3EE9C5555A298A3738CA20041701E547B194B6B717E7588978BAAABAC39688D909EA2748E92113864002357194B6B625E78928E945C5953829C983A5E779C55556E15059C5555F2F3EE94A0B4A4A0AE92A0AB7E8485BEBAB9928E832E303C92A1A67061685D5B613075925E717B668385F2F3EE194B6B113864002357194B6B759299B5BBBD92A8AEF2F3EEF2F3EE"},{w:8,n:"Asteria",v:"6346525845527242468C505577566468576A471F300C01255A5A816A638D9F839BD9C8B5CEC8B27242468C5055C7B49FC7B49FBEB0A4A99B999285878A8D918C9097ADAAAF0C01259691A38C849E8A809A7242468C50558A7F9F816D8F7356759B7386471F300C0125B5837FA773707C5E5D7E605F785E5485665A99705F926551"},{w:12,n:"Meadow",v:"121B2A01002801001265899759869BD3D6DBDBD2D7DED2D4F6EDE8F9C37DF9C37D444849455C6A5D8795567D8CF2F3EEF2F3EE4A707D567C89375F6B2F545D14191F000929C9BCACB57657BB6B4AC4704BAA6D51A69A8CD9DDE0D9DDE021210009182D1F2227253C4238575C31505317292D4B666F5B7C833C4A4D000000D69F5FD69F5FD2C7C3C6BCBAC3BDBDB6BABB4E6C765A737A000000181B2014151A"},{w:4,n:"Halcyon",v:"9A95A0756485B6A5C89B85A2835061C58FADBC849E883E3FBD636ECF707D7039468C495CB9627D683D4D3F2D397F43645E37502528304A354F3A2D3E1E231D2425252225232224232123222123222123222123221C211E2E272D42303D26262D482F377B40484C3037442F35A9554E9C4E474E282BB26A53CE7C5D8843319A605BC48A8CA06B6A714A4FA88DB1A38AAE594662B1A9B4"}],song:[{w:10,n:"Harmonic Transmission",v:1},{w:10,n:"Emanating Dreamscape",v:2},{w:10,n:"Oceanic Expanse",v:3},{w:10,n:"The Deep Now",v:4},{w:10,n:"Glimmering Horizon",v:5},{w:10,n:"Weightless River",v:6},{w:10,n:"Timeless Window",v:7},{w:10,n:"Infinite Portal",v:8},{w:10,n:"Luminous Space",v:9},{w:10,n:"Weightless Moment",v:10},{w:10,n:"Present-Time Awareness",v:11},{w:2,n:"Interbeing",v:12}],rotation:[{w:7,n:"Unperturbed",v:"0."},{w:3,n:"Angled",v:"1."},{w:1,n:"Whip Spiral",v:"3."},{w:2,n:"Eternal Spiral",v:"4."}],blur:[{w:1,n:"Angled Positive",v:"10.,10."},{w:1,n:"Angled Negative",v:"-10.,10."},{w:3,n:"Vertical",v:"0.,10."},{w:2,n:"Horizontal",v:"10.,0."}],e:[{w:0,n:"Water",v:"circle"},{w:0,n:"Earth",v:"rect"},{w:0,n:"Fire",v:"diamond"},{w:0,n:"Air",v:"none"}],e_xy:[{w:0,n:"Centered",v:1},{w:0,n:"Duality",v:3},{w:0,n:"Symmetric Duality",v:4},{w:0,n:"Trinity",v:2},{w:0,n:"None",v:0}],e_z:[{w:2,n:"Below",v:0},{w:1,n:"Omnipresent",v:1}],el_exp:[{w:1,n:"Expanding",v:[.9,1.2]},{w:10,n:"Static",v:[.95,1.05]}],grid:[{w:3,n:"Transcend",v:[2,4,2,4]},{w:2,n:"Exhale",v:[2,4,10,15]},{w:2,n:"Inhale",v:[10,15,2,4]},{w:3,n:"Lattice",v:[10,15,10,15]},{w:2,n:"Passage",v:[25,30,10,15]},{w:2,n:"Universal",v:[25,30,25,30]}]},p={pal:rco(pp.pal),rotation:rco(pp.rotation),blur:rco(pp.blur),e:rco(pp.e),el_exp:rco(pp.el_exp),grid:rco(pp.grid),song:rco(pp.song)};p.feel=["Immersive","Spacious","Serene","Spacious","Spacious","Immersive","Immersive","Spacious","Serene","Immersive","Serene","Heartbeat"][p.song.v-1],p.pal.v=p.pal.v.match(/.{6}/g).map(e=>"#"+e);let nm={"16n.":.0234375,"16n":.25/16,"8n.":.046875,"8n":.25/8,"4n.":.09375,"4n":.0625,"2n.":.1875,"2n":.125,"1n.":.375,"1n":.25,"1m":.25,"2m":.5,"3m":.75,"4m":1,"5m":1.25,"6m":1.5,"7m":1.75,"8m":2,"9m":2.25,"10m":2.5,"11m":2.75,"12m":3};if(vpl=[["Water","Water","Water","Fire","Fire","Fire","Air","Earth","Earth","Earth","Air",rc(["Earth","Fire","Water"])],[1,3,2,1,3,2,0,1,3,2,0,2],[["S"],[rc(["S","D"]),rc(["S","D"])],["S"],["S"],["S","S"],["S"],["S"],["S"],[rc(["B1","B2"]),rc(["B1","B2"])],["S"],["B1"],["Sp"]],[["D"],[rc(["S","D"]),rc(["S","D"])],["D"],["S"],[rc(["S","B2"]),rc(["S","B2"])],["S"],["S"],["S"],[rc(["D","B2"]),rc(["D","B1"])],["S"],["B1"],["Sp"]],["D","D","B1","B2","P2","B1","S","B2","D","B2",rc(["B1","B2"]),"D"],[["B1","B2","D","Df","S","Sp","2","1"],["B1","B2","D","Df","S","2","1"],["B1","B2","S","P2p","D","Df","2","1"],["B1","B1","P1","P2p","D","Df","S","2","1"],["B1","B2","P2","P2p","S","S","2","1"],["B1","B2","D","Df","S","2","1"],["B1","B2","D","Df","P1","P2","P2p","S","2","1"],["B1","B2","P2","P2p","S","2","1"],["B1","B2","D","Df","S","Sp","2","1"],["B1","B2","D","Df","S","S","2","1"],["B1","B2","4","2","1"],["B1","B2","P1","P2","D","Df"]],["14","14","14","14","14","14","14","14","14","14","14","14"],["D","D","D","D","S","D",rc(["B1","D"]),"P2","D","B1",rc(["B1","B2"]),"B1"],[rc(["B1","D"]),rc(["B1","Df"]),"D","D",rc(["B2","P1p"]),"B2","S","S","B2","B2",rc(["B1","B2"]),"B2"]],si=p.song.v-1,p.e=get_obj(pp.e,vpl[0][si]),p.e_xy=vpl[1][si],p.e_z=rc([0,1]),p.uSC=vpl[2][si],p.uSE=vpl[3][si],p.uGC=vpl[4][si],p.gw=vpl[5][si],p.uFC=vpl[6][si],p.uSpiral=vpl[7][si],p.uGP=vpl[8][si],"none"==p.e.v?p.e_z={w:0,n:"None",v:0}:(p.e_z=rco(pp.e_z),p.el_exp=rco(pp.el_exp)),spl=[[60,60,60,60,60,60,60,60,60,60,60,60],["E","E","E","E","E","E","E","E","E","E","E","E"],["F#","F#","F#","F#","F#","F#","F#","F#","F#","F#","F#","F#"],["G#","G#","G#","G#","G#","G#","G#","G#","G#","G#","G#","G#"],["B","B","B","B","B","B","B","B","B","B","B","B"],["C#","C#","C#","C#","C#","C#","C#","C#","C#","C#","C#","C#"],["just","just","just","just","just","just","just","just","just","just","just","just"],[1,1,1,1,1,1,1,1,1,1,1,1],[1.125,1.125,1.125,1.125,1.125,1.125,1.125,1.125,1.125,1.125,1.125,1.125],[1.265625,1.265625,1.265625,1.265625,1.265625,1.265625,1.265625,1.265625,1.265625,1.265625,1.265625,1.265625],[1.5,1.5,1.5,1.5,1.5,1.5,1.5,1.5,1.5,1.5,1.5,1.5],[1.6875,1.6875,1.6875,1.6875,1.6875,1.6875,1.6875,1.6875,1.6875,1.6875,1.6875,1.6875],["E","E","E","E","E","E","E","E","E","E","E","E"],[4,4,4,4,4,4,4,4,4,4,4,4],[329.628,329.628,329.628,329.628,329.628,329.628,329.628,329.628,329.628,329.628,329.628,329.628],[.07,.07,.07,.07,.07,.07,.07,.07,.07,.07,.07,.07],[15,15,15,15,15,15,15,15,15,15,15,15],[.001,.001,.001,.001,.001,.001,.001,.001,.001,.001,.001,.001],[.55,.75,.75,.75,.75,.75,.75,.75,0,0,0,.59],[.79,.71,.71,.71,.71,.71,.71,.71,1,1,1,.5],[.04,.88,.88,.88,.88,.88,.88,.86,.73,.73,.73,.47],[.52,.52,.52,.52,.52,.52,.52,.48,.52,.52,.52,.43],[122,188,188,188,188,188,188,207,122,122,122,28],[1,1,1,1,1,1,.39,1,0,0,0,1],[1,1,1,1,1,1,1,1,1,1,1,1],[.003,.003,.003,.021,.003,.027,.003,.003,.003,.042,.042,.024],[0,16.5,28.3,18.1,7.1,24.8,30,15.7,30,7.4,7.4,0],[14,20,2.4,1,19.8,5.2,20,20,14.4,20,20,1],[.08,.07,.06,.08,.06,.07,.25,.25,.25,.21,.42,.25],[-32.5,-10.3,-11.5,0,-.6,-20.8,-33.1,-16.2,-44.3,0,-27.1,0],[-11,-3,-4,-7.8,-4.6,-3.1,-8.8,-2,-3.5,-4.7,-3.7,-8.9],[0,0,0,0,0,0,0,.4,0,0,0,0],[.8,0,0,0,0,0,0,0,0,0,0,0],[71,250,76,250,192,250,250,250,194,133,133,194],[17073,2500,2500,869,2500,2500,2500,2500,17073,17073,17073,17073],[9.5,8.23,8.14,10,5.74,8.1,6.09,5.57,7.6,7.02,5.83,7.28],[10,10,10,10,10,10,10,10,10,10,10,10],[2.5,54.7,54.7,54.7,54.7,54.7,54.7,54.7,2.5,2.5,2.5,2.5],[.22,.28,.46,.13,.16,.03,.13,.09,.12,.06,.01,0],[1,1,1,1,1,1,.83,1,1,.65,.64,.19],["2m","2m","8m","6m","5m","4m","8m","4m","5m","8m","8m","8m"],[1,4,4,1,1,1,1,1,1,1,1,14],["G#1","G#1","G#1","C#2","C#2","E1","B1","F#1","F#1","G#1","F#1","F#2"],[2e3,2e3,2e3,2e3,2e3,2e3,2e3,2e3,2e3,962,962,2e3],[1,5.9,5.9,5.9,5.9,0,5.9,5.9,1,1,1,1],[.16,.19,0,.21,.03,0,0,0,0,.04,.04,0],[.81,1,.51,1,.73,1,.72,.38,.22,.17,.35,.33],["6m","6m","12m","12m","8m","7m","12m","6m","8m","6m","6m","8m"],[14,1,1,4,1,14,4,1,8,8,8,14],[2e3,226,226,1649,1972,1649,394,1649,367,1834,1834,1264],[1,0,0,0,0,0,0,0,1,1,1,1],["F#2","E3","B2","E3","G#2","E2","C#3","B2","E3","C#2","E2","C#3"],[3,3,3,3,3,3,3,3,3,3,3,3],["B1","B1","B1","C#2","C#2","F#1","F#1","F#1","F#1",null,null,"E1"],["E2",null,null,null,null,"F#2","C#3","C#3","E2","G#2","G#2","C#2"],["E3",null,null,null,null,"F#3",null,null,null,null,null,null],[-12.7,-9.4,-11.9,-24.8,-1e3,-28.8,-22.1,-1e3,-27.6,-30.2,-1e3,-23.3],[0,0,0,0,0,.19,0,0,0,0,0,0],[.88,.8,.8,.54,1,1,1,1,1,1,1,.78],["9m","6m","12m","10m","10m","7m","5m","5m","7m","7m","7m","12m"],[93,83,83,49,72,80,22,24,121,661,661,88],[0,0,0,0,0,0,0,0,1,1,1,1],["5m","7m","7m","9m","8m","5m","6m","7m","4m","4m","4m","9m"],[.69,.43,.43,1.71,0,1.26,2.36,2.94,0,0,0,.04],[.5,1,1,.5,1,1,.5,.5,1,4,4,.5],[1200,1200,1200,1200,1200,1200,1200,1200,1200,0,0,922],[.946,.946,.946,.946,.946,.946,.946,.946,.946,.946,.946,.946],[.6,.6,.6,.6,.6,.6,.6,.6,.6,.6,.6,.6],[1,1,1,1,1,1,.33,.33,1,1,1,1],[42.5,42.5,42.5,42.5,42.5,42.5,20.58,20.58,42.5,42.5,42.5,42.5],["exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential"],["exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential"],[0,-1.3,-1.3,-1.3,-1.3,-1.3,-1.3,-1.3,0,-7.6,-7.6,0],[1,1,1,1,1,1,2,2,1,1,1,2],[700,700,700,700,700,700,700,700,700,700,700,297],[20,.946,.946,.946,.946,.946,.946,.946,20,20,20,20],[.03072,.6,.6,.6,.6,.6,.6,.6,.03072,.03072,.03072,.03072],[1,1,1,1,1,1,1,1,1,1,1,1],[30.2,30.2,30.2,30.2,30.2,30.2,30.2,30.2,30.2,30.2,30.2,30.2],["exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential"],["exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential"],[-13.1,-1,-1,-1,-1,-1,-1,-1,-13.1,-13.1,-13.1,-13.1],[3,2,2,1,2,2,.5,.5,.5,.5,.5,.5],[1200,1200,1200,1200,1200,1200,1200,1200,1200,642,642,1200],[.946,.946,.946,.946,.946,.946,.946,.946,.946,.946,.946,.946],[.6,.6,.6,.6,.6,.6,.6,.6,.6,.6,.6,.6],[1,1,1,1,1,1,1,1,1,1,1,1],[5.41,5.41,5.41,5.41,5.41,5.41,5.41,5.41,5.41,5.41,5.41,5.41],["exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential"],["exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential"],[0,-4.1,-4.1,-4.1,-4.1,-4.1,-4.1,-4.1,0,-1e3,-1e3,0],[.5,1,1,1,1,1,3,3,.5,.5,.5,.5],[1186,0,0,0,0,0,0,0,1186,1186,1186,1186],[.946,2.97754,2.97754,2.97754,2.97754,2.97754,2.97754,2.97754,.946,.946,.946,.946],[.6,.6,.6,.6,.6,.6,.6,.6,.6,.6,.6,.6],[1,1,1,1,1,1,1,1,1,1,1,1],[5.41,5.41,5.41,5.41,5.41,5.41,13.61886,13.61886,5.41,5.41,5.41,5.41],["exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential"],["exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential"],[-3.7,0,0,0,0,0,0,0,-3.7,-1e3,-1e3,-3.7],["sine","sine","sine","sine","sine","sine","sine","sine","sine","sine","sine","sine"],[.46,1,1,.28,.55,.81,1,.25,.44,.24,.24,.65],[.2,.1,.1,.1,.1,.1,.1,.1,.1,5.4,5.4,.1],[1,.65,.65,.16,.16,.43,.41,.43,.29,0,0,.29],[-68.5,-70,-70,-70,-54.5,-70,-70,-70,-70,-70,-70,-70],[-37.3,-22.5,-40,-8.6,-12.2,-12,-10.1,-22.3,-13.6,-7.2,-7.2,-11.3],[-60.4,-10.6,-1.5,-9.9,-70,-32.3,-34.8,-14.8,-22.7,-5.7,-5.7,-70],[250,50,50,50,50,50,50,50,250,250,250,250],[2500,18e3,18e3,18e3,18e3,18e3,18e3,18e3,2500,2500,2500,2500],[.53,.72,.72,.52,.72,.87,.87,.87,.78,1,1,0],[1,1,1,1,1,.74,.74,.74,.83,.83,.83,1],[3,4,3,4,3,3,4,4,4,4,4,1],[.1,.1,.1,.1,.1,.1,.1,.1,.1,.1,.1,.1],[.1,.1,.1,.1,.1,.1,.1,.1,.1,.1,.1,.1],["8m","6m","4m","8m","8m","6m","6m","5m","5m","5m","5m","1m"],[1,1,1,1,1,.6,.9,1,.8,.9,.6,1],["4n","8n","16n","16n","16n","16n","4n","16n","16n","8n","8n","16n"],["2n","1n","8n","1n","8n","4n","2n","4n","1n","2n","2n","16n"],[4,3,1,1,1,3,1,6,6,3,3,1],[7,8,5,8,8,8,5,8,8,5,5,3],[2,2,2,2,2,2,2,2,2,2,2,2],[-16.9,-30.4,-13.7,-22.8,-6.6,-9.8,-13.8,-6.9,-27.1,-22.2,-1e3,-10.4],["sine","sine4","sine4","sine2","sine4","sine2","square2","sine","sine","fatsine2","fatsine2","sine"],[1.8225,3.70386,1.94672,1.01306,.43904,1.18638,1.8225,.54,.0675,.24334,1.70368,.41458],[5.4675,1,5.4675,1,9.9825,1,.06,1,1.31712,1.31712,.2025,.55566],[.59,.4,.64,.4,.72,.4,.86,.78,.29,.57,.62,.49],[25.3125,17.24976,35.56224,21.47466,9.9825,15.00282,28.47312,.73002,21.47466,24.31344,24.31344,17.24976],["exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential"],["exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential"],[5281,362,362,362,341,362,3587,1748,4035,5399,5399,1594],[0,.4,.4,.4,.4,.4,.4,.4,.4,.4,.4,.4],[1.09744,1.09744,1.09744,.001,1.01306,2.81216,2.81216,.02662,1.09744,.3125,.3125,1.09744],[.8,.8,.8,.8,.8,.8,.8,.8,.8,.8,.8,23.34102],[.83,0,0,0,0,0,0,0,0,0,0,0],[24.31344,0,0,0,0,9.9825,9.9825,9.9825,0,0,0,0],["exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential"],["exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential"],[1.9,1.1,1.1,1.1,1.1,1.8,1.8,1.8,1.1,1.1,1.1,1.1],["sine","sine","sine","sine","sine","sine","sine","sine","sine","sine","sine","sine"],[.2,.61,.92,.99,.14,.53,.38,.24,.27,.27,0,0],[1,.1,.1,.1,.1,.1,.1,.1,1,1,1,1],[1,.61,.71,.71,.07,.5,.5,.5,.5,.5,0,0],[-70,-70,-70,-70,-70,-70,-70,-70,-70,-70,-70,-2.2],[-20.8,-11.3,-36.1,-25.9,-35,-33.9,-19.7,-34.5,-16.6,-20.3,-2.6,-.9],[-37.3,0,0,-47.3,0,-10.6,-17,-55.6,0,0,0,0],[250,250,250,250,250,250,250,250,250,250,250,250],[2500,2500,2500,2500,2500,2500,2500,2500,2500,2500,2500,2500],[.11,.31,.48,0,.37,0,0,.33,.18,1,1,1],[.91,1,1,1,.9,.91,.41,.78,1,.92,.92,.38],[0,3.5,3.5,54,54,89,67,32,19,0,0,0],[0,.7,.7,0,0,.7,.7,.7,0,0,0,0],[.32,0,0,0,0,0,0,0,.32,.32,.32,.01],[37.3,1.5,1.5,1.5,1.5,1,1,1,37.3,37.3,37.3,0],[0,180,180,180,180,75,75,220,0,0,0,0],[.1,0,0,.27,.43,0,0,0,0,0,0,0],[2,2,2,2,2,2,2,2,2,2,2,2],["E2","C#3","C#3",null,"G#2",null,null,null,null,null,null,"E4"],["F#2","E4","E4","C#5","G#4","C#5","C#4","F#3","C#4","B4","B4","C#4"],["6m","2n","6m","4m","8m","8m","8m","7m","5m","5m","5m","5m"],[.9,.8,.8,.8,.8,.8,.8,.6,1,1,1,1],[-22.3,-1e3,-1e3,-29.4,-29.4,-25.8,-23.9,-22.6,-22.3,-22.3,-22.3,-22.3],[0,0,0,0,0,0,0,0,0,0,0,0],[1,.77,.87,.44,.8,.77,.77,.77,.61,.61,.61,.44],["1n","1n","1n","6m","1n","1n","3m","1n","1n","1n","1n","4m"],["sawtooth","sawtooth","sawtooth","sawtooth","sawtooth","sawtooth","sawtooth","sine","sine","sawtooth","sawtooth","sine"],[1.18638,.05488,1.37842,9.86078,9.86078,9.86078,9.86078,.71874,6.28864,6.28864,6.28864,6.28864],[1,1,1,1,1,1,1,1,1,1,1,1],[1,.79,.79,.79,.79,.79,.79,.79,1,.73,.73,.82],[5,29.58234,46.72128,29.58234,60,29.58234,29.58234,29.58234,23.34102,23.34102,23.34102,23.34102],["linear","linear","linear","linear","linear","linear","linear","linear","linear","linear","linear","linear"],["exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential"],["linear","linear","linear","linear","linear","linear","linear","linear","linear","linear","linear","linear"],[196,229,229,130,130,130,2011,130,1728,1690,1690,714],[0,.4,.4,.4,.4,.4,0,.4,0,0,0,0],[4.32,.39366,.39366,3.14928,3.14928,3.14928,3.90224,3.14928,4.32,4.32,4.32,4.32],[.8,.8,.8,.8,.8,.8,.8,.8,.8,.8,.8,.8],[0,.23,.23,.23,.23,.23,.23,.23,0,0,0,0],[0,15.00282,15.00282,15.00282,15.00282,15.00282,15.00282,15.00282,0,0,0,0],["exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential"],["exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential"],[1.1,2.5,2.5,2.5,2.5,2.5,2.5,2.5,1.1,1.1,1.1,1.1],["sine","sine","sine","sine","sine","sine","sine","sine","sine","sine","sine","sine"],[.86,.47,.47,.47,.47,.47,.47,.47,.86,.86,.86,.86],[1,8.1,8.1,8.1,8.1,8.1,8.1,8.1,1,1,1,1],[.93,.59,.59,.59,.59,.59,.59,.59,.93,.93,.93,.93],[-70,0,0,-36.9,-36.9,-36.9,-36.9,-40.1,-70,-70,-70,-70],[0,0,0,0,0,0,0,-10,0,0,0,0],[0,0,0,0,0,0,-37.5,-37.5,0,0,0,0],[250,250,250,250,250,250,250,250,250,250,250,250],[2500,2500,2500,2500,2500,2500,2500,2500,2500,2500,2500,2500],[.8,.8,.8,.34,.34,.34,.34,.34,.8,.8,.8,.8],[.6,.87,.87,.87,.87,.87,.87,.87,.6,.6,.6,.6],[3.5,3.5,3.5,3.5,3.5,3.5,3.5,3.5,3.5,3.5,3.5,3.5],[.7,.7,.7,.7,.7,.7,.7,.7,.7,.7,.7,.7],[0,0,0,0,0,0,0,0,0,0,0,0],[1.5,1.5,1.5,1.5,1.5,1.5,1.5,1.5,1.5,1.5,1.5,1.5],[180,180,180,180,180,180,180,180,180,180,180,180],[0,0,0,0,0,0,0,0,0,0,0,0],[0,0,.5,0,2.4,-11.5,-20.5,0,0,0,0,25.7],[-.56,0,-.41,-1,-1,-.88,-.67,-1,-1,-1,-1,-.57],[2,2,2,2,2,2,2,2,2,2,2,2],["G#3","G#3","G#3",null,"F#3",null,null,null,"G#3","F#4","F#4","G#3"],["E4","E4","E4","F#5","G#4","E6","F#4","C#4",null,null,null,"E4"],["3m","2n","6m","8m","6m","8m","7m","7m","8m","8m","8m","8m"],[1,1,1,1,1,1,1,.7,1,1,1,1],[-1e3,-1e3,-1e3,-20.4,-20.4,-18.7,-24.2,-13,-1e3,-1e3,-1e3,-1e3],[.2,0,0,0,0,0,0,0,0,0,0,0],[1,1,1,1,.23,1,.64,1,1,1,1,.37],["1n","2n","2n","2n","7m","6m","8m","7m","6m","10m","10m","6m"],["sawtooth","sawtooth","sawtooth","sawtooth","sawtooth","sawtooth","sawtooth","sine","sine","sine","sine","sine"],[0,0,20.3,0,0,23.1,-10.2,0,0,0,0,24.2],[.21296,.579,.579,2.81216,2.81216,2.81216,2.81216,7.78034,1.70368,1.70368,1.70368,1.70368],[1,1,1,1,1,1,1,1,1,1,1,1],[1,1,.71,1,1,1,1,1,1,1,1,1],[5,5,5,5,5,5,5,5,5,5,5,5],["linear","linear","linear","linear","linear","linear","linear","linear","linear","linear","linear","linear"],["exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential"],["linear","linear","linear","linear","linear","linear","linear","linear","linear","linear","linear","linear"],[420,420,420,420,420,269,281,281,420,420,420,420],[.4,.4,.4,.4,.4,.35,.35,.35,.4,.4,.4,.4],[.001,.001,.001,8.4375,8.4375,8.4375,8.4375,8.4375,.001,.001,.001,.001],[.8,.8,.8,.8,.8,.8,.8,.8,.8,.8,.8,.8],[0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0],["exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential"],["exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential"],[1.1,1.1,1.1,1.1,1.1,1.1,1.1,1.1,1.1,1.1,1.1,1.1],[3.5,3.5,3.5,3.5,3.5,3.5,3.5,3.5,3.5,3.5,3.5,3.5],[.7,.7,.7,.7,.7,.7,.7,.7,.7,.7,.7,.7],[0,0,0,0,0,0,0,0,0,0,0,0],[1.5,1.5,1.5,1.5,1.5,1.5,1.5,1.5,1.5,1.5,1.5,1.5],[180,180,180,180,180,180,180,180,180,180,180,180],[0,0,0,0,0,0,0,0,0,0,0,0],[.76,0,.7,.75,1,.74,.63,.65,.55,.01,.01,.22],["sine","sine","sine","sine","sine","sine","sine","sine","sine","sine","sine","sine"],[0,0,0,0,0,0,0,0,.75,.75,.75,.75],[1,1,1,1,1,1,1,1,1,1,1,1],[.5,.5,.5,.5,.5,.5,.5,.5,.5,.5,.5,.5],[-56,0,0,-49.5,-49.5,-49.5,-37.1,-51.9,-56,-56,-56,-56],[0,0,0,0,0,0,-21.1,-37.8,0,0,0,0],[0,0,0,0,0,0,-42.4,-19.3,0,0,0,0],[250,250,250,250,250,250,250,250,250,250,250,250],[2500,2500,2500,2500,2500,2500,2500,2500,2500,2500,2500,2500],[.8,.8,.8,0,0,0,.43,.7,.8,.8,.8,.8],[.6,.6,.6,.74,.74,.74,1,.47,.6,.6,.6,.6],[-9.4,-8.2,-9.3,-5.1,-3.5,-7.6,-12,-2.6,-5.7,-7.7,-17.3,-70],[0,0,0,0,0,.8,0,0,1.4,.5,.5,-18.1],[-.4,0,0,0,0,-.4,0,0,-70,-3.4,-3.4,-12.1],[139,250,458,250,194,250,50,70,135,50,50,135],[2500,2500,2500,2500,2500,2500,15561,15561,6347,9950,9950,6347],[.72,1,1,1,1,.77,1,1,1,1,1,1],[0,0,0,0,0,0,0,0,0,0,0,1],[0,.8,0,0,0,0,.8,0,.24,.24,.24,.19],[1,.6,1,.88,.91,.86,.6,.6,.03,.03,.03,1],[-1e3,-1e3,-20.6,-22.9,-24.2,-1e3,-16.4,-2.1,-9.8,-1e3,-1e3,-19.4],[-70,0,-70,-67.5,-70,-70,-70,-70,-69.5,-69.5,-69.5,-69.5],[-12.9,0,-33.9,-20.7,-15.1,-33.5,-37.6,-35.9,-19.1,-25.9,-25.9,-19.1],[-42.6,0,-32.4,-70,0,-50.9,-34.8,0,-33.2,-70,-70,-33.2],[250,250,250,250,250,250,250,250,250,250,250,250],[2500,2500,2500,2500,2500,2500,2500,2500,6456,6456,6456,6456],[3.5,3.5,0,3.5,3.5,3.5,3.5,3.5,35,35,35,35],[.7,.7,.12,.7,.7,.7,.7,.7,.7,.7,.7,.7],[0,0,0,0,0,0,0,0,0,0,0,0],[1.5,1.5,1.5,1.5,1.5,1.5,1.5,1.5,1.5,1.5,1.5,1.5],[180,180,212,180,180,180,180,180,180,180,180,180],[0,0,.31,0,0,0,0,0,0,0,0,0]],sp={scale:["E","F#","G#","B","C#"],tuning:{type:"just"},M:{fadeIn:15,envelope:{baseFrequency:.001,partials:[spl[18][si],spl[19][si],spl[20][si],spl[21][si]],phase:spl[22][si],minGain:spl[23][si],maxGain:spl[24][si]},compressor:{attack:spl[25][si],knee:spl[26][si],ratio:spl[27][si],release:spl[28][si],threshold:spl[29][si]},eq:{low:spl[30][si],mid:spl[31][si],high:spl[32][si],lowFrequency:spl[33][si],highFrequency:spl[34][si]},gain:spl[35][si]},returns:{reverb:{decay:spl[36][si],pre:spl[37][si]}},B1:{volMin:spl[38][si],volMax:spl[39][si],volLFORate:spl[40][si],difference:spl[41][si],note:spl[42][si],filterFrequency:spl[43][si],filterResonance:spl[44][si]},B2:{volMin:spl[45][si],volMax:spl[46][si],volLFORate:spl[47][si],difference:spl[48][si],filterFrequency:spl[49][si],filterResonance:spl[50][si],note:spl[51][si]},D:{polyphony:3,chord:[spl[53][si],spl[54][si],spl[55][si]],vol:spl[56][si],gainLFOMin:spl[57][si],gainLFOMax:spl[58][si],gainLFORate:spl[59][si],filterFrequency:spl[60][si],filterResonance:spl[61][si],filterRate:spl[62][si],filterDepth:spl[63][si],oscillators:[{coarse:spl[64][si],fine:spl[65][si],envelope:{attack:.946,decay:.6,sustain:spl[68][si],release:spl[69][si],decayCurve:"exponential",releaseCurve:"exponential"},vol:spl[72][si]},{coarse:spl[73][si],fine:spl[74][si],envelope:{attack:spl[75][si],decay:spl[76][si],sustain:1,release:30.2,decayCurve:"exponential",releaseCurve:"exponential"},vol:spl[81][si]},{coarse:spl[82][si],fine:spl[83][si],envelope:{attack:.946,decay:.6,sustain:1,release:5.41,decayCurve:"exponential",releaseCurve:"exponential"},vol:spl[90][si]},{coarse:spl[91][si],fine:spl[92][si],envelope:{attack:spl[93][si],decay:.6,sustain:1,release:spl[96][si],decayCurve:"exponential",releaseCurve:"exponential"},vol:spl[99][si]}],autoPan:{type:"sine",depth:spl[101][si],frequency:spl[102][si],wet:spl[103][si]},eq:{low:spl[104][si],mid:spl[105][si],high:spl[106][si],lowFrequency:spl[107][si],highFrequency:spl[108][si]},sends:{direct:spl[109][si],reverb:spl[110][si]}},S:{octave:spl[111][si],scaleDegreeShiftProbability:.1,clusterInterval:spl[114][si],clusterProbability:spl[115][si],minNoteDuration:spl[116][si],maxNoteDuration:spl[117][si],minClusterSize:spl[118][si],maxClusterSize:spl[119][si],maxScaleDegreeStep:2,vol:spl[121][si],oscillatorType:spl[122][si],amplitudeEnvelope:{attack:spl[123][si],decay:spl[124][si],sustain:spl[125][si],release:spl[126][si],decayCurve:"exponential",releaseCurve:"exponential"},filterFrequency:spl[129][si],filterResonance:spl[130][si],filterEnvelope:{attack:spl[131][si],decay:spl[132][si],sustain:spl[133][si],release:spl[134][si],decayCurve:"exponential",releaseCurve:"exponential",octaves:spl[137][si]},autoPan:{type:"sine",depth:spl[139][si],frequency:spl[140][si],wet:spl[141][si]},eq:{low:spl[142][si],mid:spl[143][si],high:spl[144][si],lowFrequency:250,highFrequency:2500},sends:{direct:spl[147][si],reverb:spl[148][si]},chorus:{delayTime:spl[149][si],depth:spl[150][si],feedback:spl[151][si],frequency:spl[152][si],spread:spl[153][si],wet:spl[154][si]}},P1:{polyphony:2,chord:[spl[156][si],spl[157][si]],repeatInterval:spl[158][si],repeatProbability:spl[159][si],vol:spl[160][si],gainLFOMin:0,gainLFOMax:spl[162][si],gainLFORate:spl[163][si],oscillatorType:spl[164][si],amplitudeEnvelope:{attack:spl[165][si],decay:1,sustain:spl[167][si],release:spl[168][si],attackCurve:"linear",decayCurve:"exponential",releaseCurve:"linear"},filterFrequency:spl[172][si],filterResonance:spl[173][si],filterEnvelope:{attack:spl[174][si],decay:.8,sustain:spl[176][si],release:spl[177][si],decayCurve:"exponential",releaseCurve:"exponential",octaves:spl[180][si]},autoPan:{type:"sine",depth:spl[182][si],frequency:spl[183][si],wet:spl[184][si]},eq:{low:spl[185][si],mid:spl[186][si],high:spl[187][si],lowFrequency:250,highFrequency:2500},sends:{direct:spl[190][si],reverb:spl[191][si]},chorus:{delayTime:3.5,depth:.7,feedback:0,frequency:1.5,spread:180,wet:0},detune:spl[198][si],pan:spl[199][si]},P2:{polyphony:2,chord:[spl[201][si],spl[202][si]],repeatInterval:spl[203][si],repeatProbability:spl[204][si],vol:spl[205][si],gainLFOMin:spl[206][si],gainLFOMax:spl[207][si],gainLFORate:spl[208][si],oscillatorType:spl[209][si],detune:spl[210][si],amplitudeEnvelope:{attack:spl[211][si],decay:1,sustain:spl[213][si],release:spl[214][si],attackCurve:"linear",decayCurve:"exponential",releaseCurve:"linear"},filterFrequency:spl[218][si],filterResonance:spl[219][si],filterEnvelope:{attack:spl[220][si],decay:.8,sustain:0,release:0,decayCurve:"exponential",releaseCurve:"exponential",octaves:1.1},chorus:{delayTime:3.5,depth:.7,feedback:0,frequency:1.5,spread:180,wet:0},pan:spl[233][si],autoPan:{type:"sine",depth:spl[235][si],frequency:1,wet:.5},eq:{low:spl[238][si],mid:spl[239][si],high:spl[240][si],lowFrequency:250,highFrequency:2500},sends:{direct:spl[243][si],reverb:spl[244][si]}},binauralEq:{low:spl[245][si],mid:spl[246][si],high:spl[247][si],lowFrequency:spl[248][si],highFrequency:spl[249][si]},binauralSends:{direct:spl[250][si],reverb:spl[251][si]},padSends:{direct:spl[252][si],reverb:spl[253][si]},padVol:spl[254][si],padEq:{low:spl[255][si],mid:spl[256][si],high:spl[257][si],lowFrequency:250,highFrequency:spl[259][si]},padChorus:{delayTime:spl[260][si],depth:spl[261][si],feedback:0,frequency:1.5,spread:spl[264][si],wet:spl[265][si]}},nf=2,p.b1=sp.B1.note?nm[sp.B1.volLFORate]:nf,p.b2=sp.B2.note&&0<sp.B2.volMax?nm[sp.B2.volLFORate]:nf,p.p1=-100<sp.padVol&&0<sp.P1.gainLFOMax?nm[sp.P1.gainLFORate]:nf,p.p1p=-100<sp.padVol&&0<sp.P1.gainLFOMax?parseFloat(sp.P1.autoPan.frequency):nf,p.p2=-100<sp.padVol&&0<sp.P2.gainLFOMax?nm[sp.P2.gainLFORate]:nf,p.p2p=-100<sp.padVol&&0<sp.P2.gainLFOMax?sp.P2.autoPan.frequency:nf,p.d=-100<sp.D.vol&&0<sp.D.gainLFOMax?nm[sp.D.gainLFORate]:nf,p.dp=-100<sp.D.vol&&0<sp.D.gainLFOMax?parseFloat(sp.D.autoPan.frequency):nf,p.df=-100<sp.D.vol&&0<sp.D.gainLFOMax?nm[sp.D.filterRate]:nf,p.s=-100<sp.S.vol?nm[sp.S.clusterInterval]:nf,p.sp=-100<sp.S.vol?parseFloat(sp.S.autoPan.frequency):nf,p.el_top="",p.el_bot="","none"!=p.e.v){mv=`*(map(w${p.uSE[0]},0.,c${p.uSE[0]},${p.el_exp.v[0]},${p.el_exp.v[1]}))`;for(let e=0;e<=4;e++)idx=e+6,r=map_r(hns[idx+1],0,1,.1,.275),cd=hns[idx],3==p.e_xy&&(1==p.e_z.v&&(p.el_top+=`c=${p.e.v}(V(uve.x,uve.y+.4),c,W(map(w${p.uSC[0]},0.,c${p.uSC[0]},${hns[idx]},${hns[idx+1]}*.8)),V(${r}${mv}),0.1,0.0025);c=${p.e.v}(V(uve.x,uve.y-.4),c,W(map(w${p.uSC[1]},0.,c${p.uSC[1]},${hns[idx+2]},${hns[idx+3]}*.8)),V(${r}${mv}),0.1,0.0025);`),0!=p.e_z.v&&1!=p.e_z.v||(p.el_bot+=`c=${p.e.v}(V(uve.x,uve.y+.4),c,W(map(w${p.uSC[0]},0.,c${p.uSC[0]},${hns[idx]},${hns[idx+1]}*.8)),V(${r}${mv}),0.2,0.0025);c=${p.e.v}(V(uve.x,uve.y-.4),c,W(map(w${p.uSC[1]},0.,c${p.uSC[1]},${hns[idx+2]},${hns[idx+3]}*.8)),V(${r}${mv}),0.2,0.0025);`)),4==p.e_xy&&(1==p.e_z.v&&(p.el_top+=`c=${p.e.v}(V(uve.x,uve.y+.4),c,W(map(w${p.uSC[0]},0.,c${p.uSC[0]},${hns[idx]},${hns[idx+1]}*.8)),V(${r}${mv}),0.1,0.0025);c=${p.e.v}(V(uve.x,uve.y-.4),c,W(map(w${p.uSC[0]},0.,c${p.uSC[0]},${hns[idx]},${hns[idx+1]}*.8)),V(${r}${mv}),0.1,0.0025);`),0!=p.e_z.v&&1!=p.e_z.v||(p.el_bot+=`c=${p.e.v}(V(uve.x,uve.y+.4),c,W(map(w${p.uSC[0]},0.,c${p.uSC[0]},${hns[idx+2]},${hns[idx+3]}*.8)),V(${r}${mv}),0.2,0.0025);c=${p.e.v}(V(uve.x,uve.y-.4),c,W(map(w${p.uSC[0]},0.,c${p.uSC[0]},${hns[idx+2]},${hns[idx+3]}*.8)),V(${r}${mv}),0.2,0.0025);`)),2==p.e_xy&&(p.el_top+=`c=${p.e.v}(V(uve.x,uve.y),c,W(map(w${p.uSC[0]},0.,c${p.uSC[0]},${hns[idx]},${hns[idx+1]}*.8)),V(${r}${mv}),0.1,0.0025);`,p.el_bot+=`c=${p.e.v}(V(uve.x,uve.y),c,W(map(w${p.uSC[0]},0.,c${p.uSC[0]},${hns[idx+4]},${hns[idx+5]}*.8)),V(${r}${mv}),0.2,0.0025);c=${p.e.v}(V(uve.x,uve.y+.5),c,W(map(w${p.uSC[0]},0.,c${p.uSC[0]},${hns[idx+4]},${hns[idx+5]}*.8)),V(${r}${mv})*0.8,0.2,0.0025);c=${p.e.v}(V(uve.x,uve.y-.5),c,W(map(w${p.uSC[0]},0.,c${p.uSC[0]},${hns[idx+4]},${hns[idx+5]}*.8)),V(${r}${mv})*0.8,0.2,0.0025);`),1==p.e_xy&&(1==p.e_z.v&&(p.el_top+=`c=${p.e.v}(V(uve.x,uve.y),c,W(map(w${p.uSC[0]},0.,c${p.uSC[0]},${hns[idx]},${hns[idx+1]}*.8)),V(${r}${mv}),0.1,0.0025);`),0!=p.e_z.v&&1!=p.e_z.v||(p.el_bot+=`c=${p.e.v}(V(uve.x,uve.y),c,W(map(w${p.uSC[0]},0.,c${p.uSC[0]},${hns[idx+2]},${hns[idx+3]}*.8)),V(${r}${mv})*1.2,0.2,0.0025);`))}let hnx=hash_ints.map((e,n)=>map_v_str(n,p.grid.v[0],p.grid.v[1])),hny=hash_ints.map((e,n)=>map_v_str(n,p.grid.v[2],p.grid.v[3]));p.grids=`F A,Bx,By,Px,Py,Hx,Hy,Hz,S,ctm;W cb,ct;A=.8;Py=0.;Px=0.;cb=W(.1); ct=W(.9); `,gw0=["1","2","4","8","14"];for(let e=1;e<=4;e++)radial_modifier="",4==e&&(radial_modifier="map(length(uv),0.,1.,.8,.9)*"),shuffle(p.gw),wbx=p.gw[0],wby=p.gw[1],whx=p.gw[2],why=p.gw[3],1==e&&(shuffle(gw0),wbx=gw0[0],wby=gw0[1],whx=gw0[2],why=gw0[3]),p.grids+=` ctm=${rb(.17,.5)}; cb=${radial_modifier}W(map(wGC,0.,cGC,0.,${rb(.1,.15)}));ct=${radial_modifier}W(map(wGC,0.,cGC,ctm,${rb(.95,1.05)})); Bx=map(w${wbx},0.,c${wbx},${hnx[e]},${hnx[e]}*${rb(1.05,1.2)});By=map(w${wby},0.,c${wby},${hny[e]},${hny[e]}*${rb(1.05,1.2)}); if (${rd()}>0.5){Py=map(wGP,0.,cGP,0.,${rb(.018,.025)});} Hx=map(w${whx},0.,c${whx},-A*${rb(.55,.45)},${rb(-.05,.05)});Hy=map(w${why},0.,c${why},-A*${rb(.55,.45)},${rb(-.05,.05)});S=${rb(.8,1.8)};${p.el_bot}c=mix(c,cb,smoothstep(0.,S,A*cos(Bx*TAU*(uv.x+(Px*TAU)))+Hx));c=mix(c,cb,smoothstep(0.,S,A*cos(By*TAU*(uv.y+(Py*TAU)))+Hy));c=mix(c,ct,smoothstep(0.,S,A*cos(Bx*TAU*(uw.x+(Px*TAU)))+Hx));c=mix(c,ct,smoothstep(0.,S,A*cos(By*TAU*(uw.y+(Py*TAU)))+Hy)); `;num_steps=111,pal_lerp=[];for(let n=0;n<p.pal.v.length-1;n++)for(let e=0;e<num_steps;e++)pal_lerp.push(lerp_hex(p.pal.v[n],p.pal.v[n+1],e/num_steps));for(let n=0;n<rb(0,pal_lerp.length);n++)e=pal_lerp.shift(),pal_lerp.push(e);function hex_rgb(e){e=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);return e?{r:parseInt(e[1],16),g:parseInt(e[2],16),b:parseInt(e[3],16)}:null}function sn(e){return e.toFixed(5)}d_array=[],pal_lerp.forEach(e=>{c_rgb=hex_rgb(e),d_array.push(c_rgb.r,c_rgb.g,c_rgb.b)});var texture=gl.createTexture();gl.bindTexture(gl.TEXTURE_2D,texture),gl.texImage2D(gl.TEXTURE_2D,0,gl.RGB,d_array.length/3,1,0,gl.RGB,gl.UNSIGNED_BYTE,new Uint8Array(d_array)),gl.texParameteri(gl.TEXTURE_2D,gl.TEXTURE_MIN_FILTER,gl.NEAREST),gl.texParameteri(gl.TEXTURE_2D,gl.TEXTURE_MAG_FILTER,gl.NEAREST),gl.texParameteri(gl.TEXTURE_2D,gl.TEXTURE_WRAP_S,gl.CLAMP_TO_EDGE),gl.texParameteri(gl.TEXTURE_2D,gl.TEXTURE_WRAP_T,gl.CLAMP_TO_EDGE);const alignment=1;function U(e,n){this.n=e,this.s=n,this.l=gl.getUniformLocation(pg,e)}function R(e){b=e.createBuffer(),e.bindBuffer(e.ARRAY_BUFFER,b),e.bufferData(e.ARRAY_BUFFER,R.v,e.STATIC_DRAW)}function rz(){ww=window.innerWidth,hh=window.innerHeight,hh>=.9*ww?(d=ww,w=d,h=16*d/9,h>hh&&(d=hh,w=9*d/16,h=d),cv.style.transform="rotate(0deg)"):(d=hh,w=d,h=16*d/9,h>ww&&(d=ww,w=9*d/16,h=d),cv.style.transform="rotate(-90deg)"),cv.width=w,cv.height=h,ur.set(w,h),gl.viewport(0,0,w,h),document.body.style.backgroundColor="#000"}gl.pixelStorei(gl.UNPACK_ALIGNMENT,alignment),vs="attribute vec2 a_position;attribute vec2 a_texcoord;varying vec2 v_texcoord;void main(){gl_Position=vec4(a_position,0,1);v_texcoord=a_texcoord;}",fs=` #define PI 3.141592653589793 #define TAU 6.283185307179586 #define V vec2 #define W vec3 #define F float precision highp float;uniform V ur;uniform sampler2D u_tex;uniform F fc;F shPos=${p.e_xy.toFixed(5)};F rotv=${p.rotation.v};F cB1=${sn(p.b1)};F cB2=${sn(p.b2)};F cP1=${sn(p.p1)};F cP1p=${sn(p.p1p)};F cP2=${sn(p.p2)};F cP2p=${sn(p.p2p)};F cD=${sn(p.d)};F cDf=${sn(p.df)};F cDp=${sn(p.dp)};F cS=${sn(p.s)};F cSp=${sn(p.sp)};F c1=1.;F c2=2.;F c4=4.;F c8=8.;F c14=14.;F c20=20.;F fB1=mod(fc,cB1);F fB2=mod(fc,cB2);F fP1=mod(fc,cP1);F fP1p=mod(fc,cP1p);F fP2=mod(fc,cP2);F fP2p=mod(fc,cP2p);F fD=mod(fc,cD);F fDp=mod(fc,cDp);F fDf=mod(fc,cDf);F fS=mod(fc,cS);F fSp=mod(fc,cSp);F f1=mod(fc,c1);F f2=mod(fc,c2);F f4=mod(fc,c4);F f8=mod(fc,c8);F f14=mod(fc,c14);F f20=mod(fc,c20);uniform F zB1,zB2,zP1,zP1p,zP2,zP2p,zD,zDp,zDf,zS,zSp,z1,z2,z4,z8,z14,z20;F wB1=cB1/2.*sin(TAU/cB1*fB1+zB1)+cB1/2.;F wB2=cB2/2.*sin(TAU/cB2*fB2+zB2)+cB2/2.;F wP1=cP1/2.*sin(TAU/cP1*fP1+zP1)+cP1/2.;F wP1p=cP1p/2.*sin(TAU/cP1p*fP1p+zP1p)+cP1p/2.;F wP2=cP2/2.*sin(TAU/cP2*fP2+zP2)+cP2/2.;F wP2p=cP2p/2.*sin(TAU/cP2p*fP2p+zP2p)+cP2p/2.;F wD=cD/2.*sin(TAU/cD*fD+zD)+cD/2.;F wDp=cDp/2.*sin(TAU/cDp*fDp+zDp)+cDp/2.;F wDf=cDf/2.*sin(TAU/cDf*fDf+zDf)+cDf/2.;F wS=cS/2.*sin(TAU/cS*fS+zS)+cS/2.;F wSp=cSp/2.*sin(TAU/cSp*fSp+zSp)+cSp/2.;F w1=1./2.*sin(TAU/1.*(f1)+z1)+1./2.;F w2=2./2.*sin(TAU/2.*(f2)+z2)+2./2.;F w4=4./2.*sin(TAU/4.*(f4)+z4)+4./2.;F w8=8./2.*sin(TAU/8.*(f8)+z8)+8./2.;F w14=14./2.*sin(TAU/14.*(f14)+z14)+14./2.;F w20=20./2.*sin(TAU/20.*(f20)+z20)+20./2.;F wGC=w${p.uGC};F cGC=c${p.uGC};F wGP=w${p.uGP};F cGP=c${p.uGP};F wFC=w${p.uFC};F cFC=c${p.uFC};F wSpiral=w${p.uSpiral};F cSpiral=c${p.uSpiral};F map(F value,F min1,F max1,F min2,F max2){return min2+(value-min1)*(max2-min2)/(max1-min1);} V rot(V uv,F a){uv=mat2(cos(a),-sin(a),sin(a),cos(a))*uv;return uv;} W circle(V uv,W c,W c_to,V r,F blur,F thickness){F d=length(uv)-r.x;return mix(c,c_to,1.0-smoothstep(0.0,blur,abs(d)-thickness));} W rect(V uv,W c,W c_to,V r,F blur,F thickness){V d=abs(uv)-r;F dd=length(max(d,V(0)))+min(max(d.x,d.y),0.0);return mix(c,c_to,1.0-smoothstep(0.0,blur,abs(dd)-thickness));} W diamond(V uv,W c,W c_to,V r,F blur,F thickness){uv=rot(uv,PI/4.);V d=abs(uv)-r*.8;F dd=length(max(d,V(0)))+min(max(d.x,d.y),0.0);return mix(c,c_to,1.0-smoothstep(0.0,blur,abs(dd)-thickness));} W none(V uv,W c,W c_to,V r,F blur,F thickness){return c;} W pre_blur(V uv){W c=W(0.0);V uvf=uv;V uve=uv;F sgn=${rc(["1.","-1."])};F spA=${rb(.1,.25)};F spB=${rb(.1,.15)};F spC=${rb(.2,.25)};if (rotv==1.){uv=rot(uv,sgn*PI/4.);} else if (rotv==2.){uv=rot(uv,sgn*TAU*length(uv)*spA);} else if (rotv==3.){uv=rot(uv,sgn*TAU*length(uv)*(0.25+map(wSpiral,0.,cSpiral,spA,spA)));} else if (rotv==4.){uv=rot(uv,sgn*TAU*length(uv)*map(wSpiral,0.,cSpiral,spB,spC)+TAU*cSpiral/8.);}V uw=uv*0.96;${p.grids} if (${tok_id}<200.){c=rect(uvf,c,W(map(wFC,0.,cFC,.3,.8)),V(0.55,.99),0.07,0.005);} return c;}W blur(V uv,V res,V dir){W c=W(0.0);V f1=V(1.411764705882353)*dir/2000.;V f2=V(3.2941176470588234)*dir/2000.;V f3=V(5.176470588235294)*dir/2000.;c += pre_blur(uv)*0.1964825501511404;c += pre_blur(uv+(f1))*0.2969069646728344;c += pre_blur(uv-(f1))*0.2969069646728344;c += pre_blur(uv+(f2))*0.09447039785044732;c += pre_blur(uv-(f2))*0.09447039785044732;c += pre_blur(uv+(f3))*0.010381362401148057;c += pre_blur(uv-(f3))*0.010381362401148057;return c;}W mc (V uv,W c){F ch=c.r;vec4 c_buf=texture2D(u_tex,V(ch,ch));c=W(c_buf.x,c_buf.y,c_buf.z);return c;} W m(V uv){V uv_=uv;V uvf=uv;V uve=uv;W c=W(0.);c=pre_blur(uv);c=blur(uv,ur.xy,V(${p.blur.v}));${p.el_top}if (${tok_id}<200.){c=rect(uvf,c,W(map(wFC,0.,cFC,.3,.8)),V(0.55,.99),0.07,0.005);} c=mc(uv_,c);return c;}void main(){V uv=(2.*gl_FragCoord.xy-ur.xy)/ur.y;W c=W(0.);c=m(uv);gl_FragColor=vec4(c,1.);} `,U.prototype.set=function(...e){m="uniform"+this.s,a=[this.l].concat(e),gl[m].apply(gl,a)},R.v=new Float32Array([-1,-1,1,-1,-1,1,1,1]),R.prototype.render=function(e){e.drawArrays(e.TRIANGLE_STRIP,0,4)},as=(e,n)=>{if(sh=gl.createShader(n),gl.shaderSource(sh,e),gl.compileShader(sh),!gl.getShaderParameter(sh,gl.COMPILE_STATUS))throw new Error("Shader compile error: "+gl.getShaderInfoLog(sh));gl.attachShader(pg,sh)},window.addEventListener("resize",rz),pg=gl.createProgram(),as(vs,gl.VERTEX_SHADER),as(fs,gl.FRAGMENT_SHADER),gl.linkProgram(pg),gl.useProgram(pg);var ur=new U("ur","2f"),fc=new U("fc","1f"),zB1=new U("zB1","1f"),zB2=new U("zB2","1f"),zP1=new U("zP1","1f"),zP1p=new U("zP1p","1f"),zP2=new U("zP2","1f"),zP2p=new U("zP2p","1f"),zD=new U("zD","1f"),zDp=new U("zDp","1f"),zDf=new U("zDf","1f"),zS=new U("zS","1f"),zSp=new U("zSp","1f"),z1=new U("z1","1f"),z2=new U("z2","1f"),z4=new U("z4","1f"),z8=new U("z8","1f"),z14=new U("z14","1f"),z20=new U("z20","1f");function oc(){an(),ae.init(sp,"playback"),ae.start(sp,Date.now()-st),cv.removeEventListener("click",oc)}function zr(e){return p0=e[0]*Math.PI/180,p1=e[1]*Math.PI/180,t=FC/30/sp.M.fadeIn,t<=1?(tt=-(Math.cos(Math.PI*t)-1)/2,p0+(p1-p0)*tt):p1}function inc(){FC++,c=FC/3e3,fc.set(c),FC/30/sp.M.fadeIn<=1&&(zB1.set(zr(pz.B1)),zB2.set(zr(pz.B2)),zP1.set(zr(pz.P1)),zP1p.set(zr(pz.P1p)),zP2.set(zr(pz.P2)),zP2p.set(zr(pz.P2p)),zD.set(zr(pz.D)),zDf.set(zr(pz.Df)),zDp.set(zr(pz.Dp)),zS.set(zr(pz.S)),zSp.set(zr(pz.Sp)),z1.set(zr(pz.Q1)),z2.set(zr(pz.Q2)),z4.set(zr(pz.Q4)),z8.set(zr(pz.Q8)),z14.set(zr(pz.Q14)),z20.set(zr(pz.Q20))),bb.render(gl)}function an(){inc(),requestAnimationFrame(an)}bb=new R(gl),pl=gl.getAttribLocation(pg,"a_position"),gl.enableVertexAttribArray(pl),gl.vertexAttribPointer(pl,2,gl.FLOAT,!1,0,0),rz(),inc(),console.log(tokenData.hash),console.log(`${p.feel} / ${p.song.n} / ${p.grid.n} / ${p.pal.n}`),cv.addEventListener("click",oc);
Rituals combines generative music and generative artwork to create 1000 unique windows into a singular parametric universe. The music and art are crafted to infinitely evolve, giving collectors a subtly new experience upon each viewing. If left running, a single Ritual will continue generating music and art without repeating for ~9 million years. We invite you to hold space for yourself and enjoy a moment of mindful stillness. Best experienced on modern equipment. Click to start. Artwork by Aaron Penne (@aaronpenne), music by Boreta (@boreta), music system produced by Counterpoint (ctpt.co).
Rituals combines generative music and generative artwork to create 1000 unique windows into a singular parametric universe. The music and art are crafted to infinitely evolve, giving collectors a subtly new experience upon each viewing. If left running, a single Ritual will continue generating music and art without repeating for ~9 million years. We invite you to hold space for yourself and enjoy a moment of mindful stillness. Artwork by Aaron Penne (@aaronpenne), music by Boreta (@boreta), music system produced by Counterpoint (ctpt.co).
function hti(e){let n=[];for(let e=0;e<32;e++)n.push(tokenData.hash.slice(2+2*e,4+2*e));return n.map(e=>parseInt(e,16))}function get_seed(e){return parseInt(tokenData.hash.slice(0,16),16)}function map_v(e,n=0,a=1){return map_r(hash_ints[e],0,255,n,a)}function map_v_str(e,n=0,a=1){return map_v(e,n,a).toFixed(6).toString()}function map_r(e,n,a,t,i){return(e-n)/(a-n)*(i-t)+t}function rr(){return Math.random()}function rd(){return seed^=seed<<13,seed^=seed>>17,seed^=seed<<5,((seed<0?1+~seed:seed)%1e3/1e3).toFixed(5)}function rb(e,n){return(e+(n-e)*rd()).toFixed(5)}function rc(e){return e[Math.floor(rb(0,.99*e.length))]}function rco(e){return a=[],e.forEach((e,n)=>{for(i=0;i<e.w;i++)a.push(e)}),rc(a)}function shn(e){return e.toFixed(5)}function lerp_hex(e,n,a){var t=+e.replace("#","0x"),i=t>>16,e=t>>8&255,t=255&t,n=+n.replace("#","0x");return"#"+((1<<24)+(i+a*((n>>16)-i)<<16)+(e+a*((n>>8&255)-e)<<8)+(t+a*((255&n)-t))|0).toString(16).slice(1)}function get_obj(e,n,a=!1){let t=e.filter(({n:e})=>e==n);return a?(t=t.map(({v:e})=>e),[...t]):t[0]}function shuffle(n){for(let e=n.length-1;0<e;e--){var a=Math.floor(rd()*(e+1));[n[e],n[a]]=[n[a],n[e]]}}cv=document.querySelector("canvas"),document.body.style.backgroundColor="#111",gl=cv.getContext("webgl"),st=(new Date).getTime(),tok_id=parseInt(tokenData.tokenId.slice(-4)).toFixed(5),MEQLOW=FC=fc=0,NDO=["32n","16n","8n","4n","2n","1n"],synth_flaga=0,synth_flagb=0,synth_list=[];let seed=get_seed(tokenData.hash),hash_ints=hti(tokenData.hash),hns=hash_ints.map((e,n)=>map_v_str(n,.1,1)),hnss=hash_ints.map((e,n)=>map_v_str(n,1,10));function expandClusterScale(a,e){let t=[];for(let n=0;n<e;n++)t=[...t,...a.map(e=>e<a[0]&&"C"<=e?`${e}${n+1}`:`${e}${n}`)];return t=[...t,`${a[0]}${e}`],t}function generateCluster(n,a,e,t,i,l,p,s=null){let r=[];var o=NDO.indexOf(e),c=Math.max(o,NDO.indexOf(t));let u=Math.floor(rb(0,n.length)),F=0;var x=Math.round(rb(i,l));for(let e=0;e<x;e++){var v=NDO[Math.round(rb(o,c))];if(r.push({t:F,note:n[u],duration:Tone.getTransport().toSeconds(v)}),s&&e===x-2){let e=a.indexOf(s.replace(/\d+/,""))-a.indexOf(n[u].replace(/\d+/,""));e<-a.length/2&&(e+=a.length),e>a.length/2&&(e-=a.length),u+e>=n.length&&(e-=a.length),u+e<0&&(e+=a.length),u+=e}else{var m=Math.ceil(rr()*p);let e=Math.sign(rr()-.5);0===u&&e<0&&(e=1),u===n.length-1&&0<e&&(e=-1),u=Math.max(0,Math.min(n.length-1,u+m*e))}F+=Tone.getTransport().toSeconds(v)}return r}function shiftClusterNote(e,n){let a=n.indexOf(e);return rr()<.5&&0<a?a--:a<n.length-1&&a++,n[a]}function n2f(n,a){if("just"!==a.tuning?.type)return new Tone.Frequency(n).toFrequency();{var[,t,n]=/([^\d]+)(\d+)/.exec(n),a=a.scale.indexOf(t);let e=n-4;return t<"E"&&"C"<=t&&--e,329.628*[1,1.125,1.265625,1.5,1.6875][a]*Math.pow(2,e)}}pho=90;let ae={init:(s,e="interactive")=>{ae.SScale=expandClusterScale(s.scale,1),Tone.setContext(new Tone.Context({latencyHint:e})),Tone.getTransport().bpm.value=60,ae.M=new Tone.Gain(0).toDestination(),ae.MEQ=new Tone.EQ3(s.M.eq).connect(ae.M),ae.MEnv=new Tone.Gain(0).connect(ae.MEQ),ae.MEnvLFO=new Tone.LFO({frequency:s.M.envelope.baseFrequency,partials:s.M.envelope.partials,phase:s.M.envelope.phase,min:s.M.envelope.minGain,max:s.M.envelope.maxGain,amplitude:1}).connect(ae.MEnv.gain),ae.comp=new Tone.Compressor(s.M.compressor).connect(ae.MEnv),ae.reverb=new Tone.Reverb({decay:10,preDelay:s.returns.reverb.pre/1e3}).connect(ae.MEnv),ae.reverb.generate(),ae.BDirectOut=new Tone.Gain(s.binauralSends.direct).connect(ae.MEQ),ae.BReverbOut=new Tone.Gain(s.binauralSends.reverb).connect(ae.reverb),ae.BEQ=new Tone.EQ3(s.binauralEq).connect(ae.BDirectOut).connect(ae.BReverbOut),ae.B1Volume=new Tone.Gain(0).connect(ae.BEQ),ae.B1VolLFO=new Tone.LFO({min:s.B1.volMin,max:s.B1.volMax,frequency:s.B1.volLFORate,amplitude:1}).connect(ae.B1Volume.gain),ae.B1Filter=new Tone.Filter({frequency:s.B1.filterFrequency,Q:s.B1.filterResonance,type:"lowpass",rolloff:"-24"}).connect(ae.B1Volume);e=(new Tone.Merge).connect(ae.B1Filter);ae.B1OscLeft=new Tone.Oscillator({frequency:new Tone.Frequency(s.B1.note).toFrequency(),volume:-15,channelCount:1}).connect(e,0,0),ae.B1OscRight=new Tone.Oscillator({frequency:new Tone.Frequency(s.B1.note).toFrequency()+s.B1.difference,volume:-15,channelCount:1}).connect(e,0,1),ae.B2Volume=new Tone.Gain(0).connect(ae.BEQ),ae.B2VolLFO=new Tone.LFO({min:s.B2.volMin,max:s.B2.volMax,frequency:s.B2.volLFORate,amplitude:1}).connect(ae.B2Volume.gain),ae.B2Filter=new Tone.Filter({frequency:s.B2.filterFrequency,Q:s.B2.filterResonance,type:"lowpass",rolloff:"-24"}).connect(ae.B2Volume);e=(new Tone.Merge).connect(ae.B2Filter);ae.B2OscLeft=new Tone.Oscillator({frequency:new Tone.Frequency(s.B2.note).toFrequency(),volume:-15,channelCount:1}).connect(e,0,0),ae.B2OscRight=new Tone.Oscillator({frequency:new Tone.Frequency(s.B2.note).toFrequency()+s.B2.difference,volume:-15,channelCount:1}).connect(e,0,1),ae.DDirectOut=new Tone.Gain(s.D.sends.direct).connect(ae.comp),ae.DReverbOut=new Tone.Gain(s.D.sends.reverb).connect(ae.reverb),ae.DGain=new Tone.Gain(0).connect(ae.DReverbOut).connect(ae.DDirectOut),ae.DGainLFO=new Tone.LFO({min:s.D.gainLFOMin??1,max:s.D.gainLFOMax??1,frequency:s.D.gainLFORate,amplitude:1}).connect(ae.DGain.gain),ae.DVolume=new Tone.Volume(s.D.vol).connect(ae.DGain),ae.DEQ=new Tone.EQ3(s.D.eq).connect(ae.DVolume),ae.DAP=new Tone.AutoPanner(s.D.autoPan).connect(ae.DEQ),ae.DF=new Tone.AutoFilter({frequency:s.D.filterRate,octaves:s.D.filterDepth,baseFrequency:s.D.filterFrequency,filter:{type:"lowpass",rolloff:"-12",Q:s.D.filterResonance}}).connect(ae.DAP),ae.DSynths=Array.from({length:3},(e,p)=>s.D.oscillators.map(({coarse:e,fine:n,vol:a})=>{n=1200*Math.log2(e)+n;let t=new Tone.Oscillator({type:"sawtooth",frequency:n2f(s.D.chord[p]??"E2",s),detune:n,volume:a}).connect(ae.DF),i=!1,l;return{triggerAttack:()=>{clearTimeout(l),i||(t.start(),i=!0)},triggerRelease:()=>{i&&(i=!1,l=setTimeout(()=>{t.stop()},1e3*s.M.fadeIn))},setFrequency:e=>{e?(t.frequency.value=e,i&&t.start()):i&&t.stop()},osc:t}})),ae.SDirectOut=new Tone.Gain(s.S.sends.direct).connect(ae.comp),ae.SReverbOut=new Tone.Gain(s.S.sends.reverb).connect(ae.reverb),ae.SVolume=new Tone.Volume(s.S.vol).connect(ae.SReverbOut).connect(ae.SDirectOut),ae.SEQ=new Tone.EQ3(s.S.eq).connect(ae.SVolume),ae.SAP=new Tone.AutoPanner(s.S.autoPan).connect(ae.SEQ),ae.SChorus=new Tone.Chorus(s.S.chorus).connect(ae.SAP),ae.SF=new Tone.Filter({type:"lowpass",rolloff:s.S.filterRolloff??"-24",Q:s.S.filterResonance}).connect(ae.SChorus),ae.SFEnv=new Tone.FrequencyEnvelope({baseFrequency:s.S.filterFrequency,...s.S.filterEnvelope}).connect(ae.SF.frequency),ae.SSynth=new Tone.Synth({oscillator:{type:s.S.oscillatorType},envelope:s.S.amplitudeEnvelope}).connect(ae.SF),ae.PDirectOut=new Tone.Gain(s.padSends.direct).connect(ae.comp),ae.PReverbOut=new Tone.Gain(s.padSends.reverb).connect(ae.reverb),ae.PVolume=new Tone.Volume(s.padVol).connect(ae.PDirectOut).connect(ae.PReverbOut),ae.PEQ=new Tone.EQ3(s.padEq).connect(ae.PVolume),ae.PChorus=new Tone.Chorus(s.padChorus).connect(ae.PEQ),ae.Ps=Array.from({length:2},(e,n)=>{let a=s[`P${n+1}`],t={};return t.gain=new Tone.Gain(0).connect(ae.PChorus),t.gainLFO=new Tone.LFO({min:a.gainLFOMin??1,max:a.gainLFOMax??1,frequency:a.gainLFORate,amplitude:1}).connect(t.gain.gain),t.autoPan=new Tone.AutoPanner(a.autoPan).connect(t.gain),t.pan=new Tone.Panner(a.pan).connect(t.autoPan),t.filter=new Tone.Filter({type:"lowpass",rolloff:a.filterRolloff??"-12",Q:a.filterResonance}).connect(t.pan),t.filterEnv=new Tone.FrequencyEnvelope({baseFrequency:a.filterFrequency,...a.filterEnvelope}).connect(t.filter.frequency),t.synths=Array.from({length:a.polyphony},()=>new Tone.Synth({oscillator:{type:a.oscillatorType,detune:a.detune},envelope:a.amplitudeEnvelope}).connect(t.filter)),t})},started:!(pz={B1:[rd()*pho,rr()*pho],B2:[rd()*pho,rr()*pho],Dp:[rd()*pho,rr()*pho],Df:[rd()*pho,rr()*pho],D:[rd()*pho,rr()*pho],M:[rd()*pho,rr()*pho],P1p:[rd()*pho,rr()*pho],P1:[rd()*pho,rr()*pho],P2p:[rd()*pho,rr()*pho],P2:[rd()*pho,rr()*pho],S:[90,90],Sp:[rd()*pho,rr()*pho],Q1:[rd()*pho,rr()*pho],Q2:[rd()*pho,rr()*pho],Q4:[rd()*pho,rr()*pho],Q8:[rd()*pho,rr()*pho],Q14:[rd()*pho,rr()*pho],Q20:[rd()*pho,rr()*pho]}),start:async(t,e)=>{if(!ae.started){await Tone.start(),Tone.getTransport().start(),clearTimeout(ae.lastBinauralStopper),t.B1.note&&(ae.B1OscLeft.start(),ae.B1OscRight.start()),t.B2.note&&(ae.B2OscLeft.start(),ae.B2OscRight.start()),ae.DSynths.forEach((e,n)=>e.forEach(e=>t.D.chord[n]&&e.triggerAttack())),ae.SCluster=generateCluster(ae.SScale,t.scale,t.S.minNoteDuration,t.S.maxNoteDuration,1,t.S.maxClusterSize,2,t.B1.note),ae.SPattern=new Tone.Pattern({callback:e=>{rr()<t.S.clusterProbability&&ae._playSynth(e,t)},values:[!0],interval:t.S.clusterInterval}).start(),ae.PPatterns=ae.Ps.map((e,n)=>{let a=t[`P${n+1}`];return new Tone.Pattern({callback:e=>{rr()<a.repeatProbability&&ae._playPad(n,e,t)},values:[!0],interval:a.repeatInterval}).start()}),ae.MEnvLFO.phase=pz.M[1],ae.B1VolLFO.phase=pz.B1[1],ae.B2VolLFO.phase=pz.B2[1],ae.DAP.phase=pz.Dp[1],ae.DGainLFO.phase=pz.D[1],ae.DF.phase=pz.Df[1],ae.SAP.phase=pz.Sp[1],ae.Ps[0].autoPan._lfo.phase=pz.P1p[1],ae.Ps[0].gainLFO.phase=pz.P1[1],ae.Ps[1].autoPan._lfo.phase=pz.P2p[1],ae.Ps[1].gainLFO.phase=pz.P2[1],ae.MEnvLFO.start(),ae.B1VolLFO.start(),ae.B2VolLFO.start(),ae.DAP.start(),ae.DGainLFO.start(),ae.DF.start(),ae.SAP.start(),ae.SChorus.start();for(var n of ae.Ps)n.autoPan.start(),n.gainLFO.start();ae.PChorus.start(),ae.M.gain.setValueAtTime(0,Tone.now()),ae.M.gain.linearRampToValueAtTime(t.M.gain,Tone.now()+t.M.fadeIn),ae.SVolume.volume.setValueAtTime(-1e3,Tone.now()),ae.SVolume.volume.linearRampToValueAtTime(sp.S.vol,Tone.now()+t.M.fadeIn+7),ae.started=!0}},_playSynth:(i,l)=>{let p=[...ae.SCluster];for(let e=1;e<p.length;e++){var n,a,t;rr()<.1&&(n=Tone.getTransport().toSeconds(l.S.minNoteDuration)/2,a=p[e],t=p[e-1],rr()<.5?(p[e-1]={...t,duration:t.duration-n},p[e]={...a,t:a.t-n,duration:a.duration+n}):(p[e-1]={...t,duration:t.duration+n},p[e]={...a,t:a.t+n,duration:a.duration-n}))}synth_flaga=0,synth_flagb=0,synth_list=[];for(let t=0;t<p.length;t++){let{t:e,note:n,duration:a}=p[t];t!==p.length-1&&rr()<.1&&(n=shiftClusterNote(n,ae.SScale));var s=n2f(n,l)*Math.pow(2,l.S.octave),r=.07*rr();ae.playSynthNote(i+e+r,s,a)}},playSynthNote:(e,n,a)=>{--synth_flaga,synth_flagb+=1,synth_list.push(a),ae.SSynth.triggerAttackRelease(n,a,e),ae.SFEnv.triggerAttackRelease(a,e)},_playPad:(a,t,i)=>{var l=i[`P${a+1}`],p=Tone.getTransport().toSeconds(l.repeatInterval)/3,s=.07*rr();for(let n=0;n<l.chord.length;n++){var r=l.chord[n];let e=ae.Ps[a].synths[n];r&&e.triggerAttackRelease(n2f(r,i),p,t+s),ae.Ps[a].filterEnv.triggerAttackRelease(p,t+s)}}},pp={pal:[{w:15,n:"Awe",v:"F2F3EEF2F3EEF0EDDA7D88975269939B361CF0EDDA39609400155F9B361CE5E6D8FAE193CC948200337F394F77D6AAA5A2938D5C98B43989A93D0000C66C5656526F905B5FDC9B80F0ECDB939690F5EBD9CC94828E74894DA9CC6D492BD8D1BEF3EED9F2F3EEF2F3EE"},{w:8,n:"Elysium",v:"F2F3EEF2F3EECBC6D5BDB4BD636474F2F3EE424D389794A0F2F3EEF2F3EE9A9AB08D73777A5663F2F3EE70595D935C689D8798B7BDC8817D7F9A9FA8F2F3EEF2F3EE888789967E8759454A474B467A5663F2F3EE70595D935C68564E49F2F3EEF2F3EE848A925A687C291F007A566370595D935C6835362EF2F3EEF2F3EE"},{w:8,n:"Liquid Dusk",v:"F2F3EEF2F3EEB68662230D00B68662BF8C61C88F5AD19559D39959D69B55E8A557EFA953E3A64BE5BA5CEFD171E6C96DE8CE81EBDDACE9E7CEECE3E4E4E5E9E6E7E1F5E3BDE7BC6EBD7E1FB36F1C9953177F3B0E7F401786522A895F35F2F3EE926B40A2774CBF94699C7347784F316A4027643A246C46335D3C2B2C16092C1609F2F3EEF2F3EE6D452C8E5D35B47F49D09E61DDB67BF6DAA8D7C499E5C384BF9D5EF2F3EEF2F3EE"},{w:8,n:"Chimera",v:"F2F3EEF2F3EE064f6e064f6ef68c5040456af3a257F2F3EEF2F3EE064f6e064f6ef68c5040456af3a257F2F3EEF2F3EE"},{w:8,n:"Moonpool",v:"F2F3EEF2F3EE6E8FB09DADC65D718C6D7E987989A28099B74465845E748C72849A78859639405071788A525F720E1D3408172E485367636B7E5A7995F2F3EEF2F3EE2E486334455F1F2B4573839D1C2A44434D665F66801E28416261694D5973606F843E4A5A00000B6261696C809B4E627DF2F3EEF2F3EE"},{w:10,n:"Body Electric",v:"F2F3EEF2F3EE0000001212120000003636368484847A7A7A5C5C5C4747471313132727271313130000001717172D2D2D707070B4B4B4F2F3EEF2F3EECBCBCBC0C0C02121211A1A1AF2F3EEF2F3EE969696C9C9C98181810000000202025C5C5C454545959595CBCBCBBEBEBEC9C9C92121211A1A1A646464BCBCBCAAAAAAF2F3EEAEAEAE646464010101272727010101010101F2F3EEF2F3EE"},{w:11,n:"Holotropic",v:"F2F3EE9C5555A298A3738CA20041701E547B194B6B717E7588978BAAABAC39688D909EA2748E92113864002357194B6B625E78928E945C5953829C983A5E779C55556E15059C5555F2F3EE94A0B4A4A0AE92A0AB7E8485BEBAB9928E832E303C92A1A67061685D5B613075925E717B668385F2F3EE194B6B113864002357194B6B759299B5BBBD92A8AEF2F3EEF2F3EE"},{w:8,n:"Asteria",v:"6346525845527242468C505577566468576A471F300C01255A5A816A638D9F839BD9C8B5CEC8B27242468C5055C7B49FC7B49FBEB0A4A99B999285878A8D918C9097ADAAAF0C01259691A38C849E8A809A7242468C50558A7F9F816D8F7356759B7386471F300C0125B5837FA773707C5E5D7E605F785E5485665A99705F926551"},{w:12,n:"Meadow",v:"121B2A01002801001265899759869BD3D6DBDBD2D7DED2D4F6EDE8F9C37DF9C37D444849455C6A5D8795567D8CF2F3EEF2F3EE4A707D567C89375F6B2F545D14191F000929C9BCACB57657BB6B4AC4704BAA6D51A69A8CD9DDE0D9DDE021210009182D1F2227253C4238575C31505317292D4B666F5B7C833C4A4D000000D69F5FD69F5FD2C7C3C6BCBAC3BDBDB6BABB4E6C765A737A000000181B2014151A"},{w:4,n:"Halcyon",v:"9A95A0756485B6A5C89B85A2835061C58FADBC849E883E3FBD636ECF707D7039468C495CB9627D683D4D3F2D397F43645E37502528304A354F3A2D3E1E231D2425252225232224232123222123222123222123221C211E2E272D42303D26262D482F377B40484C3037442F35A9554E9C4E474E282BB26A53CE7C5D8843319A605BC48A8CA06B6A714A4FA88DB1A38AAE594662B1A9B4"}],song:[{w:10,n:"Harmonic Transmission",v:1},{w:10,n:"Emanating Dreamscape",v:2},{w:10,n:"Oceanic Expanse",v:3},{w:10,n:"The Deep Now",v:4},{w:10,n:"Glimmering Horizon",v:5},{w:10,n:"Weightless River",v:6},{w:10,n:"Timeless Window",v:7},{w:10,n:"Infinite Portal",v:8},{w:10,n:"Luminous Space",v:9},{w:10,n:"Weightless Moment",v:10},{w:10,n:"Present-Time Awareness",v:11},{w:2,n:"Interbeing",v:12}],rotation:[{w:7,n:"Unperturbed",v:"0."},{w:3,n:"Angled",v:"1."},{w:1,n:"Whip Spiral",v:"3."},{w:2,n:"Eternal Spiral",v:"4."}],blur:[{w:1,n:"Angled Positive",v:"10.,10."},{w:1,n:"Angled Negative",v:"-10.,10."},{w:3,n:"Vertical",v:"0.,10."},{w:2,n:"Horizontal",v:"10.,0."}],e:[{w:0,n:"Water",v:"circle"},{w:0,n:"Earth",v:"rect"},{w:0,n:"Fire",v:"diamond"},{w:0,n:"Air",v:"none"}],e_xy:[{w:0,n:"Centered",v:1},{w:0,n:"Duality",v:3},{w:0,n:"Symmetric Duality",v:4},{w:0,n:"Trinity",v:2},{w:0,n:"None",v:0}],e_z:[{w:2,n:"Below",v:0},{w:1,n:"Omnipresent",v:1}],el_exp:[{w:1,n:"Expanding",v:[.9,1.2]},{w:10,n:"Static",v:[.95,1.05]}],grid:[{w:3,n:"Transcend",v:[2,4,2,4]},{w:2,n:"Exhale",v:[2,4,10,15]},{w:2,n:"Inhale",v:[10,15,2,4]},{w:3,n:"Lattice",v:[10,15,10,15]},{w:2,n:"Passage",v:[25,30,10,15]},{w:2,n:"Universal",v:[25,30,25,30]}]},p={pal:rco(pp.pal),rotation:rco(pp.rotation),blur:rco(pp.blur),e:rco(pp.e),el_exp:rco(pp.el_exp),grid:rco(pp.grid),song:rco(pp.song)};p.feel=["Immersive","Spacious","Serene","Spacious","Spacious","Immersive","Immersive","Spacious","Serene","Immersive","Serene","Heartbeat"][p.song.v-1],p.pal.v=p.pal.v.match(/.{6}/g).map(e=>"#"+e);let nm={"16n.":.0234375,"16n":.25/16,"8n.":.046875,"8n":.25/8,"4n.":.09375,"4n":.0625,"2n.":.1875,"2n":.125,"1n.":.375,"1n":.25,"1m":.25,"2m":.5,"3m":.75,"4m":1,"5m":1.25,"6m":1.5,"7m":1.75,"8m":2,"9m":2.25,"10m":2.5,"11m":2.75,"12m":3};if(vpl=[["Water","Water","Water","Fire","Fire","Fire","Air","Earth","Earth","Earth","Air",rc(["Earth","Fire","Water"])],[1,3,2,1,3,2,0,1,3,2,0,2],[["S"],[rc(["S","D"]),rc(["S","D"])],["S"],["S"],["S","S"],["S"],["S"],["S"],[rc(["B1","B2"]),rc(["B1","B2"])],["S"],["B1"],["Sp"]],[["D"],[rc(["S","D"]),rc(["S","D"])],["D"],["S"],[rc(["S","B2"]),rc(["S","B2"])],["S"],["S"],["S"],[rc(["D","B2"]),rc(["D","B1"])],["S"],["B1"],["Sp"]],["D","D","B1","B2","P2","B1","S","B2","D","B2",rc(["B1","B2"]),"D"],[["B1","B2","D","Df","S","Sp","2","1"],["B1","B2","D","Df","S","2","1"],["B1","B2","S","P2p","D","Df","2","1"],["B1","B1","P1","P2p","D","Df","S","2","1"],["B1","B2","P2","P2p","S","S","2","1"],["B1","B2","D","Df","S","2","1"],["B1","B2","D","Df","P1","P2","P2p","S","2","1"],["B1","B2","P2","P2p","S","2","1"],["B1","B2","D","Df","S","Sp","2","1"],["B1","B2","D","Df","S","S","2","1"],["B1","B2","4","2","1"],["B1","B2","P1","P2","D","Df"]],["14","14","14","14","14","14","14","14","14","14","14","14"],["D","D","D","D","S","D",rc(["B1","D"]),"P2","D","B1",rc(["B1","B2"]),"B1"],[rc(["B1","D"]),rc(["B1","Df"]),"D","D",rc(["B2","P1p"]),"B2","S","S","B2","B2",rc(["B1","B2"]),"B2"]],si=p.song.v-1,p.e=get_obj(pp.e,vpl[0][si]),p.e_xy=vpl[1][si],p.e_z=rc([0,1]),p.uSC=vpl[2][si],p.uSE=vpl[3][si],p.uGC=vpl[4][si],p.gw=vpl[5][si],p.uFC=vpl[6][si],p.uSpiral=vpl[7][si],p.uGP=vpl[8][si],"none"==p.e.v?p.e_z={w:0,n:"None",v:0}:(p.e_z=rco(pp.e_z),p.el_exp=rco(pp.el_exp)),spl=[[60,60,60,60,60,60,60,60,60,60,60,60],["E","E","E","E","E","E","E","E","E","E","E","E"],["F#","F#","F#","F#","F#","F#","F#","F#","F#","F#","F#","F#"],["G#","G#","G#","G#","G#","G#","G#","G#","G#","G#","G#","G#"],["B","B","B","B","B","B","B","B","B","B","B","B"],["C#","C#","C#","C#","C#","C#","C#","C#","C#","C#","C#","C#"],["just","just","just","just","just","just","just","just","just","just","just","just"],[1,1,1,1,1,1,1,1,1,1,1,1],[1.125,1.125,1.125,1.125,1.125,1.125,1.125,1.125,1.125,1.125,1.125,1.125],[1.265625,1.265625,1.265625,1.265625,1.265625,1.265625,1.265625,1.265625,1.265625,1.265625,1.265625,1.265625],[1.5,1.5,1.5,1.5,1.5,1.5,1.5,1.5,1.5,1.5,1.5,1.5],[1.6875,1.6875,1.6875,1.6875,1.6875,1.6875,1.6875,1.6875,1.6875,1.6875,1.6875,1.6875],["E","E","E","E","E","E","E","E","E","E","E","E"],[4,4,4,4,4,4,4,4,4,4,4,4],[329.628,329.628,329.628,329.628,329.628,329.628,329.628,329.628,329.628,329.628,329.628,329.628],[.07,.07,.07,.07,.07,.07,.07,.07,.07,.07,.07,.07],[15,15,15,15,15,15,15,15,15,15,15,15],[.001,.001,.001,.001,.001,.001,.001,.001,.001,.001,.001,.001],[.55,.75,.75,.75,.75,.75,.75,.75,0,0,0,.59],[.79,.71,.71,.71,.71,.71,.71,.71,1,1,1,.5],[.04,.88,.88,.88,.88,.88,.88,.86,.73,.73,.73,.47],[.52,.52,.52,.52,.52,.52,.52,.48,.52,.52,.52,.43],[122,188,188,188,188,188,188,207,122,122,122,28],[1,1,1,1,1,1,.39,1,0,0,0,1],[1,1,1,1,1,1,1,1,1,1,1,1],[.003,.003,.003,.021,.003,.027,.003,.003,.003,.042,.042,.024],[0,16.5,28.3,18.1,7.1,24.8,30,15.7,30,7.4,7.4,0],[14,20,2.4,1,19.8,5.2,20,20,14.4,20,20,1],[.08,.07,.06,.08,.06,.07,.25,.25,.25,.21,.42,.25],[-32.5,-10.3,-11.5,0,-.6,-20.8,-33.1,-16.2,-44.3,0,-27.1,0],[-11,-3,-4,-7.8,-4.6,-3.1,-8.8,-2,-3.5,-4.7,-3.7,-8.9],[0,0,0,0,0,0,0,.4,0,0,0,0],[.8,0,0,0,0,0,0,0,0,0,0,0],[71,250,76,250,192,250,250,250,194,133,133,194],[17073,2500,2500,869,2500,2500,2500,2500,17073,17073,17073,17073],[9.5,8.23,8.14,10,5.74,8.1,6.09,5.57,7.6,7.02,5.83,7.28],[10,10,10,10,10,10,10,10,10,10,10,10],[2.5,54.7,54.7,54.7,54.7,54.7,54.7,54.7,2.5,2.5,2.5,2.5],[.22,.28,.46,.13,.16,.03,.13,.09,.12,.06,.01,0],[1,1,1,1,1,1,.83,1,1,.65,.64,.19],["2m","2m","8m","6m","5m","4m","8m","4m","5m","8m","8m","8m"],[1,4,4,1,1,1,1,1,1,1,1,14],["G#1","G#1","G#1","C#2","C#2","E1","B1","F#1","F#1","G#1","F#1","F#2"],[2e3,2e3,2e3,2e3,2e3,2e3,2e3,2e3,2e3,962,962,2e3],[1,5.9,5.9,5.9,5.9,0,5.9,5.9,1,1,1,1],[.16,.19,0,.21,.03,0,0,0,0,.04,.04,0],[.81,1,.51,1,.73,1,.72,.38,.22,.17,.35,.33],["6m","6m","12m","12m","8m","7m","12m","6m","8m","6m","6m","8m"],[14,1,1,4,1,14,4,1,8,8,8,14],[2e3,226,226,1649,1972,1649,394,1649,367,1834,1834,1264],[1,0,0,0,0,0,0,0,1,1,1,1],["F#2","E3","B2","E3","G#2","E2","C#3","B2","E3","C#2","E2","C#3"],[3,3,3,3,3,3,3,3,3,3,3,3],["B1","B1","B1","C#2","C#2","F#1","F#1","F#1","F#1",null,null,"E1"],["E2",null,null,null,null,"F#2","C#3","C#3","E2","G#2","G#2","C#2"],["E3",null,null,null,null,"F#3",null,null,null,null,null,null],[-12.7,-9.4,-11.9,-24.8,-1e3,-28.8,-22.1,-1e3,-27.6,-30.2,-1e3,-23.3],[0,0,0,0,0,.19,0,0,0,0,0,0],[.88,.8,.8,.54,1,1,1,1,1,1,1,.78],["9m","6m","12m","10m","10m","7m","5m","5m","7m","7m","7m","12m"],[93,83,83,49,72,80,22,24,121,661,661,88],[0,0,0,0,0,0,0,0,1,1,1,1],["5m","7m","7m","9m","8m","5m","6m","7m","4m","4m","4m","9m"],[.69,.43,.43,1.71,0,1.26,2.36,2.94,0,0,0,.04],[.5,1,1,.5,1,1,.5,.5,1,4,4,.5],[1200,1200,1200,1200,1200,1200,1200,1200,1200,0,0,922],[.946,.946,.946,.946,.946,.946,.946,.946,.946,.946,.946,.946],[.6,.6,.6,.6,.6,.6,.6,.6,.6,.6,.6,.6],[1,1,1,1,1,1,.33,.33,1,1,1,1],[42.5,42.5,42.5,42.5,42.5,42.5,20.58,20.58,42.5,42.5,42.5,42.5],["exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential"],["exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential"],[0,-1.3,-1.3,-1.3,-1.3,-1.3,-1.3,-1.3,0,-7.6,-7.6,0],[1,1,1,1,1,1,2,2,1,1,1,2],[700,700,700,700,700,700,700,700,700,700,700,297],[20,.946,.946,.946,.946,.946,.946,.946,20,20,20,20],[.03072,.6,.6,.6,.6,.6,.6,.6,.03072,.03072,.03072,.03072],[1,1,1,1,1,1,1,1,1,1,1,1],[30.2,30.2,30.2,30.2,30.2,30.2,30.2,30.2,30.2,30.2,30.2,30.2],["exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential"],["exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential"],[-13.1,-1,-1,-1,-1,-1,-1,-1,-13.1,-13.1,-13.1,-13.1],[3,2,2,1,2,2,.5,.5,.5,.5,.5,.5],[1200,1200,1200,1200,1200,1200,1200,1200,1200,642,642,1200],[.946,.946,.946,.946,.946,.946,.946,.946,.946,.946,.946,.946],[.6,.6,.6,.6,.6,.6,.6,.6,.6,.6,.6,.6],[1,1,1,1,1,1,1,1,1,1,1,1],[5.41,5.41,5.41,5.41,5.41,5.41,5.41,5.41,5.41,5.41,5.41,5.41],["exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential"],["exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential"],[0,-4.1,-4.1,-4.1,-4.1,-4.1,-4.1,-4.1,0,-1e3,-1e3,0],[.5,1,1,1,1,1,3,3,.5,.5,.5,.5],[1186,0,0,0,0,0,0,0,1186,1186,1186,1186],[.946,2.97754,2.97754,2.97754,2.97754,2.97754,2.97754,2.97754,.946,.946,.946,.946],[.6,.6,.6,.6,.6,.6,.6,.6,.6,.6,.6,.6],[1,1,1,1,1,1,1,1,1,1,1,1],[5.41,5.41,5.41,5.41,5.41,5.41,13.61886,13.61886,5.41,5.41,5.41,5.41],["exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential"],["exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential"],[-3.7,0,0,0,0,0,0,0,-3.7,-1e3,-1e3,-3.7],["sine","sine","sine","sine","sine","sine","sine","sine","sine","sine","sine","sine"],[.46,1,1,.28,.55,.81,1,.25,.44,.24,.24,.65],[.2,.1,.1,.1,.1,.1,.1,.1,.1,5.4,5.4,.1],[1,.65,.65,.16,.16,.43,.41,.43,.29,0,0,.29],[-68.5,-70,-70,-70,-54.5,-70,-70,-70,-70,-70,-70,-70],[-37.3,-22.5,-40,-8.6,-12.2,-12,-10.1,-22.3,-13.6,-7.2,-7.2,-11.3],[-60.4,-10.6,-1.5,-9.9,-70,-32.3,-34.8,-14.8,-22.7,-5.7,-5.7,-70],[250,50,50,50,50,50,50,50,250,250,250,250],[2500,18e3,18e3,18e3,18e3,18e3,18e3,18e3,2500,2500,2500,2500],[.53,.72,.72,.52,.72,.87,.87,.87,.78,1,1,0],[1,1,1,1,1,.74,.74,.74,.83,.83,.83,1],[3,4,3,4,3,3,4,4,4,4,4,1],[.1,.1,.1,.1,.1,.1,.1,.1,.1,.1,.1,.1],[.1,.1,.1,.1,.1,.1,.1,.1,.1,.1,.1,.1],["8m","6m","4m","8m","8m","6m","6m","5m","5m","5m","5m","1m"],[1,1,1,1,1,.6,.9,1,.8,.9,.6,1],["4n","8n","16n","16n","16n","16n","4n","16n","16n","8n","8n","16n"],["2n","1n","8n","1n","8n","4n","2n","4n","1n","2n","2n","16n"],[4,3,1,1,1,3,1,6,6,3,3,1],[7,8,5,8,8,8,5,8,8,5,5,3],[2,2,2,2,2,2,2,2,2,2,2,2],[-16.9,-30.4,-13.7,-22.8,-6.6,-9.8,-13.8,-6.9,-27.1,-22.2,-1e3,-10.4],["sine","sine4","sine4","sine2","sine4","sine2","square2","sine","sine","fatsine2","fatsine2","sine"],[1.8225,3.70386,1.94672,1.01306,.43904,1.18638,1.8225,.54,.0675,.24334,1.70368,.41458],[5.4675,1,5.4675,1,9.9825,1,.06,1,1.31712,1.31712,.2025,.55566],[.59,.4,.64,.4,.72,.4,.86,.78,.29,.57,.62,.49],[25.3125,17.24976,35.56224,21.47466,9.9825,15.00282,28.47312,.73002,21.47466,24.31344,24.31344,17.24976],["exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential"],["exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential"],[5281,362,362,362,341,362,3587,1748,4035,5399,5399,1594],[0,.4,.4,.4,.4,.4,.4,.4,.4,.4,.4,.4],[1.09744,1.09744,1.09744,.001,1.01306,2.81216,2.81216,.02662,1.09744,.3125,.3125,1.09744],[.8,.8,.8,.8,.8,.8,.8,.8,.8,.8,.8,23.34102],[.83,0,0,0,0,0,0,0,0,0,0,0],[24.31344,0,0,0,0,9.9825,9.9825,9.9825,0,0,0,0],["exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential"],["exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential"],[1.9,1.1,1.1,1.1,1.1,1.8,1.8,1.8,1.1,1.1,1.1,1.1],["sine","sine","sine","sine","sine","sine","sine","sine","sine","sine","sine","sine"],[.2,.61,.92,.99,.14,.53,.38,.24,.27,.27,0,0],[1,.1,.1,.1,.1,.1,.1,.1,1,1,1,1],[1,.61,.71,.71,.07,.5,.5,.5,.5,.5,0,0],[-70,-70,-70,-70,-70,-70,-70,-70,-70,-70,-70,-2.2],[-20.8,-11.3,-36.1,-25.9,-35,-33.9,-19.7,-34.5,-16.6,-20.3,-2.6,-.9],[-37.3,0,0,-47.3,0,-10.6,-17,-55.6,0,0,0,0],[250,250,250,250,250,250,250,250,250,250,250,250],[2500,2500,2500,2500,2500,2500,2500,2500,2500,2500,2500,2500],[.11,.31,.48,0,.37,0,0,.33,.18,1,1,1],[.91,1,1,1,.9,.91,.41,.78,1,.92,.92,.38],[0,3.5,3.5,54,54,89,67,32,19,0,0,0],[0,.7,.7,0,0,.7,.7,.7,0,0,0,0],[.32,0,0,0,0,0,0,0,.32,.32,.32,.01],[37.3,1.5,1.5,1.5,1.5,1,1,1,37.3,37.3,37.3,0],[0,180,180,180,180,75,75,220,0,0,0,0],[.1,0,0,.27,.43,0,0,0,0,0,0,0],[2,2,2,2,2,2,2,2,2,2,2,2],["E2","C#3","C#3",null,"G#2",null,null,null,null,null,null,"E4"],["F#2","E4","E4","C#5","G#4","C#5","C#4","F#3","C#4","B4","B4","C#4"],["6m","2n","6m","4m","8m","8m","8m","7m","5m","5m","5m","5m"],[.9,.8,.8,.8,.8,.8,.8,.6,1,1,1,1],[-22.3,-1e3,-1e3,-29.4,-29.4,-25.8,-23.9,-22.6,-22.3,-22.3,-22.3,-22.3],[0,0,0,0,0,0,0,0,0,0,0,0],[1,.77,.87,.44,.8,.77,.77,.77,.61,.61,.61,.44],["1n","1n","1n","6m","1n","1n","3m","1n","1n","1n","1n","4m"],["sawtooth","sawtooth","sawtooth","sawtooth","sawtooth","sawtooth","sawtooth","sine","sine","sawtooth","sawtooth","sine"],[1.18638,.05488,1.37842,9.86078,9.86078,9.86078,9.86078,.71874,6.28864,6.28864,6.28864,6.28864],[1,1,1,1,1,1,1,1,1,1,1,1],[1,.79,.79,.79,.79,.79,.79,.79,1,.73,.73,.82],[5,29.58234,46.72128,29.58234,60,29.58234,29.58234,29.58234,23.34102,23.34102,23.34102,23.34102],["linear","linear","linear","linear","linear","linear","linear","linear","linear","linear","linear","linear"],["exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential"],["linear","linear","linear","linear","linear","linear","linear","linear","linear","linear","linear","linear"],[196,229,229,130,130,130,2011,130,1728,1690,1690,714],[0,.4,.4,.4,.4,.4,0,.4,0,0,0,0],[4.32,.39366,.39366,3.14928,3.14928,3.14928,3.90224,3.14928,4.32,4.32,4.32,4.32],[.8,.8,.8,.8,.8,.8,.8,.8,.8,.8,.8,.8],[0,.23,.23,.23,.23,.23,.23,.23,0,0,0,0],[0,15.00282,15.00282,15.00282,15.00282,15.00282,15.00282,15.00282,0,0,0,0],["exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential"],["exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential"],[1.1,2.5,2.5,2.5,2.5,2.5,2.5,2.5,1.1,1.1,1.1,1.1],["sine","sine","sine","sine","sine","sine","sine","sine","sine","sine","sine","sine"],[.86,.47,.47,.47,.47,.47,.47,.47,.86,.86,.86,.86],[1,8.1,8.1,8.1,8.1,8.1,8.1,8.1,1,1,1,1],[.93,.59,.59,.59,.59,.59,.59,.59,.93,.93,.93,.93],[-70,0,0,-36.9,-36.9,-36.9,-36.9,-40.1,-70,-70,-70,-70],[0,0,0,0,0,0,0,-10,0,0,0,0],[0,0,0,0,0,0,-37.5,-37.5,0,0,0,0],[250,250,250,250,250,250,250,250,250,250,250,250],[2500,2500,2500,2500,2500,2500,2500,2500,2500,2500,2500,2500],[.8,.8,.8,.34,.34,.34,.34,.34,.8,.8,.8,.8],[.6,.87,.87,.87,.87,.87,.87,.87,.6,.6,.6,.6],[3.5,3.5,3.5,3.5,3.5,3.5,3.5,3.5,3.5,3.5,3.5,3.5],[.7,.7,.7,.7,.7,.7,.7,.7,.7,.7,.7,.7],[0,0,0,0,0,0,0,0,0,0,0,0],[1.5,1.5,1.5,1.5,1.5,1.5,1.5,1.5,1.5,1.5,1.5,1.5],[180,180,180,180,180,180,180,180,180,180,180,180],[0,0,0,0,0,0,0,0,0,0,0,0],[0,0,.5,0,2.4,-11.5,-20.5,0,0,0,0,25.7],[-.56,0,-.41,-1,-1,-.88,-.67,-1,-1,-1,-1,-.57],[2,2,2,2,2,2,2,2,2,2,2,2],["G#3","G#3","G#3",null,"F#3",null,null,null,"G#3","F#4","F#4","G#3"],["E4","E4","E4","F#5","G#4","E6","F#4","C#4",null,null,null,"E4"],["3m","2n","6m","8m","6m","8m","7m","7m","8m","8m","8m","8m"],[1,1,1,1,1,1,1,.7,1,1,1,1],[-1e3,-1e3,-1e3,-20.4,-20.4,-18.7,-24.2,-13,-1e3,-1e3,-1e3,-1e3],[.2,0,0,0,0,0,0,0,0,0,0,0],[1,1,1,1,.23,1,.64,1,1,1,1,.37],["1n","2n","2n","2n","7m","6m","8m","7m","6m","10m","10m","6m"],["sawtooth","sawtooth","sawtooth","sawtooth","sawtooth","sawtooth","sawtooth","sine","sine","sine","sine","sine"],[0,0,20.3,0,0,23.1,-10.2,0,0,0,0,24.2],[.21296,.579,.579,2.81216,2.81216,2.81216,2.81216,7.78034,1.70368,1.70368,1.70368,1.70368],[1,1,1,1,1,1,1,1,1,1,1,1],[1,1,.71,1,1,1,1,1,1,1,1,1],[5,5,5,5,5,5,5,5,5,5,5,5],["linear","linear","linear","linear","linear","linear","linear","linear","linear","linear","linear","linear"],["exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential"],["linear","linear","linear","linear","linear","linear","linear","linear","linear","linear","linear","linear"],[420,420,420,420,420,269,281,281,420,420,420,420],[.4,.4,.4,.4,.4,.35,.35,.35,.4,.4,.4,.4],[.001,.001,.001,8.4375,8.4375,8.4375,8.4375,8.4375,.001,.001,.001,.001],[.8,.8,.8,.8,.8,.8,.8,.8,.8,.8,.8,.8],[0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0],["exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential"],["exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential"],[1.1,1.1,1.1,1.1,1.1,1.1,1.1,1.1,1.1,1.1,1.1,1.1],[3.5,3.5,3.5,3.5,3.5,3.5,3.5,3.5,3.5,3.5,3.5,3.5],[.7,.7,.7,.7,.7,.7,.7,.7,.7,.7,.7,.7],[0,0,0,0,0,0,0,0,0,0,0,0],[1.5,1.5,1.5,1.5,1.5,1.5,1.5,1.5,1.5,1.5,1.5,1.5],[180,180,180,180,180,180,180,180,180,180,180,180],[0,0,0,0,0,0,0,0,0,0,0,0],[.76,0,.7,.75,1,.74,.63,.65,.55,.01,.01,.22],["sine","sine","sine","sine","sine","sine","sine","sine","sine","sine","sine","sine"],[0,0,0,0,0,0,0,0,.75,.75,.75,.75],[1,1,1,1,1,1,1,1,1,1,1,1],[.5,.5,.5,.5,.5,.5,.5,.5,.5,.5,.5,.5],[-56,0,0,-49.5,-49.5,-49.5,-37.1,-51.9,-56,-56,-56,-56],[0,0,0,0,0,0,-21.1,-37.8,0,0,0,0],[0,0,0,0,0,0,-42.4,-19.3,0,0,0,0],[250,250,250,250,250,250,250,250,250,250,250,250],[2500,2500,2500,2500,2500,2500,2500,2500,2500,2500,2500,2500],[.8,.8,.8,0,0,0,.43,.7,.8,.8,.8,.8],[.6,.6,.6,.74,.74,.74,1,.47,.6,.6,.6,.6],[-9.4,-8.2,-9.3,-5.1,-3.5,-7.6,-12,-2.6,-5.7,-7.7,-17.3,-70],[0,0,0,0,0,.8,0,0,1.4,.5,.5,-18.1],[-.4,0,0,0,0,-.4,0,0,-70,-3.4,-3.4,-12.1],[139,250,458,250,194,250,50,70,135,50,50,135],[2500,2500,2500,2500,2500,2500,15561,15561,6347,9950,9950,6347],[.72,1,1,1,1,.77,1,1,1,1,1,1],[0,0,0,0,0,0,0,0,0,0,0,1],[0,.8,0,0,0,0,.8,0,.24,.24,.24,.19],[1,.6,1,.88,.91,.86,.6,.6,.03,.03,.03,1],[-1e3,-1e3,-20.6,-22.9,-24.2,-1e3,-16.4,-2.1,-9.8,-1e3,-1e3,-19.4],[-70,0,-70,-67.5,-70,-70,-70,-70,-69.5,-69.5,-69.5,-69.5],[-12.9,0,-33.9,-20.7,-15.1,-33.5,-37.6,-35.9,-19.1,-25.9,-25.9,-19.1],[-42.6,0,-32.4,-70,0,-50.9,-34.8,0,-33.2,-70,-70,-33.2],[250,250,250,250,250,250,250,250,250,250,250,250],[2500,2500,2500,2500,2500,2500,2500,2500,6456,6456,6456,6456],[3.5,3.5,0,3.5,3.5,3.5,3.5,3.5,35,35,35,35],[.7,.7,.12,.7,.7,.7,.7,.7,.7,.7,.7,.7],[0,0,0,0,0,0,0,0,0,0,0,0],[1.5,1.5,1.5,1.5,1.5,1.5,1.5,1.5,1.5,1.5,1.5,1.5],[180,180,212,180,180,180,180,180,180,180,180,180],[0,0,.31,0,0,0,0,0,0,0,0,0]],sp={scale:["E","F#","G#","B","C#"],tuning:{type:"just"},M:{fadeIn:15,envelope:{baseFrequency:.001,partials:[spl[18][si],spl[19][si],spl[20][si],spl[21][si]],phase:spl[22][si],minGain:spl[23][si],maxGain:spl[24][si]},compressor:{attack:spl[25][si],knee:spl[26][si],ratio:spl[27][si],release:spl[28][si],threshold:spl[29][si]},eq:{low:spl[30][si],mid:spl[31][si],high:spl[32][si],lowFrequency:spl[33][si],highFrequency:spl[34][si]},gain:spl[35][si]},returns:{reverb:{decay:spl[36][si],pre:spl[37][si]}},B1:{volMin:spl[38][si],volMax:spl[39][si],volLFORate:spl[40][si],difference:spl[41][si],note:spl[42][si],filterFrequency:spl[43][si],filterResonance:spl[44][si]},B2:{volMin:spl[45][si],volMax:spl[46][si],volLFORate:spl[47][si],difference:spl[48][si],filterFrequency:spl[49][si],filterResonance:spl[50][si],note:spl[51][si]},D:{polyphony:3,chord:[spl[53][si],spl[54][si],spl[55][si]],vol:spl[56][si],gainLFOMin:spl[57][si],gainLFOMax:spl[58][si],gainLFORate:spl[59][si],filterFrequency:spl[60][si],filterResonance:spl[61][si],filterRate:spl[62][si],filterDepth:spl[63][si],oscillators:[{coarse:spl[64][si],fine:spl[65][si],envelope:{attack:.946,decay:.6,sustain:spl[68][si],release:spl[69][si],decayCurve:"exponential",releaseCurve:"exponential"},vol:spl[72][si]},{coarse:spl[73][si],fine:spl[74][si],envelope:{attack:spl[75][si],decay:spl[76][si],sustain:1,release:30.2,decayCurve:"exponential",releaseCurve:"exponential"},vol:spl[81][si]},{coarse:spl[82][si],fine:spl[83][si],envelope:{attack:.946,decay:.6,sustain:1,release:5.41,decayCurve:"exponential",releaseCurve:"exponential"},vol:spl[90][si]},{coarse:spl[91][si],fine:spl[92][si],envelope:{attack:spl[93][si],decay:.6,sustain:1,release:spl[96][si],decayCurve:"exponential",releaseCurve:"exponential"},vol:spl[99][si]}],autoPan:{type:"sine",depth:spl[101][si],frequency:spl[102][si],wet:spl[103][si]},eq:{low:spl[104][si],mid:spl[105][si],high:spl[106][si],lowFrequency:spl[107][si],highFrequency:spl[108][si]},sends:{direct:spl[109][si],reverb:spl[110][si]}},S:{octave:spl[111][si],scaleDegreeShiftProbability:.1,clusterInterval:spl[114][si],clusterProbability:spl[115][si],minNoteDuration:spl[116][si],maxNoteDuration:spl[117][si],minClusterSize:spl[118][si],maxClusterSize:spl[119][si],maxScaleDegreeStep:2,vol:spl[121][si],oscillatorType:spl[122][si],amplitudeEnvelope:{attack:spl[123][si],decay:spl[124][si],sustain:spl[125][si],release:spl[126][si],decayCurve:"exponential",releaseCurve:"exponential"},filterFrequency:spl[129][si],filterResonance:spl[130][si],filterEnvelope:{attack:spl[131][si],decay:spl[132][si],sustain:spl[133][si],release:spl[134][si],decayCurve:"exponential",releaseCurve:"exponential",octaves:spl[137][si]},autoPan:{type:"sine",depth:spl[139][si],frequency:spl[140][si],wet:spl[141][si]},eq:{low:spl[142][si],mid:spl[143][si],high:spl[144][si],lowFrequency:250,highFrequency:2500},sends:{direct:spl[147][si],reverb:spl[148][si]},chorus:{delayTime:spl[149][si],depth:spl[150][si],feedback:spl[151][si],frequency:spl[152][si],spread:spl[153][si],wet:spl[154][si]}},P1:{polyphony:2,chord:[spl[156][si],spl[157][si]],repeatInterval:spl[158][si],repeatProbability:spl[159][si],vol:spl[160][si],gainLFOMin:0,gainLFOMax:spl[162][si],gainLFORate:spl[163][si],oscillatorType:spl[164][si],amplitudeEnvelope:{attack:spl[165][si],decay:1,sustain:spl[167][si],release:spl[168][si],attackCurve:"linear",decayCurve:"exponential",releaseCurve:"linear"},filterFrequency:spl[172][si],filterResonance:spl[173][si],filterEnvelope:{attack:spl[174][si],decay:.8,sustain:spl[176][si],release:spl[177][si],decayCurve:"exponential",releaseCurve:"exponential",octaves:spl[180][si]},autoPan:{type:"sine",depth:spl[182][si],frequency:spl[183][si],wet:spl[184][si]},eq:{low:spl[185][si],mid:spl[186][si],high:spl[187][si],lowFrequency:250,highFrequency:2500},sends:{direct:spl[190][si],reverb:spl[191][si]},chorus:{delayTime:3.5,depth:.7,feedback:0,frequency:1.5,spread:180,wet:0},detune:spl[198][si],pan:spl[199][si]},P2:{polyphony:2,chord:[spl[201][si],spl[202][si]],repeatInterval:spl[203][si],repeatProbability:spl[204][si],vol:spl[205][si],gainLFOMin:spl[206][si],gainLFOMax:spl[207][si],gainLFORate:spl[208][si],oscillatorType:spl[209][si],detune:spl[210][si],amplitudeEnvelope:{attack:spl[211][si],decay:1,sustain:spl[213][si],release:spl[214][si],attackCurve:"linear",decayCurve:"exponential",releaseCurve:"linear"},filterFrequency:spl[218][si],filterResonance:spl[219][si],filterEnvelope:{attack:spl[220][si],decay:.8,sustain:0,release:0,decayCurve:"exponential",releaseCurve:"exponential",octaves:1.1},chorus:{delayTime:3.5,depth:.7,feedback:0,frequency:1.5,spread:180,wet:0},pan:spl[233][si],autoPan:{type:"sine",depth:spl[235][si],frequency:1,wet:.5},eq:{low:spl[238][si],mid:spl[239][si],high:spl[240][si],lowFrequency:250,highFrequency:2500},sends:{direct:spl[243][si],reverb:spl[244][si]}},binauralEq:{low:spl[245][si],mid:spl[246][si],high:spl[247][si],lowFrequency:spl[248][si],highFrequency:spl[249][si]},binauralSends:{direct:spl[250][si],reverb:spl[251][si]},padSends:{direct:spl[252][si],reverb:spl[253][si]},padVol:spl[254][si],padEq:{low:spl[255][si],mid:spl[256][si],high:spl[257][si],lowFrequency:250,highFrequency:spl[259][si]},padChorus:{delayTime:spl[260][si],depth:spl[261][si],feedback:0,frequency:1.5,spread:spl[264][si],wet:spl[265][si]}},nf=2,p.b1=sp.B1.note?nm[sp.B1.volLFORate]:nf,p.b2=sp.B2.note&&0<sp.B2.volMax?nm[sp.B2.volLFORate]:nf,p.p1=-100<sp.padVol&&0<sp.P1.gainLFOMax?nm[sp.P1.gainLFORate]:nf,p.p1p=-100<sp.padVol&&0<sp.P1.gainLFOMax?parseFloat(sp.P1.autoPan.frequency):nf,p.p2=-100<sp.padVol&&0<sp.P2.gainLFOMax?nm[sp.P2.gainLFORate]:nf,p.p2p=-100<sp.padVol&&0<sp.P2.gainLFOMax?sp.P2.autoPan.frequency:nf,p.d=-100<sp.D.vol&&0<sp.D.gainLFOMax?nm[sp.D.gainLFORate]:nf,p.dp=-100<sp.D.vol&&0<sp.D.gainLFOMax?parseFloat(sp.D.autoPan.frequency):nf,p.df=-100<sp.D.vol&&0<sp.D.gainLFOMax?nm[sp.D.filterRate]:nf,p.s=-100<sp.S.vol?nm[sp.S.clusterInterval]:nf,p.sp=-100<sp.S.vol?parseFloat(sp.S.autoPan.frequency):nf,p.el_top="",p.el_bot="","none"!=p.e.v){mv=`*(map(w${p.uSE[0]},0.,c${p.uSE[0]},${p.el_exp.v[0]},${p.el_exp.v[1]}))`;for(let e=0;e<=4;e++)idx=e+6,r=map_r(hns[idx+1],0,1,.1,.275),cd=hns[idx],3==p.e_xy&&(1==p.e_z.v&&(p.el_top+=`c=${p.e.v}(V(uve.x,uve.y+.4),c,W(map(w${p.uSC[0]},0.,c${p.uSC[0]},${hns[idx]},${hns[idx+1]}*.8)),V(${r}${mv}),0.1,0.0025);c=${p.e.v}(V(uve.x,uve.y-.4),c,W(map(w${p.uSC[1]},0.,c${p.uSC[1]},${hns[idx+2]},${hns[idx+3]}*.8)),V(${r}${mv}),0.1,0.0025);`),0!=p.e_z.v&&1!=p.e_z.v||(p.el_bot+=`c=${p.e.v}(V(uve.x,uve.y+.4),c,W(map(w${p.uSC[0]},0.,c${p.uSC[0]},${hns[idx]},${hns[idx+1]}*.8)),V(${r}${mv}),0.2,0.0025);c=${p.e.v}(V(uve.x,uve.y-.4),c,W(map(w${p.uSC[1]},0.,c${p.uSC[1]},${hns[idx+2]},${hns[idx+3]}*.8)),V(${r}${mv}),0.2,0.0025);`)),4==p.e_xy&&(1==p.e_z.v&&(p.el_top+=`c=${p.e.v}(V(uve.x,uve.y+.4),c,W(map(w${p.uSC[0]},0.,c${p.uSC[0]},${hns[idx]},${hns[idx+1]}*.8)),V(${r}${mv}),0.1,0.0025);c=${p.e.v}(V(uve.x,uve.y-.4),c,W(map(w${p.uSC[0]},0.,c${p.uSC[0]},${hns[idx]},${hns[idx+1]}*.8)),V(${r}${mv}),0.1,0.0025);`),0!=p.e_z.v&&1!=p.e_z.v||(p.el_bot+=`c=${p.e.v}(V(uve.x,uve.y+.4),c,W(map(w${p.uSC[0]},0.,c${p.uSC[0]},${hns[idx+2]},${hns[idx+3]}*.8)),V(${r}${mv}),0.2,0.0025);c=${p.e.v}(V(uve.x,uve.y-.4),c,W(map(w${p.uSC[0]},0.,c${p.uSC[0]},${hns[idx+2]},${hns[idx+3]}*.8)),V(${r}${mv}),0.2,0.0025);`)),2==p.e_xy&&(p.el_top+=`c=${p.e.v}(V(uve.x,uve.y),c,W(map(w${p.uSC[0]},0.,c${p.uSC[0]},${hns[idx]},${hns[idx+1]}*.8)),V(${r}${mv}),0.1,0.0025);`,p.el_bot+=`c=${p.e.v}(V(uve.x,uve.y),c,W(map(w${p.uSC[0]},0.,c${p.uSC[0]},${hns[idx+4]},${hns[idx+5]}*.8)),V(${r}${mv}),0.2,0.0025);c=${p.e.v}(V(uve.x,uve.y+.5),c,W(map(w${p.uSC[0]},0.,c${p.uSC[0]},${hns[idx+4]},${hns[idx+5]}*.8)),V(${r}${mv})*0.8,0.2,0.0025);c=${p.e.v}(V(uve.x,uve.y-.5),c,W(map(w${p.uSC[0]},0.,c${p.uSC[0]},${hns[idx+4]},${hns[idx+5]}*.8)),V(${r}${mv})*0.8,0.2,0.0025);`),1==p.e_xy&&(1==p.e_z.v&&(p.el_top+=`c=${p.e.v}(V(uve.x,uve.y),c,W(map(w${p.uSC[0]},0.,c${p.uSC[0]},${hns[idx]},${hns[idx+1]}*.8)),V(${r}${mv}),0.1,0.0025);`),0!=p.e_z.v&&1!=p.e_z.v||(p.el_bot+=`c=${p.e.v}(V(uve.x,uve.y),c,W(map(w${p.uSC[0]},0.,c${p.uSC[0]},${hns[idx+2]},${hns[idx+3]}*.8)),V(${r}${mv})*1.2,0.2,0.0025);`))}let hnx=hash_ints.map((e,n)=>map_v_str(n,p.grid.v[0],p.grid.v[1])),hny=hash_ints.map((e,n)=>map_v_str(n,p.grid.v[2],p.grid.v[3]));p.grids=`F A,Bx,By,Px,Py,Hx,Hy,Hz,S,ctm;W cb,ct;A=.8;Py=0.;Px=0.;cb=W(.1); ct=W(.9); `,gw0=["1","2","4","8","14"];for(let e=1;e<=4;e++)radial_modifier="",4==e&&(radial_modifier="map(length(uv),0.,1.,.8,.9)*"),shuffle(p.gw),wbx=p.gw[0],wby=p.gw[1],whx=p.gw[2],why=p.gw[3],1==e&&(shuffle(gw0),wbx=gw0[0],wby=gw0[1],whx=gw0[2],why=gw0[3]),p.grids+=` ctm=${rb(.17,.5)}; cb=${radial_modifier}W(map(wGC,0.,cGC,0.,${rb(.1,.15)}));ct=${radial_modifier}W(map(wGC,0.,cGC,ctm,${rb(.95,1.05)})); Bx=map(w${wbx},0.,c${wbx},${hnx[e]},${hnx[e]}*${rb(1.05,1.2)});By=map(w${wby},0.,c${wby},${hny[e]},${hny[e]}*${rb(1.05,1.2)}); if (${rd()}>0.5){Py=map(wGP,0.,cGP,0.,${rb(.018,.025)});} Hx=map(w${whx},0.,c${whx},-A*${rb(.55,.45)},${rb(-.05,.05)});Hy=map(w${why},0.,c${why},-A*${rb(.55,.45)},${rb(-.05,.05)});S=${rb(.8,1.8)};${p.el_bot}c=mix(c,cb,smoothstep(0.,S,A*cos(Bx*TAU*(uv.x+(Px*TAU)))+Hx));c=mix(c,cb,smoothstep(0.,S,A*cos(By*TAU*(uv.y+(Py*TAU)))+Hy));c=mix(c,ct,smoothstep(0.,S,A*cos(Bx*TAU*(uw.x+(Px*TAU)))+Hx));c=mix(c,ct,smoothstep(0.,S,A*cos(By*TAU*(uw.y+(Py*TAU)))+Hy)); `;num_steps=111,pal_lerp=[];for(let n=0;n<p.pal.v.length-1;n++)for(let e=0;e<num_steps;e++)pal_lerp.push(lerp_hex(p.pal.v[n],p.pal.v[n+1],e/num_steps));for(let n=0;n<rb(0,pal_lerp.length);n++)e=pal_lerp.shift(),pal_lerp.push(e);function hex_rgb(e){e=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);return e?{r:parseInt(e[1],16),g:parseInt(e[2],16),b:parseInt(e[3],16)}:null}function sn(e){return e.toFixed(5)}d_array=[],pal_lerp.forEach(e=>{c_rgb=hex_rgb(e),d_array.push(c_rgb.r,c_rgb.g,c_rgb.b)});var texture=gl.createTexture();gl.bindTexture(gl.TEXTURE_2D,texture),gl.texImage2D(gl.TEXTURE_2D,0,gl.RGB,d_array.length/3,1,0,gl.RGB,gl.UNSIGNED_BYTE,new Uint8Array(d_array)),gl.texParameteri(gl.TEXTURE_2D,gl.TEXTURE_MIN_FILTER,gl.NEAREST),gl.texParameteri(gl.TEXTURE_2D,gl.TEXTURE_MAG_FILTER,gl.NEAREST),gl.texParameteri(gl.TEXTURE_2D,gl.TEXTURE_WRAP_S,gl.CLAMP_TO_EDGE),gl.texParameteri(gl.TEXTURE_2D,gl.TEXTURE_WRAP_T,gl.CLAMP_TO_EDGE);const alignment=1;function U(e,n){this.n=e,this.s=n,this.l=gl.getUniformLocation(pg,e)}function R(e){b=e.createBuffer(),e.bindBuffer(e.ARRAY_BUFFER,b),e.bufferData(e.ARRAY_BUFFER,R.v,e.STATIC_DRAW)}function rz(){ww=window.innerWidth,hh=window.innerHeight,hh>=ww?(d=ww,w=d,h=16*d/9,h>hh&&(d=hh,w=9*d/16,h=d),cv.style.transform="rotate(0deg)"):hh<ww&&(d=hh,w=d,h=16*d/9,h>ww&&(d=ww,w=9*d/16,h=d),cv.style.transform="rotate(90deg)"),cv.width=w,cv.height=h,ur.set(w,h),gl.viewport(0,0,w,h),document.body.style.backgroundColor="#111"}gl.pixelStorei(gl.UNPACK_ALIGNMENT,alignment),vs="attribute vec2 a_position;attribute vec2 a_texcoord;varying vec2 v_texcoord;void main(){gl_Position=vec4(a_position,0,1);v_texcoord=a_texcoord;}",fs=` #define PI 3.141592653589793 #define TAU 6.283185307179586 #define V vec2 #define W vec3 #define F float precision highp float;uniform V ur;uniform sampler2D u_tex;uniform F fc;F shPos=${p.e_xy.toFixed(5)};F rotv=${p.rotation.v};F cB1=${sn(p.b1)};F cB2=${sn(p.b2)};F cP1=${sn(p.p1)};F cP1p=${sn(p.p1p)};F cP2=${sn(p.p2)};F cP2p=${sn(p.p2p)};F cD=${sn(p.d)};F cDf=${sn(p.df)};F cDp=${sn(p.dp)};F cS=${sn(p.s)};F cSp=${sn(p.sp)};F c1=1.;F c2=2.;F c4=4.;F c8=8.;F c14=14.;F c20=20.;F fB1=mod(fc,cB1);F fB2=mod(fc,cB2);F fP1=mod(fc,cP1);F fP1p=mod(fc,cP1p);F fP2=mod(fc,cP2);F fP2p=mod(fc,cP2p);F fD=mod(fc,cD);F fDp=mod(fc,cDp);F fDf=mod(fc,cDf);F fS=mod(fc,cS);F fSp=mod(fc,cSp);F f1=mod(fc,c1);F f2=mod(fc,c2);F f4=mod(fc,c4);F f8=mod(fc,c8);F f14=mod(fc,c14);F f20=mod(fc,c20);uniform F zB1,zB2,zP1,zP1p,zP2,zP2p,zD,zDp,zDf,zS,zSp,z1,z2,z4,z8,z14,z20;F wB1=cB1/2.*sin(TAU/cB1*fB1+zB1)+cB1/2.;F wB2=cB2/2.*sin(TAU/cB2*fB2+zB2)+cB2/2.;F wP1=cP1/2.*sin(TAU/cP1*fP1+zP1)+cP1/2.;F wP1p=cP1p/2.*sin(TAU/cP1p*fP1p+zP1p)+cP1p/2.;F wP2=cP2/2.*sin(TAU/cP2*fP2+zP2)+cP2/2.;F wP2p=cP2p/2.*sin(TAU/cP2p*fP2p+zP2p)+cP2p/2.;F wD=cD/2.*sin(TAU/cD*fD+zD)+cD/2.;F wDp=cDp/2.*sin(TAU/cDp*fDp+zDp)+cDp/2.;F wDf=cDf/2.*sin(TAU/cDf*fDf+zDf)+cDf/2.;F wS=cS/2.*sin(TAU/cS*fS+zS)+cS/2.;F wSp=cSp/2.*sin(TAU/cSp*fSp+zSp)+cSp/2.;F w1=1./2.*sin(TAU/1.*(f1)+z1)+1./2.;F w2=2./2.*sin(TAU/2.*(f2)+z2)+2./2.;F w4=4./2.*sin(TAU/4.*(f4)+z4)+4./2.;F w8=8./2.*sin(TAU/8.*(f8)+z8)+8./2.;F w14=14./2.*sin(TAU/14.*(f14)+z14)+14./2.;F w20=20./2.*sin(TAU/20.*(f20)+z20)+20./2.;F wGC=w${p.uGC};F cGC=c${p.uGC};F wGP=w${p.uGP};F cGP=c${p.uGP};F wFC=w${p.uFC};F cFC=c${p.uFC};F wSpiral=w${p.uSpiral};F cSpiral=c${p.uSpiral};F map(F value,F min1,F max1,F min2,F max2){return min2+(value-min1)*(max2-min2)/(max1-min1);} V rot(V uv,F a){uv=mat2(cos(a),-sin(a),sin(a),cos(a))*uv;return uv;} W circle(V uv,W c,W c_to,V r,F blur,F thickness){F d=length(uv)-r.x;return mix(c,c_to,1.0-smoothstep(0.0,blur,abs(d)-thickness));} W rect(V uv,W c,W c_to,V r,F blur,F thickness){V d=abs(uv)-r;F dd=length(max(d,V(0)))+min(max(d.x,d.y),0.0);return mix(c,c_to,1.0-smoothstep(0.0,blur,abs(dd)-thickness));} W diamond(V uv,W c,W c_to,V r,F blur,F thickness){uv=rot(uv,PI/4.);V d=abs(uv)-r*.8;F dd=length(max(d,V(0)))+min(max(d.x,d.y),0.0);return mix(c,c_to,1.0-smoothstep(0.0,blur,abs(dd)-thickness));} W none(V uv,W c,W c_to,V r,F blur,F thickness){return c;} W pre_blur(V uv){W c=W(0.0);V uvf=uv;V uve=uv;F sgn=${rc(["1.","-1."])};F spA=${rb(.1,.25)};F spB=${rb(.1,.15)};F spC=${rb(.2,.25)};if (rotv==1.){uv=rot(uv,sgn*PI/4.);} else if (rotv==2.){uv=rot(uv,sgn*TAU*length(uv)*spA);} else if (rotv==3.){uv=rot(uv,sgn*TAU*length(uv)*(0.25+map(wSpiral,0.,cSpiral,spA,spA)));} else if (rotv==4.){uv=rot(uv,sgn*TAU*length(uv)*map(wSpiral,0.,cSpiral,spB,spC)+TAU*cSpiral/8.);}V uw=uv*0.96;${p.grids} if (${tok_id}<200.){c=rect(uvf,c,W(map(wFC,0.,cFC,.3,.8)),V(0.55,.99),0.07,0.005);} return c;}W blur(V uv,V res,V dir){W c=W(0.0);V f1=V(1.411764705882353)*dir/2000.;V f2=V(3.2941176470588234)*dir/2000.;V f3=V(5.176470588235294)*dir/2000.;c += pre_blur(uv)*0.1964825501511404;c += pre_blur(uv+(f1))*0.2969069646728344;c += pre_blur(uv-(f1))*0.2969069646728344;c += pre_blur(uv+(f2))*0.09447039785044732;c += pre_blur(uv-(f2))*0.09447039785044732;c += pre_blur(uv+(f3))*0.010381362401148057;c += pre_blur(uv-(f3))*0.010381362401148057;return c;}W mc (V uv,W c){F ch=c.r;vec4 c_buf=texture2D(u_tex,V(ch,ch));c=W(c_buf.x,c_buf.y,c_buf.z);return c;} W m(V uv){V uv_=uv;V uvf=uv;V uve=uv;W c=W(0.);c=pre_blur(uv);c=blur(uv,ur.xy,V(${p.blur.v}));${p.el_top}if (${tok_id}<200.){c=rect(uvf,c,W(map(wFC,0.,cFC,.3,.8)),V(0.55,.99),0.07,0.005);} c=mc(uv_,c);return c;}void main(){V uv=(2.*gl_FragCoord.xy-ur.xy)/ur.y;W c=W(0.);c=m(uv);gl_FragColor=vec4(c,1.);} `,U.prototype.set=function(...e){m="uniform"+this.s,a=[this.l].concat(e),gl[m].apply(gl,a)},R.v=new Float32Array([-1,-1,1,-1,-1,1,1,1]),R.prototype.render=function(e){e.drawArrays(e.TRIANGLE_STRIP,0,4)},as=(e,n)=>{if(sh=gl.createShader(n),gl.shaderSource(sh,e),gl.compileShader(sh),!gl.getShaderParameter(sh,gl.COMPILE_STATUS))throw new Error("Shader compile error: "+gl.getShaderInfoLog(sh));gl.attachShader(pg,sh)},window.addEventListener("resize",rz),pg=gl.createProgram(),as(vs,gl.VERTEX_SHADER),as(fs,gl.FRAGMENT_SHADER),gl.linkProgram(pg),gl.useProgram(pg);var ur=new U("ur","2f"),fc=new U("fc","1f"),zB1=new U("zB1","1f"),zB2=new U("zB2","1f"),zP1=new U("zP1","1f"),zP1p=new U("zP1p","1f"),zP2=new U("zP2","1f"),zP2p=new U("zP2p","1f"),zD=new U("zD","1f"),zDp=new U("zDp","1f"),zDf=new U("zDf","1f"),zS=new U("zS","1f"),zSp=new U("zSp","1f"),z1=new U("z1","1f"),z2=new U("z2","1f"),z4=new U("z4","1f"),z8=new U("z8","1f"),z14=new U("z14","1f"),z20=new U("z20","1f");function oc(){an(),ae.init(sp,"playback"),ae.start(sp,Date.now()-st),cv.removeEventListener("click",oc)}function zr(e){return p0=e[0]*Math.PI/180,p1=e[1]*Math.PI/180,t=FC/30/sp.M.fadeIn,t<=1?(tt=-(Math.cos(Math.PI*t)-1)/2,p0+(p1-p0)*tt):p1}function inc(){FC++,c=FC/3e3,fc.set(c),FC/30/sp.M.fadeIn<=1&&(zB1.set(zr(pz.B1)),zB2.set(zr(pz.B2)),zP1.set(zr(pz.P1)),zP1p.set(zr(pz.P1p)),zP2.set(zr(pz.P2)),zP2p.set(zr(pz.P2p)),zD.set(zr(pz.D)),zDf.set(zr(pz.Df)),zDp.set(zr(pz.Dp)),zS.set(zr(pz.S)),zSp.set(zr(pz.Sp)),z1.set(zr(pz.Q1)),z2.set(zr(pz.Q2)),z4.set(zr(pz.Q4)),z8.set(zr(pz.Q8)),z14.set(zr(pz.Q14)),z20.set(zr(pz.Q20))),bb.render(gl)}function an(){inc(),requestAnimationFrame(an)}bb=new R(gl),pl=gl.getAttribLocation(pg,"a_position"),gl.enableVertexAttribArray(pl),gl.vertexAttribPointer(pl,2,gl.FLOAT,!1,0,0),rz(),inc(),console.log(tokenData.hash),console.log(`${p.feel} / ${p.song.n} / ${p.grid.n} / ${p.pal.n}`),cv.addEventListener("click",oc);
function hti(e){let n=[];for(let e=0;e<32;e++)n.push(tokenData.hash.slice(2+2*e,4+2*e));return n.map(e=>parseInt(e,16))}function get_seed(e){return parseInt(tokenData.hash.slice(0,16),16)}function map_v(e,n=0,a=1){return map_r(hash_ints[e],0,255,n,a)}function map_v_str(e,n=0,a=1){return map_v(e,n,a).toFixed(6).toString()}function map_r(e,n,a,t,i){return(e-n)/(a-n)*(i-t)+t}function rr(){return Math.random()}function rd(){return seed^=seed<<13,seed^=seed>>17,seed^=seed<<5,((seed<0?1+~seed:seed)%1e3/1e3).toFixed(5)}function rb(e,n){return(e+(n-e)*rd()).toFixed(5)}function rc(e){return e[Math.floor(rb(0,.99*e.length))]}function rco(e){return a=[],e.forEach((e,n)=>{for(i=0;i<e.w;i++)a.push(e)}),rc(a)}function shn(e){return e.toFixed(5)}function lerp_hex(e,n,a){var t=+e.replace("#","0x"),i=t>>16,e=t>>8&255,t=255&t,n=+n.replace("#","0x");return"#"+((1<<24)+(i+a*((n>>16)-i)<<16)+(e+a*((n>>8&255)-e)<<8)+(t+a*((255&n)-t))|0).toString(16).slice(1)}function get_obj(e,n,a=!1){let t=e.filter(({n:e})=>e==n);return a?(t=t.map(({v:e})=>e),[...t]):t[0]}function shuffle(n){for(let e=n.length-1;0<e;e--){var a=Math.floor(rd()*(e+1));[n[e],n[a]]=[n[a],n[e]]}}cv=document.querySelector("canvas"),document.body.style.backgroundColor="#111",gl=cv.getContext("webgl"),st=(new Date).getTime(),tok_id=parseInt(tokenData.tokenId.slice(-4)).toFixed(5),MEQLOW=FC=fc=0,NDO=["32n","16n","8n","4n","2n","1n"],synth_flaga=0,synth_flagb=0,synth_list=[];let seed=get_seed(tokenData.hash),hash_ints=hti(tokenData.hash),hns=hash_ints.map((e,n)=>map_v_str(n,.1,1)),hnss=hash_ints.map((e,n)=>map_v_str(n,1,10));function expandClusterScale(a,e){let t=[];for(let n=0;n<e;n++)t=[...t,...a.map(e=>e<a[0]&&"C"<=e?`${e}${n+1}`:`${e}${n}`)];return t=[...t,`${a[0]}${e}`],t}function generateCluster(n,a,e,t,i,l,p,s=null){let r=[];var o=NDO.indexOf(e),c=Math.max(o,NDO.indexOf(t));let u=Math.floor(rb(0,n.length)),F=0;var x=Math.round(rb(i,l));for(let e=0;e<x;e++){var v=NDO[Math.round(rb(o,c))];if(r.push({t:F,note:n[u],duration:Tone.getTransport().toSeconds(v)}),s&&e===x-2){let e=a.indexOf(s.replace(/\d+/,""))-a.indexOf(n[u].replace(/\d+/,""));e<-a.length/2&&(e+=a.length),e>a.length/2&&(e-=a.length),u+e>=n.length&&(e-=a.length),u+e<0&&(e+=a.length),u+=e}else{var m=Math.ceil(rr()*p);let e=Math.sign(rr()-.5);0===u&&e<0&&(e=1),u===n.length-1&&0<e&&(e=-1),u=Math.max(0,Math.min(n.length-1,u+m*e))}F+=Tone.getTransport().toSeconds(v)}return r}function shiftClusterNote(e,n){let a=n.indexOf(e);return rr()<.5&&0<a?a--:a<n.length-1&&a++,n[a]}function n2f(n,a){if("just"!==a.tuning?.type)return new Tone.Frequency(n).toFrequency();{var[,t,n]=/([^\d]+)(\d+)/.exec(n),a=a.scale.indexOf(t);let e=n-4;return t<"E"&&"C"<=t&&--e,329.628*[1,1.125,1.265625,1.5,1.6875][a]*Math.pow(2,e)}}pho=90;let ae={init:(s,e="interactive")=>{ae.SScale=expandClusterScale(s.scale,1),Tone.setContext(new Tone.Context({latencyHint:e})),Tone.getTransport().bpm.value=60,ae.M=new Tone.Gain(0).toDestination(),ae.MEQ=new Tone.EQ3(s.M.eq).connect(ae.M),ae.MEnv=new Tone.Gain(0).connect(ae.MEQ),ae.MEnvLFO=new Tone.LFO({frequency:s.M.envelope.baseFrequency,partials:s.M.envelope.partials,phase:s.M.envelope.phase,min:s.M.envelope.minGain,max:s.M.envelope.maxGain,amplitude:1}).connect(ae.MEnv.gain),ae.comp=new Tone.Compressor(s.M.compressor).connect(ae.MEnv),ae.reverb=new Tone.Reverb({decay:10,preDelay:s.returns.reverb.pre/1e3}).connect(ae.MEnv),ae.reverb.generate(),ae.BDirectOut=new Tone.Gain(s.binauralSends.direct).connect(ae.MEQ),ae.BReverbOut=new Tone.Gain(s.binauralSends.reverb).connect(ae.reverb),ae.BEQ=new Tone.EQ3(s.binauralEq).connect(ae.BDirectOut).connect(ae.BReverbOut),ae.B1Volume=new Tone.Gain(0).connect(ae.BEQ),ae.B1VolLFO=new Tone.LFO({min:s.B1.volMin,max:s.B1.volMax,frequency:s.B1.volLFORate,amplitude:1}).connect(ae.B1Volume.gain),ae.B1Filter=new Tone.Filter({frequency:s.B1.filterFrequency,Q:s.B1.filterResonance,type:"lowpass",rolloff:"-24"}).connect(ae.B1Volume);e=(new Tone.Merge).connect(ae.B1Filter);ae.B1OscLeft=new Tone.Oscillator({frequency:new Tone.Frequency(s.B1.note).toFrequency(),volume:-15,channelCount:1}).connect(e,0,0),ae.B1OscRight=new Tone.Oscillator({frequency:new Tone.Frequency(s.B1.note).toFrequency()+s.B1.difference,volume:-15,channelCount:1}).connect(e,0,1),ae.B2Volume=new Tone.Gain(0).connect(ae.BEQ),ae.B2VolLFO=new Tone.LFO({min:s.B2.volMin,max:s.B2.volMax,frequency:s.B2.volLFORate,amplitude:1}).connect(ae.B2Volume.gain),ae.B2Filter=new Tone.Filter({frequency:s.B2.filterFrequency,Q:s.B2.filterResonance,type:"lowpass",rolloff:"-24"}).connect(ae.B2Volume);e=(new Tone.Merge).connect(ae.B2Filter);ae.B2OscLeft=new Tone.Oscillator({frequency:new Tone.Frequency(s.B2.note).toFrequency(),volume:-15,channelCount:1}).connect(e,0,0),ae.B2OscRight=new Tone.Oscillator({frequency:new Tone.Frequency(s.B2.note).toFrequency()+s.B2.difference,volume:-15,channelCount:1}).connect(e,0,1),ae.DDirectOut=new Tone.Gain(s.D.sends.direct).connect(ae.comp),ae.DReverbOut=new Tone.Gain(s.D.sends.reverb).connect(ae.reverb),ae.DGain=new Tone.Gain(0).connect(ae.DReverbOut).connect(ae.DDirectOut),ae.DGainLFO=new Tone.LFO({min:s.D.gainLFOMin??1,max:s.D.gainLFOMax??1,frequency:s.D.gainLFORate,amplitude:1}).connect(ae.DGain.gain),ae.DVolume=new Tone.Volume(s.D.vol).connect(ae.DGain),ae.DEQ=new Tone.EQ3(s.D.eq).connect(ae.DVolume),ae.DAP=new Tone.AutoPanner(s.D.autoPan).connect(ae.DEQ),ae.DF=new Tone.AutoFilter({frequency:s.D.filterRate,octaves:s.D.filterDepth,baseFrequency:s.D.filterFrequency,filter:{type:"lowpass",rolloff:"-12",Q:s.D.filterResonance}}).connect(ae.DAP),ae.DSynths=Array.from({length:3},(e,p)=>s.D.oscillators.map(({coarse:e,fine:n,vol:a})=>{n=1200*Math.log2(e)+n;let t=new Tone.Oscillator({type:"sawtooth",frequency:n2f(s.D.chord[p]??"E2",s),detune:n,volume:a}).connect(ae.DF),i=!1,l;return{triggerAttack:()=>{clearTimeout(l),i||(t.start(),i=!0)},triggerRelease:()=>{i&&(i=!1,l=setTimeout(()=>{t.stop()},1e3*s.M.fadeIn))},setFrequency:e=>{e?(t.frequency.value=e,i&&t.start()):i&&t.stop()},osc:t}})),ae.SDirectOut=new Tone.Gain(s.S.sends.direct).connect(ae.comp),ae.SReverbOut=new Tone.Gain(s.S.sends.reverb).connect(ae.reverb),ae.SVolume=new Tone.Volume(s.S.vol).connect(ae.SReverbOut).connect(ae.SDirectOut),ae.SEQ=new Tone.EQ3(s.S.eq).connect(ae.SVolume),ae.SAP=new Tone.AutoPanner(s.S.autoPan).connect(ae.SEQ),ae.SChorus=new Tone.Chorus(s.S.chorus).connect(ae.SAP),ae.SF=new Tone.Filter({type:"lowpass",rolloff:s.S.filterRolloff??"-24",Q:s.S.filterResonance}).connect(ae.SChorus),ae.SFEnv=new Tone.FrequencyEnvelope({baseFrequency:s.S.filterFrequency,...s.S.filterEnvelope}).connect(ae.SF.frequency),ae.SSynth=new Tone.Synth({oscillator:{type:s.S.oscillatorType},envelope:s.S.amplitudeEnvelope}).connect(ae.SF),ae.PDirectOut=new Tone.Gain(s.padSends.direct).connect(ae.comp),ae.PReverbOut=new Tone.Gain(s.padSends.reverb).connect(ae.reverb),ae.PVolume=new Tone.Volume(s.padVol).connect(ae.PDirectOut).connect(ae.PReverbOut),ae.PEQ=new Tone.EQ3(s.padEq).connect(ae.PVolume),ae.PChorus=new Tone.Chorus(s.padChorus).connect(ae.PEQ),ae.Ps=Array.from({length:2},(e,n)=>{let a=s[`P${n+1}`],t={};return t.gain=new Tone.Gain(0).connect(ae.PChorus),t.gainLFO=new Tone.LFO({min:a.gainLFOMin??1,max:a.gainLFOMax??1,frequency:a.gainLFORate,amplitude:1}).connect(t.gain.gain),t.autoPan=new Tone.AutoPanner(a.autoPan).connect(t.gain),t.pan=new Tone.Panner(a.pan).connect(t.autoPan),t.filter=new Tone.Filter({type:"lowpass",rolloff:a.filterRolloff??"-12",Q:a.filterResonance}).connect(t.pan),t.filterEnv=new Tone.FrequencyEnvelope({baseFrequency:a.filterFrequency,...a.filterEnvelope}).connect(t.filter.frequency),t.synths=Array.from({length:a.polyphony},()=>new Tone.Synth({oscillator:{type:a.oscillatorType,detune:a.detune},envelope:a.amplitudeEnvelope}).connect(t.filter)),t})},started:!(pz={B1:[rd()*pho,rr()*pho],B2:[rd()*pho,rr()*pho],Dp:[rd()*pho,rr()*pho],Df:[rd()*pho,rr()*pho],D:[rd()*pho,rr()*pho],M:[rd()*pho,rr()*pho],P1p:[rd()*pho,rr()*pho],P1:[rd()*pho,rr()*pho],P2p:[rd()*pho,rr()*pho],P2:[rd()*pho,rr()*pho],S:[90,90],Sp:[rd()*pho,rr()*pho],Q1:[rd()*pho,rr()*pho],Q2:[rd()*pho,rr()*pho],Q4:[rd()*pho,rr()*pho],Q8:[rd()*pho,rr()*pho],Q14:[rd()*pho,rr()*pho],Q20:[rd()*pho,rr()*pho]}),start:async(t,e)=>{if(!ae.started){await Tone.start(),Tone.getTransport().start(),clearTimeout(ae.lastBinauralStopper),t.B1.note&&(ae.B1OscLeft.start(),ae.B1OscRight.start()),t.B2.note&&(ae.B2OscLeft.start(),ae.B2OscRight.start()),ae.DSynths.forEach((e,n)=>e.forEach(e=>t.D.chord[n]&&e.triggerAttack())),ae.SCluster=generateCluster(ae.SScale,t.scale,t.S.minNoteDuration,t.S.maxNoteDuration,1,t.S.maxClusterSize,2,t.B1.note),ae.SPattern=new Tone.Pattern({callback:e=>{rr()<t.S.clusterProbability&&ae._playSynth(e,t)},values:[!0],interval:t.S.clusterInterval}).start(),ae.PPatterns=ae.Ps.map((e,n)=>{let a=t[`P${n+1}`];return new Tone.Pattern({callback:e=>{rr()<a.repeatProbability&&ae._playPad(n,e,t)},values:[!0],interval:a.repeatInterval}).start()}),ae.MEnvLFO.phase=pz.M[1],ae.B1VolLFO.phase=pz.B1[1],ae.B2VolLFO.phase=pz.B2[1],ae.DAP.phase=pz.Dp[1],ae.DGainLFO.phase=pz.D[1],ae.DF.phase=pz.Df[1],ae.SAP.phase=pz.Sp[1],ae.Ps[0].autoPan._lfo.phase=pz.P1p[1],ae.Ps[0].gainLFO.phase=pz.P1[1],ae.Ps[1].autoPan._lfo.phase=pz.P2p[1],ae.Ps[1].gainLFO.phase=pz.P2[1],ae.MEnvLFO.start(),ae.B1VolLFO.start(),ae.B2VolLFO.start(),ae.DAP.start(),ae.DGainLFO.start(),ae.DF.start(),ae.SAP.start(),ae.SChorus.start();for(var n of ae.Ps)n.autoPan.start(),n.gainLFO.start();ae.PChorus.start(),ae.M.gain.setValueAtTime(0,Tone.now()),ae.M.gain.linearRampToValueAtTime(t.M.gain,Tone.now()+t.M.fadeIn),ae.SVolume.volume.setValueAtTime(-1e3,Tone.now()),ae.SVolume.volume.linearRampToValueAtTime(sp.S.vol,Tone.now()+t.M.fadeIn+7),ae.started=!0}},_playSynth:(i,l)=>{let p=[...ae.SCluster];for(let e=1;e<p.length;e++){var n,a,t;rr()<.1&&(n=Tone.getTransport().toSeconds(l.S.minNoteDuration)/2,a=p[e],t=p[e-1],rr()<.5?(p[e-1]={...t,duration:t.duration-n},p[e]={...a,t:a.t-n,duration:a.duration+n}):(p[e-1]={...t,duration:t.duration+n},p[e]={...a,t:a.t+n,duration:a.duration-n}))}synth_flaga=0,synth_flagb=0,synth_list=[];for(let t=0;t<p.length;t++){let{t:e,note:n,duration:a}=p[t];t!==p.length-1&&rr()<.1&&(n=shiftClusterNote(n,ae.SScale));var s=n2f(n,l)*Math.pow(2,l.S.octave),r=.07*rr();ae.playSynthNote(i+e+r,s,a)}},playSynthNote:(e,n,a)=>{--synth_flaga,synth_flagb+=1,synth_list.push(a),ae.SSynth.triggerAttackRelease(n,a,e),ae.SFEnv.triggerAttackRelease(a,e)},_playPad:(a,t,i)=>{var l=i[`P${a+1}`],p=Tone.getTransport().toSeconds(l.repeatInterval)/3,s=.07*rr();for(let n=0;n<l.chord.length;n++){var r=l.chord[n];let e=ae.Ps[a].synths[n];r&&e.triggerAttackRelease(n2f(r,i),p,t+s),ae.Ps[a].filterEnv.triggerAttackRelease(p,t+s)}}},pp={pal:[{w:15,n:"Awe",v:"F2F3EEF2F3EEF0EDDA7D88975269939B361CF0EDDA39609400155F9B361CE5E6D8FAE193CC948200337F394F77D6AAA5A2938D5C98B43989A93D0000C66C5656526F905B5FDC9B80F0ECDB939690F5EBD9CC94828E74894DA9CC6D492BD8D1BEF3EED9F2F3EEF2F3EE"},{w:8,n:"Elysium",v:"F2F3EEF2F3EECBC6D5BDB4BD636474F2F3EE424D389794A0F2F3EEF2F3EE9A9AB08D73777A5663F2F3EE70595D935C689D8798B7BDC8817D7F9A9FA8F2F3EEF2F3EE888789967E8759454A474B467A5663F2F3EE70595D935C68564E49F2F3EEF2F3EE848A925A687C291F007A566370595D935C6835362EF2F3EEF2F3EE"},{w:8,n:"Liquid Dusk",v:"F2F3EEF2F3EEB68662230D00B68662BF8C61C88F5AD19559D39959D69B55E8A557EFA953E3A64BE5BA5CEFD171E6C96DE8CE81EBDDACE9E7CEECE3E4E4E5E9E6E7E1F5E3BDE7BC6EBD7E1FB36F1C9953177F3B0E7F401786522A895F35F2F3EE926B40A2774CBF94699C7347784F316A4027643A246C46335D3C2B2C16092C1609F2F3EEF2F3EE6D452C8E5D35B47F49D09E61DDB67BF6DAA8D7C499E5C384BF9D5EF2F3EEF2F3EE"},{w:8,n:"Chimera",v:"F2F3EEF2F3EE064f6e064f6ef68c5040456af3a257F2F3EEF2F3EE064f6e064f6ef68c5040456af3a257F2F3EEF2F3EE"},{w:8,n:"Moonpool",v:"F2F3EEF2F3EE6E8FB09DADC65D718C6D7E987989A28099B74465845E748C72849A78859639405071788A525F720E1D3408172E485367636B7E5A7995F2F3EEF2F3EE2E486334455F1F2B4573839D1C2A44434D665F66801E28416261694D5973606F843E4A5A00000B6261696C809B4E627DF2F3EEF2F3EE"},{w:10,n:"Body Electric",v:"F2F3EEF2F3EE0000001212120000003636368484847A7A7A5C5C5C4747471313132727271313130000001717172D2D2D707070B4B4B4F2F3EEF2F3EECBCBCBC0C0C02121211A1A1AF2F3EEF2F3EE969696C9C9C98181810000000202025C5C5C454545959595CBCBCBBEBEBEC9C9C92121211A1A1A646464BCBCBCAAAAAAF2F3EEAEAEAE646464010101272727010101010101F2F3EEF2F3EE"},{w:11,n:"Holotropic",v:"F2F3EE9C5555A298A3738CA20041701E547B194B6B717E7588978BAAABAC39688D909EA2748E92113864002357194B6B625E78928E945C5953829C983A5E779C55556E15059C5555F2F3EE94A0B4A4A0AE92A0AB7E8485BEBAB9928E832E303C92A1A67061685D5B613075925E717B668385F2F3EE194B6B113864002357194B6B759299B5BBBD92A8AEF2F3EEF2F3EE"},{w:8,n:"Asteria",v:"6346525845527242468C505577566468576A471F300C01255A5A816A638D9F839BD9C8B5CEC8B27242468C5055C7B49FC7B49FBEB0A4A99B999285878A8D918C9097ADAAAF0C01259691A38C849E8A809A7242468C50558A7F9F816D8F7356759B7386471F300C0125B5837FA773707C5E5D7E605F785E5485665A99705F926551"},{w:12,n:"Meadow",v:"121B2A01002801001265899759869BD3D6DBDBD2D7DED2D4F6EDE8F9C37DF9C37D444849455C6A5D8795567D8CF2F3EEF2F3EE4A707D567C89375F6B2F545D14191F000929C9BCACB57657BB6B4AC4704BAA6D51A69A8CD9DDE0D9DDE021210009182D1F2227253C4238575C31505317292D4B666F5B7C833C4A4D000000D69F5FD69F5FD2C7C3C6BCBAC3BDBDB6BABB4E6C765A737A000000181B2014151A"},{w:4,n:"Halcyon",v:"9A95A0756485B6A5C89B85A2835061C58FADBC849E883E3FBD636ECF707D7039468C495CB9627D683D4D3F2D397F43645E37502528304A354F3A2D3E1E231D2425252225232224232123222123222123222123221C211E2E272D42303D26262D482F377B40484C3037442F35A9554E9C4E474E282BB26A53CE7C5D8843319A605BC48A8CA06B6A714A4FA88DB1A38AAE594662B1A9B4"}],song:[{w:10,n:"Harmonic Transmission",v:1},{w:10,n:"Emanating Dreamscape",v:2},{w:10,n:"Oceanic Expanse",v:3},{w:10,n:"The Deep Now",v:4},{w:10,n:"Glimmering Horizon",v:5},{w:10,n:"Weightless River",v:6},{w:10,n:"Timeless Window",v:7},{w:10,n:"Infinite Portal",v:8},{w:10,n:"Luminous Space",v:9},{w:10,n:"Weightless Moment",v:10},{w:10,n:"Present-Time Awareness",v:11},{w:2,n:"Interbeing",v:12}],rotation:[{w:7,n:"Unperturbed",v:"0."},{w:3,n:"Angled",v:"1."},{w:1,n:"Whip Spiral",v:"3."},{w:2,n:"Eternal Spiral",v:"4."}],blur:[{w:1,n:"Angled Positive",v:"10.,10."},{w:1,n:"Angled Negative",v:"-10.,10."},{w:3,n:"Vertical",v:"0.,10."},{w:2,n:"Horizontal",v:"10.,0."}],e:[{w:0,n:"Water",v:"circle"},{w:0,n:"Earth",v:"rect"},{w:0,n:"Fire",v:"diamond"},{w:0,n:"Air",v:"none"}],e_xy:[{w:0,n:"Centered",v:1},{w:0,n:"Duality",v:3},{w:0,n:"Symmetric Duality",v:4},{w:0,n:"Trinity",v:2},{w:0,n:"None",v:0}],e_z:[{w:2,n:"Below",v:0},{w:1,n:"Omnipresent",v:1}],el_exp:[{w:1,n:"Expanding",v:[.9,1.2]},{w:10,n:"Static",v:[.95,1.05]}],grid:[{w:3,n:"Transcend",v:[2,4,2,4]},{w:2,n:"Exhale",v:[2,4,10,15]},{w:2,n:"Inhale",v:[10,15,2,4]},{w:3,n:"Lattice",v:[10,15,10,15]},{w:2,n:"Passage",v:[25,30,10,15]},{w:2,n:"Universal",v:[25,30,25,30]}]},p={pal:rco(pp.pal),rotation:rco(pp.rotation),blur:rco(pp.blur),e:rco(pp.e),el_exp:rco(pp.el_exp),grid:rco(pp.grid),song:rco(pp.song)};p.feel=["Immersive","Spacious","Serene","Spacious","Spacious","Immersive","Immersive","Spacious","Serene","Immersive","Serene","Heartbeat"][p.song.v-1],p.pal.v=p.pal.v.match(/.{6}/g).map(e=>"#"+e);let nm={"16n.":.0234375,"16n":.25/16,"8n.":.046875,"8n":.25/8,"4n.":.09375,"4n":.0625,"2n.":.1875,"2n":.125,"1n.":.375,"1n":.25,"1m":.25,"2m":.5,"3m":.75,"4m":1,"5m":1.25,"6m":1.5,"7m":1.75,"8m":2,"9m":2.25,"10m":2.5,"11m":2.75,"12m":3};if(vpl=[["Water","Water","Water","Fire","Fire","Fire","Air","Earth","Earth","Earth","Air",rc(["Earth","Fire","Water"])],[1,3,2,1,3,2,0,1,3,2,0,2],[["S"],[rc(["S","D"]),rc(["S","D"])],["S"],["S"],["S","S"],["S"],["S"],["S"],[rc(["B1","B2"]),rc(["B1","B2"])],["S"],["B1"],["Sp"]],[["D"],[rc(["S","D"]),rc(["S","D"])],["D"],["S"],[rc(["S","B2"]),rc(["S","B2"])],["S"],["S"],["S"],[rc(["D","B2"]),rc(["D","B1"])],["S"],["B1"],["Sp"]],["D","D","B1","B2","P2","B1","S","B2","D","B2",rc(["B1","B2"]),"D"],[["B1","B2","D","Df","S","Sp","2","1"],["B1","B2","D","Df","S","2","1"],["B1","B2","S","P2p","D","Df","2","1"],["B1","B1","P1","P2p","D","Df","S","2","1"],["B1","B2","P2","P2p","S","S","2","1"],["B1","B2","D","Df","S","2","1"],["B1","B2","D","Df","P1","P2","P2p","S","2","1"],["B1","B2","P2","P2p","S","2","1"],["B1","B2","D","Df","S","Sp","2","1"],["B1","B2","D","Df","S","S","2","1"],["B1","B2","4","2","1"],["B1","B2","P1","P2","D","Df"]],["14","14","14","14","14","14","14","14","14","14","14","14"],["D","D","D","D","S","D",rc(["B1","D"]),"P2","D","B1",rc(["B1","B2"]),"B1"],[rc(["B1","D"]),rc(["B1","Df"]),"D","D",rc(["B2","P1p"]),"B2","S","S","B2","B2",rc(["B1","B2"]),"B2"]],si=p.song.v-1,p.e=get_obj(pp.e,vpl[0][si]),p.e_xy=vpl[1][si],p.e_z=rc([0,1]),p.uSC=vpl[2][si],p.uSE=vpl[3][si],p.uGC=vpl[4][si],p.gw=vpl[5][si],p.uFC=vpl[6][si],p.uSpiral=vpl[7][si],p.uGP=vpl[8][si],"none"==p.e.v?p.e_z={w:0,n:"None",v:0}:(p.e_z=rco(pp.e_z),p.el_exp=rco(pp.el_exp)),spl=[[60,60,60,60,60,60,60,60,60,60,60,60],["E","E","E","E","E","E","E","E","E","E","E","E"],["F#","F#","F#","F#","F#","F#","F#","F#","F#","F#","F#","F#"],["G#","G#","G#","G#","G#","G#","G#","G#","G#","G#","G#","G#"],["B","B","B","B","B","B","B","B","B","B","B","B"],["C#","C#","C#","C#","C#","C#","C#","C#","C#","C#","C#","C#"],["just","just","just","just","just","just","just","just","just","just","just","just"],[1,1,1,1,1,1,1,1,1,1,1,1],[1.125,1.125,1.125,1.125,1.125,1.125,1.125,1.125,1.125,1.125,1.125,1.125],[1.265625,1.265625,1.265625,1.265625,1.265625,1.265625,1.265625,1.265625,1.265625,1.265625,1.265625,1.265625],[1.5,1.5,1.5,1.5,1.5,1.5,1.5,1.5,1.5,1.5,1.5,1.5],[1.6875,1.6875,1.6875,1.6875,1.6875,1.6875,1.6875,1.6875,1.6875,1.6875,1.6875,1.6875],["E","E","E","E","E","E","E","E","E","E","E","E"],[4,4,4,4,4,4,4,4,4,4,4,4],[329.628,329.628,329.628,329.628,329.628,329.628,329.628,329.628,329.628,329.628,329.628,329.628],[.07,.07,.07,.07,.07,.07,.07,.07,.07,.07,.07,.07],[15,15,15,15,15,15,15,15,15,15,15,15],[.001,.001,.001,.001,.001,.001,.001,.001,.001,.001,.001,.001],[.55,.75,.75,.75,.75,.75,.75,.75,0,0,0,.59],[.79,.71,.71,.71,.71,.71,.71,.71,1,1,1,.5],[.04,.88,.88,.88,.88,.88,.88,.86,.73,.73,.73,.47],[.52,.52,.52,.52,.52,.52,.52,.48,.52,.52,.52,.43],[122,188,188,188,188,188,188,207,122,122,122,28],[1,1,1,1,1,1,.39,1,0,0,0,1],[1,1,1,1,1,1,1,1,1,1,1,1],[.003,.003,.003,.021,.003,.027,.003,.003,.003,.042,.042,.024],[0,16.5,28.3,18.1,7.1,24.8,30,15.7,30,7.4,7.4,0],[14,20,2.4,1,19.8,5.2,20,20,14.4,20,20,1],[.08,.07,.06,.08,.06,.07,.25,.25,.25,.21,.42,.25],[-32.5,-10.3,-11.5,0,-.6,-20.8,-33.1,-16.2,-44.3,0,-27.1,0],[-11,-3,-4,-7.8,-4.6,-3.1,-8.8,-2,-3.5,-4.7,-3.7,-8.9],[0,0,0,0,0,0,0,.4,0,0,0,0],[.8,0,0,0,0,0,0,0,0,0,0,0],[71,250,76,250,192,250,250,250,194,133,133,194],[17073,2500,2500,869,2500,2500,2500,2500,17073,17073,17073,17073],[9.5,8.23,8.14,10,5.74,8.1,6.09,5.57,7.6,7.02,5.83,7.28],[10,10,10,10,10,10,10,10,10,10,10,10],[2.5,54.7,54.7,54.7,54.7,54.7,54.7,54.7,2.5,2.5,2.5,2.5],[.22,.28,.46,.13,.16,.03,.13,.09,.12,.06,.01,0],[1,1,1,1,1,1,.83,1,1,.65,.64,.19],["2m","2m","8m","6m","5m","4m","8m","4m","5m","8m","8m","8m"],[1,4,4,1,1,1,1,1,1,1,1,14],["G#1","G#1","G#1","C#2","C#2","E1","B1","F#1","F#1","G#1","F#1","F#2"],[2e3,2e3,2e3,2e3,2e3,2e3,2e3,2e3,2e3,962,962,2e3],[1,5.9,5.9,5.9,5.9,0,5.9,5.9,1,1,1,1],[.16,.19,0,.21,.03,0,0,0,0,.04,.04,0],[.81,1,.51,1,.73,1,.72,.38,.22,.17,.35,.33],["6m","6m","12m","12m","8m","7m","12m","6m","8m","6m","6m","8m"],[14,1,1,4,1,14,4,1,8,8,8,14],[2e3,226,226,1649,1972,1649,394,1649,367,1834,1834,1264],[1,0,0,0,0,0,0,0,1,1,1,1],["F#2","E3","B2","E3","G#2","E2","C#3","B2","E3","C#2","E2","C#3"],[3,3,3,3,3,3,3,3,3,3,3,3],["B1","B1","B1","C#2","C#2","F#1","F#1","F#1","F#1",null,null,"E1"],["E2",null,null,null,null,"F#2","C#3","C#3","E2","G#2","G#2","C#2"],["E3",null,null,null,null,"F#3",null,null,null,null,null,null],[-12.7,-9.4,-11.9,-24.8,-1e3,-28.8,-22.1,-1e3,-27.6,-30.2,-1e3,-23.3],[0,0,0,0,0,.19,0,0,0,0,0,0],[.88,.8,.8,.54,1,1,1,1,1,1,1,.78],["9m","6m","12m","10m","10m","7m","5m","5m","7m","7m","7m","12m"],[93,83,83,49,72,80,22,24,121,661,661,88],[0,0,0,0,0,0,0,0,1,1,1,1],["5m","7m","7m","9m","8m","5m","6m","7m","4m","4m","4m","9m"],[.69,.43,.43,1.71,0,1.26,2.36,2.94,0,0,0,.04],[.5,1,1,.5,1,1,.5,.5,1,4,4,.5],[1200,1200,1200,1200,1200,1200,1200,1200,1200,0,0,922],[.946,.946,.946,.946,.946,.946,.946,.946,.946,.946,.946,.946],[.6,.6,.6,.6,.6,.6,.6,.6,.6,.6,.6,.6],[1,1,1,1,1,1,.33,.33,1,1,1,1],[42.5,42.5,42.5,42.5,42.5,42.5,20.58,20.58,42.5,42.5,42.5,42.5],["exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential"],["exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential"],[0,-1.3,-1.3,-1.3,-1.3,-1.3,-1.3,-1.3,0,-7.6,-7.6,0],[1,1,1,1,1,1,2,2,1,1,1,2],[700,700,700,700,700,700,700,700,700,700,700,297],[20,.946,.946,.946,.946,.946,.946,.946,20,20,20,20],[.03072,.6,.6,.6,.6,.6,.6,.6,.03072,.03072,.03072,.03072],[1,1,1,1,1,1,1,1,1,1,1,1],[30.2,30.2,30.2,30.2,30.2,30.2,30.2,30.2,30.2,30.2,30.2,30.2],["exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential"],["exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential"],[-13.1,-1,-1,-1,-1,-1,-1,-1,-13.1,-13.1,-13.1,-13.1],[3,2,2,1,2,2,.5,.5,.5,.5,.5,.5],[1200,1200,1200,1200,1200,1200,1200,1200,1200,642,642,1200],[.946,.946,.946,.946,.946,.946,.946,.946,.946,.946,.946,.946],[.6,.6,.6,.6,.6,.6,.6,.6,.6,.6,.6,.6],[1,1,1,1,1,1,1,1,1,1,1,1],[5.41,5.41,5.41,5.41,5.41,5.41,5.41,5.41,5.41,5.41,5.41,5.41],["exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential"],["exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential"],[0,-4.1,-4.1,-4.1,-4.1,-4.1,-4.1,-4.1,0,-1e3,-1e3,0],[.5,1,1,1,1,1,3,3,.5,.5,.5,.5],[1186,0,0,0,0,0,0,0,1186,1186,1186,1186],[.946,2.97754,2.97754,2.97754,2.97754,2.97754,2.97754,2.97754,.946,.946,.946,.946],[.6,.6,.6,.6,.6,.6,.6,.6,.6,.6,.6,.6],[1,1,1,1,1,1,1,1,1,1,1,1],[5.41,5.41,5.41,5.41,5.41,5.41,13.61886,13.61886,5.41,5.41,5.41,5.41],["exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential"],["exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential"],[-3.7,0,0,0,0,0,0,0,-3.7,-1e3,-1e3,-3.7],["sine","sine","sine","sine","sine","sine","sine","sine","sine","sine","sine","sine"],[.46,1,1,.28,.55,.81,1,.25,.44,.24,.24,.65],[.2,.1,.1,.1,.1,.1,.1,.1,.1,5.4,5.4,.1],[1,.65,.65,.16,.16,.43,.41,.43,.29,0,0,.29],[-68.5,-70,-70,-70,-54.5,-70,-70,-70,-70,-70,-70,-70],[-37.3,-22.5,-40,-8.6,-12.2,-12,-10.1,-22.3,-13.6,-7.2,-7.2,-11.3],[-60.4,-10.6,-1.5,-9.9,-70,-32.3,-34.8,-14.8,-22.7,-5.7,-5.7,-70],[250,50,50,50,50,50,50,50,250,250,250,250],[2500,18e3,18e3,18e3,18e3,18e3,18e3,18e3,2500,2500,2500,2500],[.53,.72,.72,.52,.72,.87,.87,.87,.78,1,1,0],[1,1,1,1,1,.74,.74,.74,.83,.83,.83,1],[3,4,3,4,3,3,4,4,4,4,4,1],[.1,.1,.1,.1,.1,.1,.1,.1,.1,.1,.1,.1],[.1,.1,.1,.1,.1,.1,.1,.1,.1,.1,.1,.1],["8m","6m","4m","8m","8m","6m","6m","5m","5m","5m","5m","1m"],[1,1,1,1,1,.6,.9,1,.8,.9,.6,1],["4n","8n","16n","16n","16n","16n","4n","16n","16n","8n","8n","16n"],["2n","1n","8n","1n","8n","4n","2n","4n","1n","2n","2n","16n"],[4,3,1,1,1,3,1,6,6,3,3,1],[7,8,5,8,8,8,5,8,8,5,5,3],[2,2,2,2,2,2,2,2,2,2,2,2],[-16.9,-30.4,-13.7,-22.8,-6.6,-9.8,-13.8,-6.9,-27.1,-22.2,-1e3,-10.4],["sine","sine4","sine4","sine2","sine4","sine2","square2","sine","sine","fatsine2","fatsine2","sine"],[1.8225,3.70386,1.94672,1.01306,.43904,1.18638,1.8225,.54,.0675,.24334,1.70368,.41458],[5.4675,1,5.4675,1,9.9825,1,.06,1,1.31712,1.31712,.2025,.55566],[.59,.4,.64,.4,.72,.4,.86,.78,.29,.57,.62,.49],[25.3125,17.24976,35.56224,21.47466,9.9825,15.00282,28.47312,.73002,21.47466,24.31344,24.31344,17.24976],["exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential"],["exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential"],[5281,362,362,362,341,362,3587,1748,4035,5399,5399,1594],[0,.4,.4,.4,.4,.4,.4,.4,.4,.4,.4,.4],[1.09744,1.09744,1.09744,.001,1.01306,2.81216,2.81216,.02662,1.09744,.3125,.3125,1.09744],[.8,.8,.8,.8,.8,.8,.8,.8,.8,.8,.8,23.34102],[.83,0,0,0,0,0,0,0,0,0,0,0],[24.31344,0,0,0,0,9.9825,9.9825,9.9825,0,0,0,0],["exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential"],["exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential"],[1.9,1.1,1.1,1.1,1.1,1.8,1.8,1.8,1.1,1.1,1.1,1.1],["sine","sine","sine","sine","sine","sine","sine","sine","sine","sine","sine","sine"],[.2,.61,.92,.99,.14,.53,.38,.24,.27,.27,0,0],[1,.1,.1,.1,.1,.1,.1,.1,1,1,1,1],[1,.61,.71,.71,.07,.5,.5,.5,.5,.5,0,0],[-70,-70,-70,-70,-70,-70,-70,-70,-70,-70,-70,-2.2],[-20.8,-11.3,-36.1,-25.9,-35,-33.9,-19.7,-34.5,-16.6,-20.3,-2.6,-.9],[-37.3,0,0,-47.3,0,-10.6,-17,-55.6,0,0,0,0],[250,250,250,250,250,250,250,250,250,250,250,250],[2500,2500,2500,2500,2500,2500,2500,2500,2500,2500,2500,2500],[.11,.31,.48,0,.37,0,0,.33,.18,1,1,1],[.91,1,1,1,.9,.91,.41,.78,1,.92,.92,.38],[0,3.5,3.5,54,54,89,67,32,19,0,0,0],[0,.7,.7,0,0,.7,.7,.7,0,0,0,0],[.32,0,0,0,0,0,0,0,.32,.32,.32,.01],[37.3,1.5,1.5,1.5,1.5,1,1,1,37.3,37.3,37.3,0],[0,180,180,180,180,75,75,220,0,0,0,0],[.1,0,0,.27,.43,0,0,0,0,0,0,0],[2,2,2,2,2,2,2,2,2,2,2,2],["E2","C#3","C#3",null,"G#2",null,null,null,null,null,null,"E4"],["F#2","E4","E4","C#5","G#4","C#5","C#4","F#3","C#4","B4","B4","C#4"],["6m","2n","6m","4m","8m","8m","8m","7m","5m","5m","5m","5m"],[.9,.8,.8,.8,.8,.8,.8,.6,1,1,1,1],[-22.3,-1e3,-1e3,-29.4,-29.4,-25.8,-23.9,-22.6,-22.3,-22.3,-22.3,-22.3],[0,0,0,0,0,0,0,0,0,0,0,0],[1,.77,.87,.44,.8,.77,.77,.77,.61,.61,.61,.44],["1n","1n","1n","6m","1n","1n","3m","1n","1n","1n","1n","4m"],["sawtooth","sawtooth","sawtooth","sawtooth","sawtooth","sawtooth","sawtooth","sine","sine","sawtooth","sawtooth","sine"],[1.18638,.05488,1.37842,9.86078,9.86078,9.86078,9.86078,.71874,6.28864,6.28864,6.28864,6.28864],[1,1,1,1,1,1,1,1,1,1,1,1],[1,.79,.79,.79,.79,.79,.79,.79,1,.73,.73,.82],[5,29.58234,46.72128,29.58234,60,29.58234,29.58234,29.58234,23.34102,23.34102,23.34102,23.34102],["linear","linear","linear","linear","linear","linear","linear","linear","linear","linear","linear","linear"],["exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential"],["linear","linear","linear","linear","linear","linear","linear","linear","linear","linear","linear","linear"],[196,229,229,130,130,130,2011,130,1728,1690,1690,714],[0,.4,.4,.4,.4,.4,0,.4,0,0,0,0],[4.32,.39366,.39366,3.14928,3.14928,3.14928,3.90224,3.14928,4.32,4.32,4.32,4.32],[.8,.8,.8,.8,.8,.8,.8,.8,.8,.8,.8,.8],[0,.23,.23,.23,.23,.23,.23,.23,0,0,0,0],[0,15.00282,15.00282,15.00282,15.00282,15.00282,15.00282,15.00282,0,0,0,0],["exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential"],["exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential"],[1.1,2.5,2.5,2.5,2.5,2.5,2.5,2.5,1.1,1.1,1.1,1.1],["sine","sine","sine","sine","sine","sine","sine","sine","sine","sine","sine","sine"],[.86,.47,.47,.47,.47,.47,.47,.47,.86,.86,.86,.86],[1,8.1,8.1,8.1,8.1,8.1,8.1,8.1,1,1,1,1],[.93,.59,.59,.59,.59,.59,.59,.59,.93,.93,.93,.93],[-70,0,0,-36.9,-36.9,-36.9,-36.9,-40.1,-70,-70,-70,-70],[0,0,0,0,0,0,0,-10,0,0,0,0],[0,0,0,0,0,0,-37.5,-37.5,0,0,0,0],[250,250,250,250,250,250,250,250,250,250,250,250],[2500,2500,2500,2500,2500,2500,2500,2500,2500,2500,2500,2500],[.8,.8,.8,.34,.34,.34,.34,.34,.8,.8,.8,.8],[.6,.87,.87,.87,.87,.87,.87,.87,.6,.6,.6,.6],[3.5,3.5,3.5,3.5,3.5,3.5,3.5,3.5,3.5,3.5,3.5,3.5],[.7,.7,.7,.7,.7,.7,.7,.7,.7,.7,.7,.7],[0,0,0,0,0,0,0,0,0,0,0,0],[1.5,1.5,1.5,1.5,1.5,1.5,1.5,1.5,1.5,1.5,1.5,1.5],[180,180,180,180,180,180,180,180,180,180,180,180],[0,0,0,0,0,0,0,0,0,0,0,0],[0,0,.5,0,2.4,-11.5,-20.5,0,0,0,0,25.7],[-.56,0,-.41,-1,-1,-.88,-.67,-1,-1,-1,-1,-.57],[2,2,2,2,2,2,2,2,2,2,2,2],["G#3","G#3","G#3",null,"F#3",null,null,null,"G#3","F#4","F#4","G#3"],["E4","E4","E4","F#5","G#4","E6","F#4","C#4",null,null,null,"E4"],["3m","2n","6m","8m","6m","8m","7m","7m","8m","8m","8m","8m"],[1,1,1,1,1,1,1,.7,1,1,1,1],[-1e3,-1e3,-1e3,-20.4,-20.4,-18.7,-24.2,-13,-1e3,-1e3,-1e3,-1e3],[.2,0,0,0,0,0,0,0,0,0,0,0],[1,1,1,1,.23,1,.64,1,1,1,1,.37],["1n","2n","2n","2n","7m","6m","8m","7m","6m","10m","10m","6m"],["sawtooth","sawtooth","sawtooth","sawtooth","sawtooth","sawtooth","sawtooth","sine","sine","sine","sine","sine"],[0,0,20.3,0,0,23.1,-10.2,0,0,0,0,24.2],[.21296,.579,.579,2.81216,2.81216,2.81216,2.81216,7.78034,1.70368,1.70368,1.70368,1.70368],[1,1,1,1,1,1,1,1,1,1,1,1],[1,1,.71,1,1,1,1,1,1,1,1,1],[5,5,5,5,5,5,5,5,5,5,5,5],["linear","linear","linear","linear","linear","linear","linear","linear","linear","linear","linear","linear"],["exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential"],["linear","linear","linear","linear","linear","linear","linear","linear","linear","linear","linear","linear"],[420,420,420,420,420,269,281,281,420,420,420,420],[.4,.4,.4,.4,.4,.35,.35,.35,.4,.4,.4,.4],[.001,.001,.001,8.4375,8.4375,8.4375,8.4375,8.4375,.001,.001,.001,.001],[.8,.8,.8,.8,.8,.8,.8,.8,.8,.8,.8,.8],[0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0],["exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential"],["exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential"],[1.1,1.1,1.1,1.1,1.1,1.1,1.1,1.1,1.1,1.1,1.1,1.1],[3.5,3.5,3.5,3.5,3.5,3.5,3.5,3.5,3.5,3.5,3.5,3.5],[.7,.7,.7,.7,.7,.7,.7,.7,.7,.7,.7,.7],[0,0,0,0,0,0,0,0,0,0,0,0],[1.5,1.5,1.5,1.5,1.5,1.5,1.5,1.5,1.5,1.5,1.5,1.5],[180,180,180,180,180,180,180,180,180,180,180,180],[0,0,0,0,0,0,0,0,0,0,0,0],[.76,0,.7,.75,1,.74,.63,.65,.55,.01,.01,.22],["sine","sine","sine","sine","sine","sine","sine","sine","sine","sine","sine","sine"],[0,0,0,0,0,0,0,0,.75,.75,.75,.75],[1,1,1,1,1,1,1,1,1,1,1,1],[.5,.5,.5,.5,.5,.5,.5,.5,.5,.5,.5,.5],[-56,0,0,-49.5,-49.5,-49.5,-37.1,-51.9,-56,-56,-56,-56],[0,0,0,0,0,0,-21.1,-37.8,0,0,0,0],[0,0,0,0,0,0,-42.4,-19.3,0,0,0,0],[250,250,250,250,250,250,250,250,250,250,250,250],[2500,2500,2500,2500,2500,2500,2500,2500,2500,2500,2500,2500],[.8,.8,.8,0,0,0,.43,.7,.8,.8,.8,.8],[.6,.6,.6,.74,.74,.74,1,.47,.6,.6,.6,.6],[-9.4,-8.2,-9.3,-5.1,-3.5,-7.6,-12,-2.6,-5.7,-7.7,-17.3,-70],[0,0,0,0,0,.8,0,0,1.4,.5,.5,-18.1],[-.4,0,0,0,0,-.4,0,0,-70,-3.4,-3.4,-12.1],[139,250,458,250,194,250,50,70,135,50,50,135],[2500,2500,2500,2500,2500,2500,15561,15561,6347,9950,9950,6347],[.72,1,1,1,1,.77,1,1,1,1,1,1],[0,0,0,0,0,0,0,0,0,0,0,1],[0,.8,0,0,0,0,.8,0,.24,.24,.24,.19],[1,.6,1,.88,.91,.86,.6,.6,.03,.03,.03,1],[-1e3,-1e3,-20.6,-22.9,-24.2,-1e3,-16.4,-2.1,-9.8,-1e3,-1e3,-19.4],[-70,0,-70,-67.5,-70,-70,-70,-70,-69.5,-69.5,-69.5,-69.5],[-12.9,0,-33.9,-20.7,-15.1,-33.5,-37.6,-35.9,-19.1,-25.9,-25.9,-19.1],[-42.6,0,-32.4,-70,0,-50.9,-34.8,0,-33.2,-70,-70,-33.2],[250,250,250,250,250,250,250,250,250,250,250,250],[2500,2500,2500,2500,2500,2500,2500,2500,6456,6456,6456,6456],[3.5,3.5,0,3.5,3.5,3.5,3.5,3.5,35,35,35,35],[.7,.7,.12,.7,.7,.7,.7,.7,.7,.7,.7,.7],[0,0,0,0,0,0,0,0,0,0,0,0],[1.5,1.5,1.5,1.5,1.5,1.5,1.5,1.5,1.5,1.5,1.5,1.5],[180,180,212,180,180,180,180,180,180,180,180,180],[0,0,.31,0,0,0,0,0,0,0,0,0]],sp={scale:["E","F#","G#","B","C#"],tuning:{type:"just"},M:{fadeIn:15,envelope:{baseFrequency:.001,partials:[spl[18][si],spl[19][si],spl[20][si],spl[21][si]],phase:spl[22][si],minGain:spl[23][si],maxGain:spl[24][si]},compressor:{attack:spl[25][si],knee:spl[26][si],ratio:spl[27][si],release:spl[28][si],threshold:spl[29][si]},eq:{low:spl[30][si],mid:spl[31][si],high:spl[32][si],lowFrequency:spl[33][si],highFrequency:spl[34][si]},gain:spl[35][si]},returns:{reverb:{decay:spl[36][si],pre:spl[37][si]}},B1:{volMin:spl[38][si],volMax:spl[39][si],volLFORate:spl[40][si],difference:spl[41][si],note:spl[42][si],filterFrequency:spl[43][si],filterResonance:spl[44][si]},B2:{volMin:spl[45][si],volMax:spl[46][si],volLFORate:spl[47][si],difference:spl[48][si],filterFrequency:spl[49][si],filterResonance:spl[50][si],note:spl[51][si]},D:{polyphony:3,chord:[spl[53][si],spl[54][si],spl[55][si]],vol:spl[56][si],gainLFOMin:spl[57][si],gainLFOMax:spl[58][si],gainLFORate:spl[59][si],filterFrequency:spl[60][si],filterResonance:spl[61][si],filterRate:spl[62][si],filterDepth:spl[63][si],oscillators:[{coarse:spl[64][si],fine:spl[65][si],envelope:{attack:.946,decay:.6,sustain:spl[68][si],release:spl[69][si],decayCurve:"exponential",releaseCurve:"exponential"},vol:spl[72][si]},{coarse:spl[73][si],fine:spl[74][si],envelope:{attack:spl[75][si],decay:spl[76][si],sustain:1,release:30.2,decayCurve:"exponential",releaseCurve:"exponential"},vol:spl[81][si]},{coarse:spl[82][si],fine:spl[83][si],envelope:{attack:.946,decay:.6,sustain:1,release:5.41,decayCurve:"exponential",releaseCurve:"exponential"},vol:spl[90][si]},{coarse:spl[91][si],fine:spl[92][si],envelope:{attack:spl[93][si],decay:.6,sustain:1,release:spl[96][si],decayCurve:"exponential",releaseCurve:"exponential"},vol:spl[99][si]}],autoPan:{type:"sine",depth:spl[101][si],frequency:spl[102][si],wet:spl[103][si]},eq:{low:spl[104][si],mid:spl[105][si],high:spl[106][si],lowFrequency:spl[107][si],highFrequency:spl[108][si]},sends:{direct:spl[109][si],reverb:spl[110][si]}},S:{octave:spl[111][si],scaleDegreeShiftProbability:.1,clusterInterval:spl[114][si],clusterProbability:spl[115][si],minNoteDuration:spl[116][si],maxNoteDuration:spl[117][si],minClusterSize:spl[118][si],maxClusterSize:spl[119][si],maxScaleDegreeStep:2,vol:spl[121][si],oscillatorType:spl[122][si],amplitudeEnvelope:{attack:spl[123][si],decay:spl[124][si],sustain:spl[125][si],release:spl[126][si],decayCurve:"exponential",releaseCurve:"exponential"},filterFrequency:spl[129][si],filterResonance:spl[130][si],filterEnvelope:{attack:spl[131][si],decay:spl[132][si],sustain:spl[133][si],release:spl[134][si],decayCurve:"exponential",releaseCurve:"exponential",octaves:spl[137][si]},autoPan:{type:"sine",depth:spl[139][si],frequency:spl[140][si],wet:spl[141][si]},eq:{low:spl[142][si],mid:spl[143][si],high:spl[144][si],lowFrequency:250,highFrequency:2500},sends:{direct:spl[147][si],reverb:spl[148][si]},chorus:{delayTime:spl[149][si],depth:spl[150][si],feedback:spl[151][si],frequency:spl[152][si],spread:spl[153][si],wet:spl[154][si]}},P1:{polyphony:2,chord:[spl[156][si],spl[157][si]],repeatInterval:spl[158][si],repeatProbability:spl[159][si],vol:spl[160][si],gainLFOMin:0,gainLFOMax:spl[162][si],gainLFORate:spl[163][si],oscillatorType:spl[164][si],amplitudeEnvelope:{attack:spl[165][si],decay:1,sustain:spl[167][si],release:spl[168][si],attackCurve:"linear",decayCurve:"exponential",releaseCurve:"linear"},filterFrequency:spl[172][si],filterResonance:spl[173][si],filterEnvelope:{attack:spl[174][si],decay:.8,sustain:spl[176][si],release:spl[177][si],decayCurve:"exponential",releaseCurve:"exponential",octaves:spl[180][si]},autoPan:{type:"sine",depth:spl[182][si],frequency:spl[183][si],wet:spl[184][si]},eq:{low:spl[185][si],mid:spl[186][si],high:spl[187][si],lowFrequency:250,highFrequency:2500},sends:{direct:spl[190][si],reverb:spl[191][si]},chorus:{delayTime:3.5,depth:.7,feedback:0,frequency:1.5,spread:180,wet:0},detune:spl[198][si],pan:spl[199][si]},P2:{polyphony:2,chord:[spl[201][si],spl[202][si]],repeatInterval:spl[203][si],repeatProbability:spl[204][si],vol:spl[205][si],gainLFOMin:spl[206][si],gainLFOMax:spl[207][si],gainLFORate:spl[208][si],oscillatorType:spl[209][si],detune:spl[210][si],amplitudeEnvelope:{attack:spl[211][si],decay:1,sustain:spl[213][si],release:spl[214][si],attackCurve:"linear",decayCurve:"exponential",releaseCurve:"linear"},filterFrequency:spl[218][si],filterResonance:spl[219][si],filterEnvelope:{attack:spl[220][si],decay:.8,sustain:0,release:0,decayCurve:"exponential",releaseCurve:"exponential",octaves:1.1},chorus:{delayTime:3.5,depth:.7,feedback:0,frequency:1.5,spread:180,wet:0},pan:spl[233][si],autoPan:{type:"sine",depth:spl[235][si],frequency:1,wet:.5},eq:{low:spl[238][si],mid:spl[239][si],high:spl[240][si],lowFrequency:250,highFrequency:2500},sends:{direct:spl[243][si],reverb:spl[244][si]}},binauralEq:{low:spl[245][si],mid:spl[246][si],high:spl[247][si],lowFrequency:spl[248][si],highFrequency:spl[249][si]},binauralSends:{direct:spl[250][si],reverb:spl[251][si]},padSends:{direct:spl[252][si],reverb:spl[253][si]},padVol:spl[254][si],padEq:{low:spl[255][si],mid:spl[256][si],high:spl[257][si],lowFrequency:250,highFrequency:spl[259][si]},padChorus:{delayTime:spl[260][si],depth:spl[261][si],feedback:0,frequency:1.5,spread:spl[264][si],wet:spl[265][si]}},nf=2,p.b1=sp.B1.note?nm[sp.B1.volLFORate]:nf,p.b2=sp.B2.note&&0<sp.B2.volMax?nm[sp.B2.volLFORate]:nf,p.p1=-100<sp.padVol&&0<sp.P1.gainLFOMax?nm[sp.P1.gainLFORate]:nf,p.p1p=-100<sp.padVol&&0<sp.P1.gainLFOMax?parseFloat(sp.P1.autoPan.frequency):nf,p.p2=-100<sp.padVol&&0<sp.P2.gainLFOMax?nm[sp.P2.gainLFORate]:nf,p.p2p=-100<sp.padVol&&0<sp.P2.gainLFOMax?sp.P2.autoPan.frequency:nf,p.d=-100<sp.D.vol&&0<sp.D.gainLFOMax?nm[sp.D.gainLFORate]:nf,p.dp=-100<sp.D.vol&&0<sp.D.gainLFOMax?parseFloat(sp.D.autoPan.frequency):nf,p.df=-100<sp.D.vol&&0<sp.D.gainLFOMax?nm[sp.D.filterRate]:nf,p.s=-100<sp.S.vol?nm[sp.S.clusterInterval]:nf,p.sp=-100<sp.S.vol?parseFloat(sp.S.autoPan.frequency):nf,p.el_top="",p.el_bot="","none"!=p.e.v){mv=`*(map(w${p.uSE[0]},0.,c${p.uSE[0]},${p.el_exp.v[0]},${p.el_exp.v[1]}))`;for(let e=0;e<=4;e++)idx=e+6,r=map_r(hns[idx+1],0,1,.1,.275),cd=hns[idx],3==p.e_xy&&(1==p.e_z.v&&(p.el_top+=`c=${p.e.v}(V(uve.x,uve.y+.4),c,W(map(w${p.uSC[0]},0.,c${p.uSC[0]},${hns[idx]},${hns[idx+1]}*.8)),V(${r}${mv}),0.1,0.0025);c=${p.e.v}(V(uve.x,uve.y-.4),c,W(map(w${p.uSC[1]},0.,c${p.uSC[1]},${hns[idx+2]},${hns[idx+3]}*.8)),V(${r}${mv}),0.1,0.0025);`),0!=p.e_z.v&&1!=p.e_z.v||(p.el_bot+=`c=${p.e.v}(V(uve.x,uve.y+.4),c,W(map(w${p.uSC[0]},0.,c${p.uSC[0]},${hns[idx]},${hns[idx+1]}*.8)),V(${r}${mv}),0.2,0.0025);c=${p.e.v}(V(uve.x,uve.y-.4),c,W(map(w${p.uSC[1]},0.,c${p.uSC[1]},${hns[idx+2]},${hns[idx+3]}*.8)),V(${r}${mv}),0.2,0.0025);`)),4==p.e_xy&&(1==p.e_z.v&&(p.el_top+=`c=${p.e.v}(V(uve.x,uve.y+.4),c,W(map(w${p.uSC[0]},0.,c${p.uSC[0]},${hns[idx]},${hns[idx+1]}*.8)),V(${r}${mv}),0.1,0.0025);c=${p.e.v}(V(uve.x,uve.y-.4),c,W(map(w${p.uSC[0]},0.,c${p.uSC[0]},${hns[idx]},${hns[idx+1]}*.8)),V(${r}${mv}),0.1,0.0025);`),0!=p.e_z.v&&1!=p.e_z.v||(p.el_bot+=`c=${p.e.v}(V(uve.x,uve.y+.4),c,W(map(w${p.uSC[0]},0.,c${p.uSC[0]},${hns[idx+2]},${hns[idx+3]}*.8)),V(${r}${mv}),0.2,0.0025);c=${p.e.v}(V(uve.x,uve.y-.4),c,W(map(w${p.uSC[0]},0.,c${p.uSC[0]},${hns[idx+2]},${hns[idx+3]}*.8)),V(${r}${mv}),0.2,0.0025);`)),2==p.e_xy&&(p.el_top+=`c=${p.e.v}(V(uve.x,uve.y),c,W(map(w${p.uSC[0]},0.,c${p.uSC[0]},${hns[idx]},${hns[idx+1]}*.8)),V(${r}${mv}),0.1,0.0025);`,p.el_bot+=`c=${p.e.v}(V(uve.x,uve.y),c,W(map(w${p.uSC[0]},0.,c${p.uSC[0]},${hns[idx+4]},${hns[idx+5]}*.8)),V(${r}${mv}),0.2,0.0025);c=${p.e.v}(V(uve.x,uve.y+.5),c,W(map(w${p.uSC[0]},0.,c${p.uSC[0]},${hns[idx+4]},${hns[idx+5]}*.8)),V(${r}${mv})*0.8,0.2,0.0025);c=${p.e.v}(V(uve.x,uve.y-.5),c,W(map(w${p.uSC[0]},0.,c${p.uSC[0]},${hns[idx+4]},${hns[idx+5]}*.8)),V(${r}${mv})*0.8,0.2,0.0025);`),1==p.e_xy&&(1==p.e_z.v&&(p.el_top+=`c=${p.e.v}(V(uve.x,uve.y),c,W(map(w${p.uSC[0]},0.,c${p.uSC[0]},${hns[idx]},${hns[idx+1]}*.8)),V(${r}${mv}),0.1,0.0025);`),0!=p.e_z.v&&1!=p.e_z.v||(p.el_bot+=`c=${p.e.v}(V(uve.x,uve.y),c,W(map(w${p.uSC[0]},0.,c${p.uSC[0]},${hns[idx+2]},${hns[idx+3]}*.8)),V(${r}${mv})*1.2,0.2,0.0025);`))}let hnx=hash_ints.map((e,n)=>map_v_str(n,p.grid.v[0],p.grid.v[1])),hny=hash_ints.map((e,n)=>map_v_str(n,p.grid.v[2],p.grid.v[3]));p.grids=`F A,Bx,By,Px,Py,Hx,Hy,Hz,S,ctm;W cb,ct;A=.8;Py=0.;Px=0.;cb=W(.1); ct=W(.9); `,gw0=["1","2","4","8","14"];for(let e=1;e<=4;e++)radial_modifier="",4==e&&(radial_modifier="map(length(uv),0.,1.,.8,.9)*"),shuffle(p.gw),wbx=p.gw[0],wby=p.gw[1],whx=p.gw[2],why=p.gw[3],1==e&&(shuffle(gw0),wbx=gw0[0],wby=gw0[1],whx=gw0[2],why=gw0[3]),p.grids+=` ctm=${rb(.17,.5)}; cb=${radial_modifier}W(map(wGC,0.,cGC,0.,${rb(.1,.15)}));ct=${radial_modifier}W(map(wGC,0.,cGC,ctm,${rb(.95,1.05)})); Bx=map(w${wbx},0.,c${wbx},${hnx[e]},${hnx[e]}*${rb(1.05,1.2)});By=map(w${wby},0.,c${wby},${hny[e]},${hny[e]}*${rb(1.05,1.2)}); if (${rd()}>0.5){Py=map(wGP,0.,cGP,0.,${rb(.018,.025)});} Hx=map(w${whx},0.,c${whx},-A*${rb(.55,.45)},${rb(-.05,.05)});Hy=map(w${why},0.,c${why},-A*${rb(.55,.45)},${rb(-.05,.05)});S=${rb(.8,1.8)};${p.el_bot}c=mix(c,cb,smoothstep(0.,S,A*cos(Bx*TAU*(uv.x+(Px*TAU)))+Hx));c=mix(c,cb,smoothstep(0.,S,A*cos(By*TAU*(uv.y+(Py*TAU)))+Hy));c=mix(c,ct,smoothstep(0.,S,A*cos(Bx*TAU*(uw.x+(Px*TAU)))+Hx));c=mix(c,ct,smoothstep(0.,S,A*cos(By*TAU*(uw.y+(Py*TAU)))+Hy)); `;num_steps=111,pal_lerp=[];for(let n=0;n<p.pal.v.length-1;n++)for(let e=0;e<num_steps;e++)pal_lerp.push(lerp_hex(p.pal.v[n],p.pal.v[n+1],e/num_steps));for(let n=0;n<rb(0,pal_lerp.length);n++)e=pal_lerp.shift(),pal_lerp.push(e);function hex_rgb(e){e=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);return e?{r:parseInt(e[1],16),g:parseInt(e[2],16),b:parseInt(e[3],16)}:null}function sn(e){return e.toFixed(5)}d_array=[],pal_lerp.forEach(e=>{c_rgb=hex_rgb(e),d_array.push(c_rgb.r,c_rgb.g,c_rgb.b)});var texture=gl.createTexture();gl.bindTexture(gl.TEXTURE_2D,texture),gl.texImage2D(gl.TEXTURE_2D,0,gl.RGB,d_array.length/3,1,0,gl.RGB,gl.UNSIGNED_BYTE,new Uint8Array(d_array)),gl.texParameteri(gl.TEXTURE_2D,gl.TEXTURE_MIN_FILTER,gl.NEAREST),gl.texParameteri(gl.TEXTURE_2D,gl.TEXTURE_MAG_FILTER,gl.NEAREST),gl.texParameteri(gl.TEXTURE_2D,gl.TEXTURE_WRAP_S,gl.CLAMP_TO_EDGE),gl.texParameteri(gl.TEXTURE_2D,gl.TEXTURE_WRAP_T,gl.CLAMP_TO_EDGE);const alignment=1;function U(e,n){this.n=e,this.s=n,this.l=gl.getUniformLocation(pg,e)}function R(e){b=e.createBuffer(),e.bindBuffer(e.ARRAY_BUFFER,b),e.bufferData(e.ARRAY_BUFFER,R.v,e.STATIC_DRAW)}function rz(){ww=window.innerWidth,hh=window.innerHeight,hh>=ww?(d=ww,w=d,h=16*d/9,h>hh&&(d=hh,w=9*d/16,h=d),cv.style.transform="rotate(0deg)"):hh<ww&&(d=hh,w=d,h=16*d/9,h>ww&&(d=ww,w=9*d/16,h=d),cv.style.transform="rotate(90deg)"),cv.width=w,cv.height=h,ur.set(w,h),gl.viewport(0,0,w,h),document.body.style.backgroundColor="#111"}gl.pixelStorei(gl.UNPACK_ALIGNMENT,alignment),vs="attribute vec2 a_position;attribute vec2 a_texcoord;varying vec2 v_texcoord;void main(){gl_Position=vec4(a_position,0,1);v_texcoord=a_texcoord;}",fs=` #define PI 3.141592653589793 #define TAU 6.283185307179586 #define V vec2 #define W vec3 #define F float precision highp float;uniform V ur;uniform sampler2D u_tex;uniform F fc;F shPos=${p.e_xy.toFixed(5)};F rotv=${p.rotation.v};F cB1=${sn(p.b1)};F cB2=${sn(p.b2)};F cP1=${sn(p.p1)};F cP1p=${sn(p.p1p)};F cP2=${sn(p.p2)};F cP2p=${sn(p.p2p)};F cD=${sn(p.d)};F cDf=${sn(p.df)};F cDp=${sn(p.dp)};F cS=${sn(p.s)};F cSp=${sn(p.sp)};F c1=1.;F c2=2.;F c4=4.;F c8=8.;F c14=14.;F c20=20.;F fB1=mod(fc,cB1);F fB2=mod(fc,cB2);F fP1=mod(fc,cP1);F fP1p=mod(fc,cP1p);F fP2=mod(fc,cP2);F fP2p=mod(fc,cP2p);F fD=mod(fc,cD);F fDp=mod(fc,cDp);F fDf=mod(fc,cDf);F fS=mod(fc,cS);F fSp=mod(fc,cSp);F f1=mod(fc,c1);F f2=mod(fc,c2);F f4=mod(fc,c4);F f8=mod(fc,c8);F f14=mod(fc,c14);F f20=mod(fc,c20);uniform F zB1,zB2,zP1,zP1p,zP2,zP2p,zD,zDp,zDf,zS,zSp,z1,z2,z4,z8,z14,z20;F wB1=cB1/2.*sin(TAU/cB1*fB1+zB1)+cB1/2.;F wB2=cB2/2.*sin(TAU/cB2*fB2+zB2)+cB2/2.;F wP1=cP1/2.*sin(TAU/cP1*fP1+zP1)+cP1/2.;F wP1p=cP1p/2.*sin(TAU/cP1p*fP1p+zP1p)+cP1p/2.;F wP2=cP2/2.*sin(TAU/cP2*fP2+zP2)+cP2/2.;F wP2p=cP2p/2.*sin(TAU/cP2p*fP2p+zP2p)+cP2p/2.;F wD=cD/2.*sin(TAU/cD*fD+zD)+cD/2.;F wDp=cDp/2.*sin(TAU/cDp*fDp+zDp)+cDp/2.;F wDf=cDf/2.*sin(TAU/cDf*fDf+zDf)+cDf/2.;F wS=cS/2.*sin(TAU/cS*fS+zS)+cS/2.;F wSp=cSp/2.*sin(TAU/cSp*fSp+zSp)+cSp/2.;F w1=1./2.*sin(TAU/1.*(f1)+z1)+1./2.;F w2=2./2.*sin(TAU/2.*(f2)+z2)+2./2.;F w4=4./2.*sin(TAU/4.*(f4)+z4)+4./2.;F w8=8./2.*sin(TAU/8.*(f8)+z8)+8./2.;F w14=14./2.*sin(TAU/14.*(f14)+z14)+14./2.;F w20=20./2.*sin(TAU/20.*(f20)+z20)+20./2.;F wGC=w${p.uGC};F cGC=c${p.uGC};F wGP=w${p.uGP};F cGP=c${p.uGP};F wFC=w${p.uFC};F cFC=c${p.uFC};F wSpiral=w${p.uSpiral};F cSpiral=c${p.uSpiral};F map(F value,F min1,F max1,F min2,F max2){return min2+(value-min1)*(max2-min2)/(max1-min1);} V rot(V uv,F a){uv=mat2(cos(a),-sin(a),sin(a),cos(a))*uv;return uv;} W circle(V uv,W c,W c_to,V r,F blur,F thickness){F d=length(uv)-r.x;return mix(c,c_to,1.0-smoothstep(0.0,blur,abs(d)-thickness));} W rect(V uv,W c,W c_to,V r,F blur,F thickness){V d=abs(uv)-r;F dd=length(max(d,V(0)))+min(max(d.x,d.y),0.0);return mix(c,c_to,1.0-smoothstep(0.0,blur,abs(dd)-thickness));} W diamond(V uv,W c,W c_to,V r,F blur,F thickness){uv=rot(uv,PI/4.);V d=abs(uv)-r*.8;F dd=length(max(d,V(0)))+min(max(d.x,d.y),0.0);return mix(c,c_to,1.0-smoothstep(0.0,blur,abs(dd)-thickness));} W none(V uv,W c,W c_to,V r,F blur,F thickness){return c;} W pre_blur(V uv){W c=W(0.0);V uvf=uv;V uve=uv;F sgn=${rc(["1.","-1."])};F spA=${rb(.1,.25)};F spB=${rb(.1,.15)};F spC=${rb(.2,.25)};if (rotv==1.){uv=rot(uv,sgn*PI/4.);} else if (rotv==2.){uv=rot(uv,sgn*TAU*length(uv)*spA);} else if (rotv==3.){uv=rot(uv,sgn*TAU*length(uv)*(0.25+map(wSpiral,0.,cSpiral,spA,spA)));} else if (rotv==4.){uv=rot(uv,sgn*TAU*length(uv)*map(wSpiral,0.,cSpiral,spB,spC)+TAU*cSpiral/8.);}V uw=uv*0.96;${p.grids} if (${tok_id}<200.){c=rect(uvf,c,W(map(wFC,0.,cFC,.3,.8)),V(0.55,.99),0.07,0.005);} return c;}W blur(V uv,V res,V dir){W c=W(0.0);V f1=V(1.411764705882353)*dir/2000.;V f2=V(3.2941176470588234)*dir/2000.;V f3=V(5.176470588235294)*dir/2000.;c += pre_blur(uv)*0.1964825501511404;c += pre_blur(uv+(f1))*0.2969069646728344;c += pre_blur(uv-(f1))*0.2969069646728344;c += pre_blur(uv+(f2))*0.09447039785044732;c += pre_blur(uv-(f2))*0.09447039785044732;c += pre_blur(uv+(f3))*0.010381362401148057;c += pre_blur(uv-(f3))*0.010381362401148057;return c;}W mc (V uv,W c){F ch=c.r;vec4 c_buf=texture2D(u_tex,V(ch,ch));c=W(c_buf.x,c_buf.y,c_buf.z);return c;} W m(V uv){V uv_=uv;V uvf=uv;V uve=uv;W c=W(0.);c=pre_blur(uv);c=blur(uv,ur.xy,V(${p.blur.v}));${p.el_top}if (${tok_id}<200.){c=rect(uvf,c,W(map(wFC,0.,cFC,.3,.8)),V(0.55,.99),0.07,0.005);} c=mc(uv_,c);return c;}void main(){V uv=(2.*gl_FragCoord.xy-ur.xy)/ur.y;W c=W(0.);c=m(uv);gl_FragColor=vec4(c,1.);} `,U.prototype.set=function(...e){m="uniform"+this.s,a=[this.l].concat(e),gl[m].apply(gl,a)},R.v=new Float32Array([-1,-1,1,-1,-1,1,1,1]),R.prototype.render=function(e){e.drawArrays(e.TRIANGLE_STRIP,0,4)},as=(e,n)=>{if(sh=gl.createShader(n),gl.shaderSource(sh,e),gl.compileShader(sh),!gl.getShaderParameter(sh,gl.COMPILE_STATUS))throw new Error("Shader compile error: "+gl.getShaderInfoLog(sh));gl.attachShader(pg,sh)},window.addEventListener("resize",rz),pg=gl.createProgram(),as(vs,gl.VERTEX_SHADER),as(fs,gl.FRAGMENT_SHADER),gl.linkProgram(pg),gl.useProgram(pg);var ur=new U("ur","2f"),fc=new U("fc","1f"),zB1=new U("zB1","1f"),zB2=new U("zB2","1f"),zP1=new U("zP1","1f"),zP1p=new U("zP1p","1f"),zP2=new U("zP
function hti(e){let n=[];for(let e=0;e<32;e++)n.push(tokenData.hash.slice(2+2*e,4+2*e));return n.map(e=>parseInt(e,16))}function get_seed(e){return parseInt(tokenData.hash.slice(0,16),16)}function map_v(e,n=0,a=1){return map_r(hash_ints[e],0,255,n,a)}function map_v_str(e,n=0,a=1){return map_v(e,n,a).toFixed(6).toString()}function map_r(e,n,a,t,i){return(e-n)/(a-n)*(i-t)+t}function rr(){return Math.random()}function rd(){return seed^=seed<<13,seed^=seed>>17,seed^=seed<<5,((seed<0?1+~seed:seed)%1e3/1e3).toFixed(5)}function rb(e,n){return(e+(n-e)*rd()).toFixed(5)}function rc(e){return e[Math.floor(rb(0,.99*e.length))]}function rco(e){return a=[],e.forEach((e,n)=>{for(i=0;i<e.w;i++)a.push(e)}),rc(a)}function shn(e){return e.toFixed(5)}function lerp_hex(e,n,a){var t=+e.replace("#","0x"),i=t>>16,e=t>>8&255,t=255&t,n=+n.replace("#","0x");return"#"+((1<<24)+(i+a*((n>>16)-i)<<16)+(e+a*((n>>8&255)-e)<<8)+(t+a*((255&n)-t))|0).toString(16).slice(1)}function get_obj(e,n,a=!1){let t=e.filter(({n:e})=>e==n);return a?(t=t.map(({v:e})=>e),[...t]):t[0]}function shuffle(n){for(let e=n.length-1;0<e;e--){var a=Math.floor(rd()*(e+1));[n[e],n[a]]=[n[a],n[e]]}}cv=document.querySelector("canvas"),document.body.style.backgroundColor="#111",gl=cv.getContext("webgl"),st=(new Date).getTime(),tok_id=parseInt(tokenData.tokenId.slice(-4)).toFixed(5),MEQLOW=FC=fc=0,NDO=["32n","16n","8n","4n","2n","1n"],synth_flaga=0,synth_flagb=0,synth_list=[];let seed=get_seed(tokenData.hash),hash_ints=hti(tokenData.hash),hns=hash_ints.map((e,n)=>map_v_str(n,.1,1)),hnss=hash_ints.map((e,n)=>map_v_str(n,1,10));function expandClusterScale(a,e){let t=[];for(let n=0;n<e;n++)t=[...t,...a.map(e=>e<a[0]&&"C"<=e?`${e}${n+1}`:`${e}${n}`)];return t=[...t,`${a[0]}${e}`],t}function generateCluster(n,a,e,t,i,l,p,s=null){let r=[];var o=NDO.indexOf(e),c=Math.max(o,NDO.indexOf(t));let u=Math.floor(rb(0,n.length)),F=0;var x=Math.round(rb(i,l));for(let e=0;e<x;e++){var v=NDO[Math.round(rb(o,c))];if(r.push({t:F,note:n[u],duration:Tone.getTransport().toSeconds(v)}),s&&e===x-2){let e=a.indexOf(s.replace(/\d+/,""))-a.indexOf(n[u].replace(/\d+/,""));e<-a.length/2&&(e+=a.length),e>a.length/2&&(e-=a.length),u+e>=n.length&&(e-=a.length),u+e<0&&(e+=a.length),u+=e}else{var m=Math.ceil(rr()*p);let e=Math.sign(rr()-.5);0===u&&e<0&&(e=1),u===n.length-1&&0<e&&(e=-1),u=Math.max(0,Math.min(n.length-1,u+m*e))}F+=Tone.getTransport().toSeconds(v)}return r}function shiftClusterNote(e,n){let a=n.indexOf(e);return rr()<.5&&0<a?a--:a<n.length-1&&a++,n[a]}function n2f(n,a){if("just"!==a.tuning?.type)return new Tone.Frequency(n).toFrequency();{var[,t,n]=/([^\d]+)(\d+)/.exec(n),a=a.scale.indexOf(t);let e=n-4;return t<"E"&&"C"<=t&&--e,329.628*[1,1.125,1.265625,1.5,1.6875][a]*Math.pow(2,e)}}pho=90;let ae={init:(s,e="interactive")=>{ae.SScale=expandClusterScale(s.scale,1),Tone.setContext(new Tone.Context({latencyHint:e})),Tone.getTransport().bpm.value=60,ae.M=new Tone.Gain(0).toDestination(),ae.MEQ=new Tone.EQ3(s.M.eq).connect(ae.M),ae.MEnv=new Tone.Gain(0).connect(ae.MEQ),ae.MEnvLFO=new Tone.LFO({frequency:s.M.envelope.baseFrequency,partials:s.M.envelope.partials,phase:s.M.envelope.phase,min:s.M.envelope.minGain,max:s.M.envelope.maxGain,amplitude:1}).connect(ae.MEnv.gain),ae.comp=new Tone.Compressor(s.M.compressor).connect(ae.MEnv),ae.reverb=new Tone.Reverb({decay:10,preDelay:s.returns.reverb.pre/1e3}).connect(ae.MEnv),ae.reverb.generate(),ae.BDirectOut=new Tone.Gain(s.binauralSends.direct).connect(ae.MEQ),ae.BReverbOut=new Tone.Gain(s.binauralSends.reverb).connect(ae.reverb),ae.BEQ=new Tone.EQ3(s.binauralEq).connect(ae.BDirectOut).connect(ae.BReverbOut),ae.B1Volume=new Tone.Gain(0).connect(ae.BEQ),ae.B1VolLFO=new Tone.LFO({min:s.B1.volMin,max:s.B1.volMax,frequency:s.B1.volLFORate,amplitude:1}).connect(ae.B1Volume.gain),ae.B1Filter=new Tone.Filter({frequency:s.B1.filterFrequency,Q:s.B1.filterResonance,type:"lowpass",rolloff:"-24"}).connect(ae.B1Volume);e=(new Tone.Merge).connect(ae.B1Filter);ae.B1OscLeft=new Tone.Oscillator({frequency:new Tone.Frequency(s.B1.note).toFrequency(),volume:-15,channelCount:1}).connect(e,0,0),ae.B1OscRight=new Tone.Oscillator({frequency:new Tone.Frequency(s.B1.note).toFrequency()+s.B1.difference,volume:-15,channelCount:1}).connect(e,0,1),ae.B2Volume=new Tone.Gain(0).connect(ae.BEQ),ae.B2VolLFO=new Tone.LFO({min:s.B2.volMin,max:s.B2.volMax,frequency:s.B2.volLFORate,amplitude:1}).connect(ae.B2Volume.gain),ae.B2Filter=new Tone.Filter({frequency:s.B2.filterFrequency,Q:s.B2.filterResonance,type:"lowpass",rolloff:"-24"}).connect(ae.B2Volume);e=(new Tone.Merge).connect(ae.B2Filter);ae.B2OscLeft=new Tone.Oscillator({frequency:new Tone.Frequency(s.B2.note).toFrequency(),volume:-15,channelCount:1}).connect(e,0,0),ae.B2OscRight=new Tone.Oscillator({frequency:new Tone.Frequency(s.B2.note).toFrequency()+s.B2.difference,volume:-15,channelCount:1}).connect(e,0,1),ae.DDirectOut=new Tone.Gain(s.D.sends.direct).connect(ae.comp),ae.DReverbOut=new Tone.Gain(s.D.sends.reverb).connect(ae.reverb),ae.DGain=new Tone.Gain(0).connect(ae.DReverbOut).connect(ae.DDirectOut),ae.DGainLFO=new Tone.LFO({min:s.D.gainLFOMin??1,max:s.D.gainLFOMax??1,frequency:s.D.gainLFORate,amplitude:1}).connect(ae.DGain.gain),ae.DVolume=new Tone.Volume(s.D.vol).connect(ae.DGain),ae.DEQ=new Tone.EQ3(s.D.eq).connect(ae.DVolume),ae.DAP=new Tone.AutoPanner(s.D.autoPan).connect(ae.DEQ),ae.DF=new Tone.AutoFilter({frequency:s.D.filterRate,octaves:s.D.filterDepth,baseFrequency:s.D.filterFrequency,filter:{type:"lowpass",rolloff:"-12",Q:s.D.filterResonance}}).connect(ae.DAP),ae.DSynths=Array.from({length:3},(e,p)=>s.D.oscillators.map(({coarse:e,fine:n,vol:a})=>{n=1200*Math.log2(e)+n;let t=new Tone.Oscillator({type:"sawtooth",frequency:n2f(s.D.chord[p]??"E2",s),detune:n,volume:a}).connect(ae.DF),i=!1,l;return{triggerAttack:()=>{clearTimeout(l),i||(t.start(),i=!0)},triggerRelease:()=>{i&&(i=!1,l=setTimeout(()=>{t.stop()},1e3*s.M.fadeIn))},setFrequency:e=>{e?(t.frequency.value=e,i&&t.start()):i&&t.stop()},osc:t}})),ae.SDirectOut=new Tone.Gain(s.S.sends.direct).connect(ae.comp),ae.SReverbOut=new Tone.Gain(s.S.sends.reverb).connect(ae.reverb),ae.SVolume=new Tone.Volume(s.S.vol).connect(ae.SReverbOut).connect(ae.SDirectOut),ae.SEQ=new Tone.EQ3(s.S.eq).connect(ae.SVolume),ae.SAP=new Tone.AutoPanner(s.S.autoPan).connect(ae.SEQ),ae.SChorus=new Tone.Chorus(s.S.chorus).connect(ae.SAP),ae.SF=new Tone.Filter({type:"lowpass",rolloff:s.S.filterRolloff??"-24",Q:s.S.filterResonance}).connect(ae.SChorus),ae.SFEnv=new Tone.FrequencyEnvelope({baseFrequency:s.S.filterFrequency,...s.S.filterEnvelope}).connect(ae.SF.frequency),ae.SSynth=new Tone.Synth({oscillator:{type:s.S.oscillatorType},envelope:s.S.amplitudeEnvelope}).connect(ae.SF),ae.PDirectOut=new Tone.Gain(s.padSends.direct).connect(ae.comp),ae.PReverbOut=new Tone.Gain(s.padSends.reverb).connect(ae.reverb),ae.PVolume=new Tone.Volume(s.padVol).connect(ae.PDirectOut).connect(ae.PReverbOut),ae.PEQ=new Tone.EQ3(s.padEq).connect(ae.PVolume),ae.PChorus=new Tone.Chorus(s.padChorus).connect(ae.PEQ),ae.Ps=Array.from({length:2},(e,n)=>{let a=s[`P${n+1}`],t={};return t.gain=new Tone.Gain(0).connect(ae.PChorus),t.gainLFO=new Tone.LFO({min:a.gainLFOMin??1,max:a.gainLFOMax??1,frequency:a.gainLFORate,amplitude:1}).connect(t.gain.gain),t.autoPan=new Tone.AutoPanner(a.autoPan).connect(t.gain),t.pan=new Tone.Panner(a.pan).connect(t.autoPan),t.filter=new Tone.Filter({type:"lowpass",rolloff:a.filterRolloff??"-12",Q:a.filterResonance}).connect(t.pan),t.filterEnv=new Tone.FrequencyEnvelope({baseFrequency:a.filterFrequency,...a.filterEnvelope}).connect(t.filter.frequency),t.synths=Array.from({length:a.polyphony},()=>new Tone.Synth({oscillator:{type:a.oscillatorType,detune:a.detune},envelope:a.amplitudeEnvelope}).connect(t.filter)),t})},started:!(pz={B1:[rd()*pho,rr()*pho],B2:[rd()*pho,rr()*pho],Dp:[rd()*pho,rr()*pho],Df:[rd()*pho,rr()*pho],D:[rd()*pho,rr()*pho],M:[rd()*pho,rr()*pho],P1p:[rd()*pho,rr()*pho],P1:[rd()*pho,rr()*pho],P2p:[rd()*pho,rr()*pho],P2:[rd()*pho,rr()*pho],S:[90,90],Sp:[rd()*pho,rr()*pho],Q1:[rd()*pho,rr()*pho],Q2:[rd()*pho,rr()*pho],Q4:[rd()*pho,rr()*pho],Q8:[rd()*pho,rr()*pho],Q14:[rd()*pho,rr()*pho],Q20:[rd()*pho,rr()*pho]}),start:async(t,e)=>{if(!ae.started){await Tone.start(),Tone.getTransport().start(),clearTimeout(ae.lastBinauralStopper),t.B1.note&&(ae.B1OscLeft.start(),ae.B1OscRight.start()),t.B2.note&&(ae.B2OscLeft.start(),ae.B2OscRight.start()),ae.DSynths.forEach((e,n)=>e.forEach(e=>t.D.chord[n]&&e.triggerAttack())),ae.SCluster=generateCluster(ae.SScale,t.scale,t.S.minNoteDuration,t.S.maxNoteDuration,1,t.S.maxClusterSize,2,t.B1.note),ae.SPattern=new Tone.Pattern({callback:e=>{rr()<t.S.clusterProbability&&ae._playSynth(e,t)},values:[!0],interval:t.S.clusterInterval}).start(),ae.PPatterns=ae.Ps.map((e,n)=>{let a=t[`P${n+1}`];return new Tone.Pattern({callback:e=>{rr()<a.repeatProbability&&ae._playPad(n,e,t)},values:[!0],interval:a.repeatInterval}).start()}),ae.MEnvLFO.phase=pz.M[1],ae.B1VolLFO.phase=pz.B1[1],ae.B2VolLFO.phase=pz.B2[1],ae.DAP.phase=pz.Dp[1],ae.DGainLFO.phase=pz.D[1],ae.DF.phase=pz.Df[1],ae.SAP.phase=pz.Sp[1],ae.Ps[0].autoPan._lfo.phase=pz.P1p[1],ae.Ps[0].gainLFO.phase=pz.P1[1],ae.Ps[1].autoPan._lfo.phase=pz.P2p[1],ae.Ps[1].gainLFO.phase=pz.P2[1],ae.MEnvLFO.start(),ae.B1VolLFO.start(),ae.B2VolLFO.start(),ae.DAP.start(),ae.DGainLFO.start(),ae.DF.start(),ae.SAP.start(),ae.SChorus.start();for(var n of ae.Ps)n.autoPan.start(),n.gainLFO.start();ae.PChorus.start(),ae.M.gain.setValueAtTime(0,Tone.now()),ae.M.gain.linearRampToValueAtTime(t.M.gain,Tone.now()+t.M.fadeIn),ae.SVolume.volume.setValueAtTime(-1e3,Tone.now()),ae.SVolume.volume.linearRampToValueAtTime(sp.S.vol,Tone.now()+t.M.fadeIn+7),ae.started=!0}},_playSynth:(i,l)=>{let p=[...ae.SCluster];for(let e=1;e<p.length;e++){var n,a,t;rr()<.1&&(n=Tone.getTransport().toSeconds(l.S.minNoteDuration)/2,a=p[e],t=p[e-1],rr()<.5?(p[e-1]={...t,duration:t.duration-n},p[e]={...a,t:a.t-n,duration:a.duration+n}):(p[e-1]={...t,duration:t.duration+n},p[e]={...a,t:a.t+n,duration:a.duration-n}))}synth_flaga=0,synth_flagb=0,synth_list=[];for(let t=0;t<p.length;t++){let{t:e,note:n,duration:a}=p[t];t!==p.length-1&&rr()<.1&&(n=shiftClusterNote(n,ae.SScale));var s=n2f(n,l)*Math.pow(2,l.S.octave),r=.07*rr();ae.playSynthNote(i+e+r,s,a)}},playSynthNote:(e,n,a)=>{--synth_flaga,synth_flagb+=1,synth_list.push(a),ae.SSynth.triggerAttackRelease(n,a,e),ae.SFEnv.triggerAttackRelease(a,e)},_playPad:(a,t,i)=>{var l=i[`P${a+1}`],p=Tone.getTransport().toSeconds(l.repeatInterval)/3,s=.07*rr();for(let n=0;n<l.chord.length;n++){var r=l.chord[n];let e=ae.Ps[a].synths[n];r&&e.triggerAttackRelease(n2f(r,i),p,t+s),ae.Ps[a].filterEnv.triggerAttackRelease(p,t+s)}}},pp={pal:[{w:15,n:"Awe",v:"F2F3EEF2F3EEF0EDDA7D88975269939B361CF0EDDA39609400155F9B361CE5E6D8FAE193CC948200337F394F77D6AAA5A2938D5C98B43989A93D0000C66C5656526F905B5FDC9B80F0ECDB939690F5EBD9CC94828E74894DA9CC6D492BD8D1BEF3EED9F2F3EEF2F3EE"},{w:8,n:"Elysium",v:"F2F3EEF2F3EECBC6D5BDB4BD636474F2F3EE424D389794A0F2F3EEF2F3EE9A9AB08D73777A5663F2F3EE70595D935C689D8798B7BDC8817D7F9A9FA8F2F3EEF2F3EE888789967E8759454A474B467A5663F2F3EE70595D935C68564E49F2F3EEF2F3EE848A925A687C291F007A566370595D935C6835362EF2F3EEF2F3EE"},{w:8,n:"Liquid Dusk",v:"F2F3EEF2F3EEB68662230D00B68662BF8C61C88F5AD19559D39959D69B55E8A557EFA953E3A64BE5BA5CEFD171E6C96DE8CE81EBDDACE9E7CEECE3E4E4E5E9E6E7E1F5E3BDE7BC6EBD7E1FB36F1C9953177F3B0E7F401786522A895F35F2F3EE926B40A2774CBF94699C7347784F316A4027643A246C46335D3C2B2C16092C1609F2F3EEF2F3EE6D452C8E5D35B47F49D09E61DDB67BF6DAA8D7C499E5C384BF9D5EF2F3EEF2F3EE"},{w:8,n:"Chimera",v:"F2F3EEF2F3EE064f6e064f6ef68c5040456af3a257F2F3EEF2F3EE064f6e064f6ef68c5040456af3a257F2F3EEF2F3EE"},{w:8,n:"Moonpool",v:"F2F3EEF2F3EE6E8FB09DADC65D718C6D7E987989A28099B74465845E748C72849A78859639405071788A525F720E1D3408172E485367636B7E5A7995F2F3EEF2F3EE2E486334455F1F2B4573839D1C2A44434D665F66801E28416261694D5973606F843E4A5A00000B6261696C809B4E627DF2F3EEF2F3EE"},{w:10,n:"Body Electric",v:"F2F3EEF2F3EE0000001212120000003636368484847A7A7A5C5C5C4747471313132727271313130000001717172D2D2D707070B4B4B4F2F3EEF2F3EECBCBCBC0C0C02121211A1A1AF2F3EEF2F3EE969696C9C9C98181810000000202025C5C5C454545959595CBCBCBBEBEBEC9C9C92121211A1A1A646464BCBCBCAAAAAAF2F3EEAEAEAE646464010101272727010101010101F2F3EEF2F3EE"},{w:11,n:"Holotropic",v:"F2F3EE9C5555A298A3738CA20041701E547B194B6B717E7588978BAAABAC39688D909EA2748E92113864002357194B6B625E78928E945C5953829C983A5E779C55556E15059C5555F2F3EE94A0B4A4A0AE92A0AB7E8485BEBAB9928E832E303C92A1A67061685D5B613075925E717B668385F2F3EE194B6B113864002357194B6B759299B5BBBD92A8AEF2F3EEF2F3EE"},{w:8,n:"Asteria",v:"6346525845527242468C505577566468576A471F300C01255A5A816A638D9F839BD9C8B5CEC8B27242468C5055C7B49FC7B49FBEB0A4A99B999285878A8D918C9097ADAAAF0C01259691A38C849E8A809A7242468C50558A7F9F816D8F7356759B7386471F300C0125B5837FA773707C5E5D7E605F785E5485665A99705F926551"},{w:12,n:"Meadow",v:"121B2A01002801001265899759869BD3D6DBDBD2D7DED2D4F6EDE8F9C37DF9C37D444849455C6A5D8795567D8CF2F3EEF2F3EE4A707D567C89375F6B2F545D14191F000929C9BCACB57657BB6B4AC4704BAA6D51A69A8CD9DDE0D9DDE021210009182D1F2227253C4238575C31505317292D4B666F5B7C833C4A4D000000D69F5FD69F5FD2C7C3C6BCBAC3BDBDB6BABB4E6C765A737A000000181B2014151A"},{w:4,n:"Halcyon",v:"9A95A0756485B6A5C89B85A2835061C58FADBC849E883E3FBD636ECF707D7039468C495CB9627D683D4D3F2D397F43645E37502528304A354F3A2D3E1E231D2425252225232224232123222123222123222123221C211E2E272D42303D26262D482F377B40484C3037442F35A9554E9C4E474E282BB26A53CE7C5D8843319A605BC48A8CA06B6A714A4FA88DB1A38AAE594662B1A9B4"}],song:[{w:10,n:"Harmonic Transmission",v:1},{w:10,n:"Emanating Dreamscape",v:2},{w:10,n:"Oceanic Expanse",v:3},{w:10,n:"The Deep Now",v:4},{w:10,n:"Glimmering Horizon",v:5},{w:10,n:"Weightless River",v:6},{w:10,n:"Timeless Window",v:7},{w:10,n:"Infinite Portal",v:8},{w:10,n:"Luminous Space",v:9},{w:10,n:"Weightless Moment",v:10},{w:10,n:"Present-Time Awareness",v:11},{w:2,n:"Interbeing",v:12}],rotation:[{w:7,n:"Unperturbed",v:"0."},{w:3,n:"Angled",v:"1."},{w:1,n:"Whip Spiral",v:"3."},{w:2,n:"Eternal Spiral",v:"4."}],blur:[{w:1,n:"Angled Positive",v:"10.,10."},{w:1,n:"Angled Negative",v:"-10.,10."},{w:3,n:"Vertical",v:"0.,10."},{w:2,n:"Horizontal",v:"10.,0."}],e:[{w:0,n:"Water",v:"circle"},{w:0,n:"Earth",v:"rect"},{w:0,n:"Fire",v:"diamond"},{w:0,n:"Air",v:"none"}],e_xy:[{w:0,n:"Centered",v:1},{w:0,n:"Duality",v:3},{w:0,n:"Symmetric Duality",v:4},{w:0,n:"Trinity",v:2},{w:0,n:"None",v:0}],e_z:[{w:2,n:"Below",v:0},{w:1,n:"Omnipresent",v:1}],el_exp:[{w:1,n:"Expanding",v:[.9,1.2]},{w:10,n:"Static",v:[.95,1.05]}],grid:[{w:3,n:"Transcend",v:[2,4,2,4]},{w:2,n:"Exhale",v:[2,4,10,15]},{w:2,n:"Inhale",v:[10,15,2,4]},{w:3,n:"Lattice",v:[10,15,10,15]},{w:2,n:"Passage",v:[25,30,10,15]},{w:2,n:"Universal",v:[25,30,25,30]}]},p={pal:rco(pp.pal),rotation:rco(pp.rotation),blur:rco(pp.blur),e:rco(pp.e),el_exp:rco(pp.el_exp),grid:rco(pp.grid),song:rco(pp.song)};p.feel=["Immersive","Spacious","Serene","Spacious","Spacious","Immersive","Immersive","Spacious","Serene","Immersive","Serene","Heartbeat"][p.song.v-1],p.pal.v=p.pal.v.match(/.{6}/g).map(e=>"#"+e);let nm={"16n.":.0234375,"16n":.25/16,"8n.":.046875,"8n":.25/8,"4n.":.09375,"4n":.0625,"2n.":.1875,"2n":.125,"1n.":.375,"1n":.25,"1m":.25,"2m":.5,"3m":.75,"4m":1,"5m":1.25,"6m":1.5,"7m":1.75,"8m":2,"9m":2.25,"10m":2.5,"11m":2.75,"12m":3};if(vpl=[["Water","Water","Water","Fire","Fire","Fire","Air","Earth","Earth","Earth","Air",rc(["Earth","Fire","Water"])],[1,3,2,1,3,2,0,1,3,2,0,2],[["S"],[rc(["S","D"]),rc(["S","D"])],["S"],["S"],["S","S"],["S"],["S"],["S"],[rc(["B1","B2"]),rc(["B1","B2"])],["S"],["B1"],["Sp"]],[["D"],[rc(["S","D"]),rc(["S","D"])],["D"],["S"],[rc(["S","B2"]),rc(["S","B2"])],["S"],["S"],["S"],[rc(["D","B2"]),rc(["D","B1"])],["S"],["B1"],["Sp"]],["D","D","B1","B2","P2","B1","S","B2","D","B2",rc(["B1","B2"]),"D"],[["B1","B2","D","Df","S","Sp","2","1"],["B1","B2","D","Df","S","2","1"],["B1","B2","S","P2p","D","Df","2","1"],["B1","B1","P1","P2p","D","Df","S","2","1"],["B1","B2","P2","P2p","S","S","2","1"],["B1","B2","D","Df","S","2","1"],["B1","B2","D","Df","P1","P2","P2p","S","2","1"],["B1","B2","P2","P2p","S","2","1"],["B1","B2","D","Df","S","Sp","2","1"],["B1","B2","D","Df","S","S","2","1"],["B1","B2","4","2","1"],["B1","B2","P1","P2","D","Df"]],["14","14","14","14","14","14","14","14","14","14","14","14"],["D","D","D","D","S","D",rc(["B1","D"]),"P2","D","B1",rc(["B1","B2"]),"B1"],[rc(["B1","D"]),rc(["B1","Df"]),"D","D",rc(["B2","P1p"]),"B2","S","S","B2","B2",rc(["B1","B2"]),"B2"]],si=p.song.v-1,p.e=get_obj(pp.e,vpl[0][si]),p.e_xy=vpl[1][si],p.e_z=rc([0,1]),p.uSC=vpl[2][si],p.uSE=vpl[3][si],p.uGC=vpl[4][si],p.gw=vpl[5][si],p.uFC=vpl[6][si],p.uSpiral=vpl[7][si],p.uGP=vpl[8][si],"none"==p.e.v?p.e_z={w:0,n:"None",v:0}:(p.e_z=rco(pp.e_z),p.el_exp=rco(pp.el_exp)),spl=[[60,60,60,60,60,60,60,60,60,60,60,60],["E","E","E","E","E","E","E","E","E","E","E","E"],["F#","F#","F#","F#","F#","F#","F#","F#","F#","F#","F#","F#"],["G#","G#","G#","G#","G#","G#","G#","G#","G#","G#","G#","G#"],["B","B","B","B","B","B","B","B","B","B","B","B"],["C#","C#","C#","C#","C#","C#","C#","C#","C#","C#","C#","C#"],["just","just","just","just","just","just","just","just","just","just","just","just"],[1,1,1,1,1,1,1,1,1,1,1,1],[1.125,1.125,1.125,1.125,1.125,1.125,1.125,1.125,1.125,1.125,1.125,1.125],[1.265625,1.265625,1.265625,1.265625,1.265625,1.265625,1.265625,1.265625,1.265625,1.265625,1.265625,1.265625],[1.5,1.5,1.5,1.5,1.5,1.5,1.5,1.5,1.5,1.5,1.5,1.5],[1.6875,1.6875,1.6875,1.6875,1.6875,1.6875,1.6875,1.6875,1.6875,1.6875,1.6875,1.6875],["E","E","E","E","E","E","E","E","E","E","E","E"],[4,4,4,4,4,4,4,4,4,4,4,4],[329.628,329.628,329.628,329.628,329.628,329.628,329.628,329.628,329.628,329.628,329.628,329.628],[.07,.07,.07,.07,.07,.07,.07,.07,.07,.07,.07,.07],[15,15,15,15,15,15,15,15,15,15,15,15],[.001,.001,.001,.001,.001,.001,.001,.001,.001,.001,.001,.001],[.55,.75,.75,.75,.75,.75,.75,.75,0,0,0,.59],[.79,.71,.71,.71,.71,.71,.71,.71,1,1,1,.5],[.04,.88,.88,.88,.88,.88,.88,.86,.73,.73,.73,.47],[.52,.52,.52,.52,.52,.52,.52,.48,.52,.52,.52,.43],[122,188,188,188,188,188,188,207,122,122,122,28],[1,1,1,1,1,1,.39,1,0,0,0,1],[1,1,1,1,1,1,1,1,1,1,1,1],[.003,.003,.003,.021,.003,.027,.003,.003,.003,.042,.042,.024],[0,16.5,28.3,18.1,7.1,24.8,30,15.7,30,7.4,7.4,0],[14,20,2.4,1,19.8,5.2,20,20,14.4,20,20,1],[.08,.07,.06,.08,.06,.07,.25,.25,.25,.21,.42,.25],[-32.5,-10.3,-11.5,0,-.6,-20.8,-33.1,-16.2,-44.3,0,-27.1,0],[-11,-3,-4,-7.8,-4.6,-3.1,-8.8,-2,-3.5,-4.7,-3.7,-8.9],[0,0,0,0,0,0,0,.4,0,0,0,0],[.8,0,0,0,0,0,0,0,0,0,0,0],[71,250,76,250,192,250,250,250,194,133,133,194],[17073,2500,2500,869,2500,2500,2500,2500,17073,17073,17073,17073],[9.5,8.23,8.14,10,5.74,8.1,6.09,5.57,7.6,7.02,5.83,7.28],[10,10,10,10,10,10,10,10,10,10,10,10],[2.5,54.7,54.7,54.7,54.7,54.7,54.7,54.7,2.5,2.5,2.5,2.5],[.22,.28,.46,.13,.16,.03,.13,.09,.12,.06,.01,0],[1,1,1,1,1,1,.83,1,1,.65,.64,.19],["2m","2m","8m","6m","5m","4m","8m","4m","5m","8m","8m","8m"],[1,4,4,1,1,1,1,1,1,1,1,14],["G#1","G#1","G#1","C#2","C#2","E1","B1","F#1","F#1","G#1","F#1","F#2"],[2e3,2e3,2e3,2e3,2e3,2e3,2e3,2e3,2e3,962,962,2e3],[1,5.9,5.9,5.9,5.9,0,5.9,5.9,1,1,1,1],[.16,.19,0,.21,.03,0,0,0,0,.04,.04,0],[.81,1,.51,1,.73,1,.72,.38,.22,.17,.35,.33],["6m","6m","12m","12m","8m","7m","12m","6m","8m","6m","6m","8m"],[14,1,1,4,1,14,4,1,8,8,8,14],[2e3,226,226,1649,1972,1649,394,1649,367,1834,1834,1264],[1,0,0,0,0,0,0,0,1,1,1,1],["F#2","E3","B2","E3","G#2","E2","C#3","B2","E3","C#2","E2","C#3"],[3,3,3,3,3,3,3,3,3,3,3,3],["B1","B1","B1","C#2","C#2","F#1","F#1","F#1","F#1",null,null,"E1"],["E2",null,null,null,null,"F#2","C#3","C#3","E2","G#2","G#2","C#2"],["E3",null,null,null,null,"F#3",null,null,null,null,null,null],[-12.7,-9.4,-11.9,-24.8,-1e3,-28.8,-22.1,-1e3,-27.6,-30.2,-1e3,-23.3],[0,0,0,0,0,.19,0,0,0,0,0,0],[.88,.8,.8,.54,1,1,1,1,1,1,1,.78],["9m","6m","12m","10m","10m","7m","5m","5m","7m","7m","7m","12m"],[93,83,83,49,72,80,22,24,121,661,661,88],[0,0,0,0,0,0,0,0,1,1,1,1],["5m","7m","7m","9m","8m","5m","6m","7m","4m","4m","4m","9m"],[.69,.43,.43,1.71,0,1.26,2.36,2.94,0,0,0,.04],[.5,1,1,.5,1,1,.5,.5,1,4,4,.5],[1200,1200,1200,1200,1200,1200,1200,1200,1200,0,0,922],[.946,.946,.946,.946,.946,.946,.946,.946,.946,.946,.946,.946],[.6,.6,.6,.6,.6,.6,.6,.6,.6,.6,.6,.6],[1,1,1,1,1,1,.33,.33,1,1,1,1],[42.5,42.5,42.5,42.5,42.5,42.5,20.58,20.58,42.5,42.5,42.5,42.5],["exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential"],["exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential"],[0,-1.3,-1.3,-1.3,-1.3,-1.3,-1.3,-1.3,0,-7.6,-7.6,0],[1,1,1,1,1,1,2,2,1,1,1,2],[700,700,700,700,700,700,700,700,700,700,700,297],[20,.946,.946,.946,.946,.946,.946,.946,20,20,20,20],[.03072,.6,.6,.6,.6,.6,.6,.6,.03072,.03072,.03072,.03072],[1,1,1,1,1,1,1,1,1,1,1,1],[30.2,30.2,30.2,30.2,30.2,30.2,30.2,30.2,30.2,30.2,30.2,30.2],["exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential"],["exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential"],[-13.1,-1,-1,-1,-1,-1,-1,-1,-13.1,-13.1,-13.1,-13.1],[3,2,2,1,2,2,.5,.5,.5,.5,.5,.5],[1200,1200,1200,1200,1200,1200,1200,1200,1200,642,642,1200],[.946,.946,.946,.946,.946,.946,.946,.946,.946,.946,.946,.946],[.6,.6,.6,.6,.6,.6,.6,.6,.6,.6,.6,.6],[1,1,1,1,1,1,1,1,1,1,1,1],[5.41,5.41,5.41,5.41,5.41,5.41,5.41,5.41,5.41,5.41,5.41,5.41],["exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential"],["exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential"],[0,-4.1,-4.1,-4.1,-4.1,-4.1,-4.1,-4.1,0,-1e3,-1e3,0],[.5,1,1,1,1,1,3,3,.5,.5,.5,.5],[1186,0,0,0,0,0,0,0,1186,1186,1186,1186],[.946,2.97754,2.97754,2.97754,2.97754,2.97754,2.97754,2.97754,.946,.946,.946,.946],[.6,.6,.6,.6,.6,.6,.6,.6,.6,.6,.6,.6],[1,1,1,1,1,1,1,1,1,1,1,1],[5.41,5.41,5.41,5.41,5.41,5.41,13.61886,13.61886,5.41,5.41,5.41,5.41],["exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential"],["exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential"],[-3.7,0,0,0,0,0,0,0,-3.7,-1e3,-1e3,-3.7],["sine","sine","sine","sine","sine","sine","sine","sine","sine","sine","sine","sine"],[.46,1,1,.28,.55,.81,1,.25,.44,.24,.24,.65],[.2,.1,.1,.1,.1,.1,.1,.1,.1,5.4,5.4,.1],[1,.65,.65,.16,.16,.43,.41,.43,.29,0,0,.29],[-68.5,-70,-70,-70,-54.5,-70,-70,-70,-70,-70,-70,-70],[-37.3,-22.5,-40,-8.6,-12.2,-12,-10.1,-22.3,-13.6,-7.2,-7.2,-11.3],[-60.4,-10.6,-1.5,-9.9,-70,-32.3,-34.8,-14.8,-22.7,-5.7,-5.7,-70],[250,50,50,50,50,50,50,50,250,250,250,250],[2500,18e3,18e3,18e3,18e3,18e3,18e3,18e3,2500,2500,2500,2500],[.53,.72,.72,.52,.72,.87,.87,.87,.78,1,1,0],[1,1,1,1,1,.74,.74,.74,.83,.83,.83,1],[3,4,3,4,3,3,4,4,4,4,4,1],[.1,.1,.1,.1,.1,.1,.1,.1,.1,.1,.1,.1],[.1,.1,.1,.1,.1,.1,.1,.1,.1,.1,.1,.1],["8m","6m","4m","8m","8m","6m","6m","5m","5m","5m","5m","1m"],[1,1,1,1,1,.6,.9,1,.8,.9,.6,1],["4n","8n","16n","16n","16n","16n","4n","16n","16n","8n","8n","16n"],["2n","1n","8n","1n","8n","4n","2n","4n","1n","2n","2n","16n"],[4,3,1,1,1,3,1,6,6,3,3,1],[7,8,5,8,8,8,5,8,8,5,5,3],[2,2,2,2,2,2,2,2,2,2,2,2],[-16.9,-30.4,-13.7,-22.8,-6.6,-9.8,-13.8,-6.9,-27.1,-22.2,-1e3,-10.4],["sine","sine4","sine4","sine2","sine4","sine2","square2","sine","sine","fatsine2","fatsine2","sine"],[1.8225,3.70386,1.94672,1.01306,.43904,1.18638,1.8225,.54,.0675,.24334,1.70368,.41458],[5.4675,1,5.4675,1,9.9825,1,.06,1,1.31712,1.31712,.2025,.55566],[.59,.4,.64,.4,.72,.4,.86,.78,.29,.57,.62,.49],[25.3125,17.24976,35.56224,21.47466,9.9825,15.00282,28.47312,.73002,21.47466,24.31344,24.31344,17.24976],["exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential"],["exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential"],[5281,362,362,362,341,362,3587,1748,4035,5399,5399,1594],[0,.4,.4,.4,.4,.4,.4,.4,.4,.4,.4,.4],[1.09744,1.09744,1.09744,.001,1.01306,2.81216,2.81216,.02662,1.09744,.3125,.3125,1.09744],[.8,.8,.8,.8,.8,.8,.8,.8,.8,.8,.8,23.34102],[.83,0,0,0,0,0,0,0,0,0,0,0],[24.31344,0,0,0,0,9.9825,9.9825,9.9825,0,0,0,0],["exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential"],["exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential"],[1.9,1.1,1.1,1.1,1.1,1.8,1.8,1.8,1.1,1.1,1.1,1.1],["sine","sine","sine","sine","sine","sine","sine","sine","sine","sine","sine","sine"],[.2,.61,.92,.99,.14,.53,.38,.24,.27,.27,0,0],[1,.1,.1,.1,.1,.1,.1,.1,1,1,1,1],[1,.61,.71,.71,.07,.5,.5,.5,.5,.5,0,0],[-70,-70,-70,-70,-70,-70,-70,-70,-70,-70,-70,-2.2],[-20.8,-11.3,-36.1,-25.9,-35,-33.9,-19.7,-34.5,-16.6,-20.3,-2.6,-.9],[-37.3,0,0,-47.3,0,-10.6,-17,-55.6,0,0,0,0],[250,250,250,250,250,250,250,250,250,250,250,250],[2500,2500,2500,2500,2500,2500,2500,2500,2500,2500,2500,2500],[.11,.31,.48,0,.37,0,0,.33,.18,1,1,1],[.91,1,1,1,.9,.91,.41,.78,1,.92,.92,.38],[0,3.5,3.5,54,54,89,67,32,19,0,0,0],[0,.7,.7,0,0,.7,.7,.7,0,0,0,0],[.32,0,0,0,0,0,0,0,.32,.32,.32,.01],[37.3,1.5,1.5,1.5,1.5,1,1,1,37.3,37.3,37.3,0],[0,180,180,180,180,75,75,220,0,0,0,0],[.1,0,0,.27,.43,0,0,0,0,0,0,0],[2,2,2,2,2,2,2,2,2,2,2,2],["E2","C#3","C#3",null,"G#2",null,null,null,null,null,null,"E4"],["F#2","E4","E4","C#5","G#4","C#5","C#4","F#3","C#4","B4","B4","C#4"],["6m","2n","6m","4m","8m","8m","8m","7m","5m","5m","5m","5m"],[.9,.8,.8,.8,.8,.8,.8,.6,1,1,1,1],[-22.3,-1e3,-1e3,-29.4,-29.4,-25.8,-23.9,-22.6,-22.3,-22.3,-22.3,-22.3],[0,0,0,0,0,0,0,0,0,0,0,0],[1,.77,.87,.44,.8,.77,.77,.77,.61,.61,.61,.44],["1n","1n","1n","6m","1n","1n","3m","1n","1n","1n","1n","4m"],["sawtooth","sawtooth","sawtooth","sawtooth","sawtooth","sawtooth","sawtooth","sine","sine","sawtooth","sawtooth","sine"],[1.18638,.05488,1.37842,9.86078,9.86078,9.86078,9.86078,.71874,6.28864,6.28864,6.28864,6.28864],[1,1,1,1,1,1,1,1,1,1,1,1],[1,.79,.79,.79,.79,.79,.79,.79,1,.73,.73,.82],[5,29.58234,46.72128,29.58234,60,29.58234,29.58234,29.58234,23.34102,23.34102,23.34102,23.34102],["linear","linear","linear","linear","linear","linear","linear","linear","linear","linear","linear","linear"],["exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential"],["linear","linear","linear","linear","linear","linear","linear","linear","linear","linear","linear","linear"],[196,229,229,130,130,130,2011,130,1728,1690,1690,714],[0,.4,.4,.4,.4,.4,0,.4,0,0,0,0],[4.32,.39366,.39366,3.14928,3.14928,3.14928,3.90224,3.14928,4.32,4.32,4.32,4.32],[.8,.8,.8,.8,.8,.8,.8,.8,.8,.8,.8,.8],[0,.23,.23,.23,.23,.23,.23,.23,0,0,0,0],[0,15.00282,15.00282,15.00282,15.00282,15.00282,15.00282,15.00282,0,0,0,0],["exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential"],["exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential"],[1.1,2.5,2.5,2.5,2.5,2.5,2.5,2.5,1.1,1.1,1.1,1.1],["sine","sine","sine","sine","sine","sine","sine","sine","sine","sine","sine","sine"],[.86,.47,.47,.47,.47,.47,.47,.47,.86,.86,.86,.86],[1,8.1,8.1,8.1,8.1,8.1,8.1,8.1,1,1,1,1],[.93,.59,.59,.59,.59,.59,.59,.59,.93,.93,.93,.93],[-70,0,0,-36.9,-36.9,-36.9,-36.9,-40.1,-70,-70,-70,-70],[0,0,0,0,0,0,0,-10,0,0,0,0],[0,0,0,0,0,0,-37.5,-37.5,0,0,0,0],[250,250,250,250,250,250,250,250,250,250,250,250],[2500,2500,2500,2500,2500,2500,2500,2500,2500,2500,2500,2500],[.8,.8,.8,.34,.34,.34,.34,.34,.8,.8,.8,.8],[.6,.87,.87,.87,.87,.87,.87,.87,.6,.6,.6,.6],[3.5,3.5,3.5,3.5,3.5,3.5,3.5,3.5,3.5,3.5,3.5,3.5],[.7,.7,.7,.7,.7,.7,.7,.7,.7,.7,.7,.7],[0,0,0,0,0,0,0,0,0,0,0,0],[1.5,1.5,1.5,1.5,1.5,1.5,1.5,1.5,1.5,1.5,1.5,1.5],[180,180,180,180,180,180,180,180,180,180,180,180],[0,0,0,0,0,0,0,0,0,0,0,0],[0,0,.5,0,2.4,-11.5,-20.5,0,0,0,0,25.7],[-.56,0,-.41,-1,-1,-.88,-.67,-1,-1,-1,-1,-.57],[2,2,2,2,2,2,2,2,2,2,2,2],["G#3","G#3","G#3",null,"F#3",null,null,null,"G#3","F#4","F#4","G#3"],["E4","E4","E4","F#5","G#4","E6","F#4","C#4",null,null,null,"E4"],["3m","2n","6m","8m","6m","8m","7m","7m","8m","8m","8m","8m"],[1,1,1,1,1,1,1,.7,1,1,1,1],[-1e3,-1e3,-1e3,-20.4,-20.4,-18.7,-24.2,-13,-1e3,-1e3,-1e3,-1e3],[.2,0,0,0,0,0,0,0,0,0,0,0],[1,1,1,1,.23,1,.64,1,1,1,1,.37],["1n","2n","2n","2n","7m","6m","8m","7m","6m","10m","10m","6m"],["sawtooth","sawtooth","sawtooth","sawtooth","sawtooth","sawtooth","sawtooth","sine","sine","sine","sine","sine"],[0,0,20.3,0,0,23.1,-10.2,0,0,0,0,24.2],[.21296,.579,.579,2.81216,2.81216,2.81216,2.81216,7.78034,1.70368,1.70368,1.70368,1.70368],[1,1,1,1,1,1,1,1,1,1,1,1],[1,1,.71,1,1,1,1,1,1,1,1,1],[5,5,5,5,5,5,5,5,5,5,5,5],["linear","linear","linear","linear","linear","linear","linear","linear","linear","linear","linear","linear"],["exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential"],["linear","linear","linear","linear","linear","linear","linear","linear","linear","linear","linear","linear"],[420,420,420,420,420,269,281,281,420,420,420,420],[.4,.4,.4,.4,.4,.35,.35,.35,.4,.4,.4,.4],[.001,.001,.001,8.4375,8.4375,8.4375,8.4375,8.4375,.001,.001,.001,.001],[.8,.8,.8,.8,.8,.8,.8,.8,.8,.8,.8,.8],[0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0],["exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential"],["exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential"],[1.1,1.1,1.1,1.1,1.1,1.1,1.1,1.1,1.1,1.1,1.1,1.1],[3.5,3.5,3.5,3.5,3.5,3.5,3.5,3.5,3.5,3.5,3.5,3.5],[.7,.7,.7,.7,.7,.7,.7,.7,.7,.7,.7,.7],[0,0,0,0,0,0,0,0,0,0,0,0],[1.5,1.5,1.5,1.5,1.5,1.5,1.5,1.5,1.5,1.5,1.5,1.5],[180,180,180,180,180,180,180,180,180,180,180,180],[0,0,0,0,0,0,0,0,0,0,0,0],[.76,0,.7,.75,1,.74,.63,.65,.55,.01,.01,.22],["sine","sine","sine","sine","sine","sine","sine","sine","sine","sine","sine","sine"],[0,0,0,0,0,0,0,0,.75,.75,.75,.75],[1,1,1,1,1,1,1,1,1,1,1,1],[.5,.5,.5,.5,.5,.5,.5,.5,.5,.5,.5,.5],[-56,0,0,-49.5,-49.5,-49.5,-37.1,-51.9,-56,-56,-56,-56],[0,0,0,0,0,0,-21.1,-37.8,0,0,0,0],[0,0,0,0,0,0,-42.4,-19.3,0,0,0,0],[250,250,250,250,250,250,250,250,250,250,250,250],[2500,2500,2500,2500,2500,2500,2500,2500,2500,2500,2500,2500],[.8,.8,.8,0,0,0,.43,.7,.8,.8,.8,.8],[.6,.6,.6,.74,.74,.74,1,.47,.6,.6,.6,.6],[-9.4,-8.2,-9.3,-5.1,-3.5,-7.6,-12,-2.6,-5.7,-7.7,-17.3,-70],[0,0,0,0,0,.8,0,0,1.4,.5,.5,-18.1],[-.4,0,0,0,0,-.4,0,0,-70,-3.4,-3.4,-12.1],[139,250,458,250,194,250,50,70,135,50,50,135],[2500,2500,2500,2500,2500,2500,15561,15561,6347,9950,9950,6347],[.72,1,1,1,1,.77,1,1,1,1,1,1],[0,0,0,0,0,0,0,0,0,0,0,1],[0,.8,0,0,0,0,.8,0,.24,.24,.24,.19],[1,.6,1,.88,.91,.86,.6,.6,.03,.03,.03,1],[-1e3,-1e3,-20.6,-22.9,-24.2,-1e3,-16.4,-2.1,-9.8,-1e3,-1e3,-19.4],[-70,0,-70,-67.5,-70,-70,-70,-70,-69.5,-69.5,-69.5,-69.5],[-12.9,0,-33.9,-20.7,-15.1,-33.5,-37.6,-35.9,-19.1,-25.9,-25.9,-19.1],[-42.6,0,-32.4,-70,0,-50.9,-34.8,0,-33.2,-70,-70,-33.2],[250,250,250,250,250,250,250,250,250,250,250,250],[2500,2500,2500,2500,2500,2500,2500,2500,6456,6456,6456,6456],[3.5,3.5,0,3.5,3.5,3.5,3.5,3.5,35,35,35,35],[.7,.7,.12,.7,.7,.7,.7,.7,.7,.7,.7,.7],[0,0,0,0,0,0,0,0,0,0,0,0],[1.5,1.5,1.5,1.5,1.5,1.5,1.5,1.5,1.5,1.5,1.5,1.5],[180,180,212,180,180,180,180,180,180,180,180,180],[0,0,.31,0,0,0,0,0,0,0,0,0]],sp={scale:["E","F#","G#","B","C#"],tuning:{type:"just"},M:{fadeIn:15,envelope:{baseFrequency:.001,partials:[spl[18][si],spl[19][si],spl[20][si],spl[21][si]],phase:spl[22][si],minGain:spl[23][si],maxGain:spl[24][si]},compressor:{attack:spl[25][si],knee:spl[26][si],ratio:spl[27][si],release:spl[28][si],threshold:spl[29][si]},eq:{low:spl[30][si],mid:spl[31][si],high:spl[32][si],lowFrequency:spl[33][si],highFrequency:spl[34][si]},gain:spl[35][si]},returns:{reverb:{decay:spl[36][si],pre:spl[37][si]}},B1:{volMin:spl[38][si],volMax:spl[39][si],volLFORate:spl[40][si],difference:spl[41][si],note:spl[42][si],filterFrequency:spl[43][si],filterResonance:spl[44][si]},B2:{volMin:spl[45][si],volMax:spl[46][si],volLFORate:spl[47][si],difference:spl[48][si],filterFrequency:spl[49][si],filterResonance:spl[50][si],note:spl[51][si]},D:{polyphony:3,chord:[spl[53][si],spl[54][si],spl[55][si]],vol:spl[56][si],gainLFOMin:spl[57][si],gainLFOMax:spl[58][si],gainLFORate:spl[59][si],filterFrequency:spl[60][si],filterResonance:spl[61][si],filterRate:spl[62][si],filterDepth:spl[63][si],oscillators:[{coarse:spl[64][si],fine:spl[65][si],envelope:{attack:.946,decay:.6,sustain:spl[68][si],release:spl[69][si],decayCurve:"exponential",releaseCurve:"exponential"},vol:spl[72][si]},{coarse:spl[73][si],fine:spl[74][si],envelope:{attack:spl[75][si],decay:spl[76][si],sustain:1,release:30.2,decayCurve:"exponential",releaseCurve:"exponential"},vol:spl[81][si]},{coarse:spl[82][si],fine:spl[83][si],envelope:{attack:.946,decay:.6,sustain:1,release:5.41,decayCurve:"exponential",releaseCurve:"exponential"},vol:spl[90][si]},{coarse:spl[91][si],fine:spl[92][si],envelope:{attack:spl[93][si],decay:.6,sustain:1,release:spl[96][si],decayCurve:"exponential",releaseCurve:"exponential"},vol:spl[99][si]}],autoPan:{type:"sine",depth:spl[101][si],frequency:spl[102][si],wet:spl[103][si]},eq:{low:spl[104][si],mid:spl[105][si],high:spl[106][si],lowFrequency:spl[107][si],highFrequency:spl[108][si]},sends:{direct:spl[109][si],reverb:spl[110][si]}},S:{octave:spl[111][si],scaleDegreeShiftProbability:.1,clusterInterval:spl[114][si],clusterProbability:spl[115][si],minNoteDuration:spl[116][si],maxNoteDuration:spl[117][si],minClusterSize:spl[118][si],maxClusterSize:spl[119][si],maxScaleDegreeStep:2,vol:spl[121][si],oscillatorType:spl[122][si],amplitudeEnvelope:{attack:spl[123][si],decay:spl[124][si],sustain:spl[125][si],release:spl[126][si],decayCurve:"exponential",releaseCurve:"exponential"},filterFrequency:spl[129][si],filterResonance:spl[130][si],filterEnvelope:{attack:spl[131][si],decay:spl[132][si],sustain:spl[133][si],release:spl[134][si],decayCurve:"exponential",releaseCurve:"exponential",octaves:spl[137][si]},autoPan:{type:"sine",depth:spl[139][si],frequency:spl[140][si],wet:spl[141][si]},eq:{low:spl[142][si],mid:spl[143][si],high:spl[144][si],lowFrequency:250,highFrequency:2500},sends:{direct:spl[147][si],reverb:spl[148][si]},chorus:{delayTime:spl[149][si],depth:spl[150][si],feedback:spl[151][si],frequency:spl[152][si],spread:spl[153][si],wet:spl[154][si]}},P1:{polyphony:2,chord:[spl[156][si],spl[157][si]],repeatInterval:spl[158][si],repeatProbability:spl[159][si],vol:spl[160][si],gainLFOMin:0,gainLFOMax:spl[162][si],gainLFORate:spl[163][si],oscillatorType:spl[164][si],amplitudeEnvelope:{attack:spl[165][si],decay:1,sustain:spl[167][si],release:spl[168][si],attackCurve:"linear",decayCurve:"exponential",releaseCurve:"linear"},filterFrequency:spl[172][si],filterResonance:spl[173][si],filterEnvelope:{attack:spl[174][si],decay:.8,sustain:spl[176][si],release:spl[177][si],decayCurve:"exponential",releaseCurve:"exponential",octaves:spl[180][si]},autoPan:{type:"sine",depth:spl[182][si],frequency:spl[183][si],wet:spl[184][si]},eq:{low:spl[185][si],mid:spl[186][si],high:spl[187][si],lowFrequency:250,highFrequency:2500},sends:{direct:spl[190][si],reverb:spl[191][si]},chorus:{delayTime:3.5,depth:.7,feedback:0,frequency:1.5,spread:180,wet:0},detune:spl[198][si],pan:spl[199][si]},P2:{polyphony:2,chord:[spl[201][si],spl[202][si]],repeatInterval:spl[203][si],repeatProbability:spl[204][si],vol:spl[205][si],gainLFOMin:spl[206][si],gainLFOMax:spl[207][si],gainLFORate:spl[208][si],oscillatorType:spl[209][si],detune:spl[210][si],amplitudeEnvelope:{attack:spl[211][si],decay:1,sustain:spl[213][si],release:spl[214][si],attackCurve:"linear",decayCurve:"exponential",releaseCurve:"linear"},filterFrequency:spl[218][si],filterResonance:spl[219][si],filterEnvelope:{attack:spl[220][si],decay:.8,sustain:0,release:0,decayCurve:"exponential",releaseCurve:"exponential",octaves:1.1},chorus:{delayTime:3.5,depth:.7,feedback:0,frequency:1.5,spread:180,wet:0},pan:spl[233][si],autoPan:{type:"sine",depth:spl[235][si],frequency:1,wet:.5},eq:{low:spl[238][si],mid:spl[239][si],high:spl[240][si],lowFrequency:250,highFrequency:2500},sends:{direct:spl[243][si],reverb:spl[244][si]}},binauralEq:{low:spl[245][si],mid:spl[246][si],high:spl[247][si],lowFrequency:spl[248][si],highFrequency:spl[249][si]},binauralSends:{direct:spl[250][si],reverb:spl[251][si]},padSends:{direct:spl[252][si],reverb:spl[253][si]},padVol:spl[254][si],padEq:{low:spl[255][si],mid:spl[256][si],high:spl[257][si],lowFrequency:250,highFrequency:spl[259][si]},padChorus:{delayTime:spl[260][si],depth:spl[261][si],feedback:0,frequency:1.5,spread:spl[264][si],wet:spl[265][si]}},nf=2,p.b1=sp.B1.note?nm[sp.B1.volLFORate]:nf,p.b2=sp.B2.note&&0<sp.B2.volMax?nm[sp.B2.volLFORate]:nf,p.p1=-100<sp.padVol&&0<sp.P1.gainLFOMax?nm[sp.P1.gainLFORate]:nf,p.p1p=-100<sp.padVol&&0<sp.P1.gainLFOMax?parseFloat(sp.P1.autoPan.frequency):nf,p.p2=-100<sp.padVol&&0<sp.P2.gainLFOMax?nm[sp.P2.gainLFORate]:nf,p.p2p=-100<sp.padVol&&0<sp.P2.gainLFOMax?sp.P2.autoPan.frequency:nf,p.d=-100<sp.D.vol&&0<sp.D.gainLFOMax?nm[sp.D.gainLFORate]:nf,p.dp=-100<sp.D.vol&&0<sp.D.gainLFOMax?parseFloat(sp.D.autoPan.frequency):nf,p.df=-100<sp.D.vol&&0<sp.D.gainLFOMax?nm[sp.D.filterRate]:nf,p.s=-100<sp.S.vol?nm[sp.S.clusterInterval]:nf,p.sp=-100<sp.S.vol?parseFloat(sp.S.autoPan.frequency):nf,p.el_top="",p.el_bot="","none"!=p.e.v){mv=`*(map(w${p.uSE[0]},0.,c${p.uSE[0]},${p.el_exp.v[0]},${p.el_exp.v[1]}))`;for(let e=0;e<=4;e++)idx=e+6,r=map_r(hns[idx+1],0,1,.1,.275),cd=hns[idx],3==p.e_xy&&(1==p.e_z.v&&(p.el_top+=`c=${p.e.v}(V(uve.x,uve.y+.4),c,W(map(w${p.uSC[0]},0.,c${p.uSC[0]},${hns[idx]},${hns[idx+1]}*.8)),V(${r}${mv}),0.1,0.0025);c=${p.e.v}(V(uve.x,uve.y-.4),c,W(map(w${p.uSC[1]},0.,c${p.uSC[1]},${hns[idx+2]},${hns[idx+3]}*.8)),V(${r}${mv}),0.1,0.0025);`),0!=p.e_z.v&&1!=p.e_z.v||(p.el_bot+=`c=${p.e.v}(V(uve.x,uve.y+.4),c,W(map(w${p.uSC[0]},0.,c${p.uSC[0]},${hns[idx]},${hns[idx+1]}*.8)),V(${r}${mv}),0.2,0.0025);c=${p.e.v}(V(uve.x,uve.y-.4),c,W(map(w${p.uSC[1]},0.,c${p.uSC[1]},${hns[idx+2]},${hns[idx+3]}*.8)),V(${r}${mv}),0.2,0.0025);`)),4==p.e_xy&&(1==p.e_z.v&&(p.el_top+=`c=${p.e.v}(V(uve.x,uve.y+.4),c,W(map(w${p.uSC[0]},0.,c${p.uSC[0]},${hns[idx]},${hns[idx+1]}*.8)),V(${r}${mv}),0.1,0.0025);c=${p.e.v}(V(uve.x,uve.y-.4),c,W(map(w${p.uSC[0]},0.,c${p.uSC[0]},${hns[idx]},${hns[idx+1]}*.8)),V(${r}${mv}),0.1,0.0025);`),0!=p.e_z.v&&1!=p.e_z.v||(p.el_bot+=`c=${p.e.v}(V(uve.x,uve.y+.4),c,W(map(w${p.uSC[0]},0.,c${p.uSC[0]},${hns[idx+2]},${hns[idx+3]}*.8)),V(${r}${mv}),0.2,0.0025);c=${p.e.v}(V(uve.x,uve.y-.4),c,W(map(w${p.uSC[0]},0.,c${p.uSC[0]},${hns[idx+2]},${hns[idx+3]}*.8)),V(${r}${mv}),0.2,0.0025);`)),2==p.e_xy&&(p.el_top+=`c=${p.e.v}(V(uve.x,uve.y),c,W(map(w${p.uSC[0]},0.,c${p.uSC[0]},${hns[idx]},${hns[idx+1]}*.8)),V(${r}${mv}),0.1,0.0025);`,p.el_bot+=`c=${p.e.v}(V(uve.x,uve.y),c,W(map(w${p.uSC[0]},0.,c${p.uSC[0]},${hns[idx+4]},${hns
function hti(e){let n=[];for(let e=0;e<32;e++)n.push(tokenData.hash.slice(2+2*e,4+2*e));return n.map(e=>parseInt(e,16))}function get_seed(e){return parseInt(tokenData.hash.slice(0,16),16)}function map_v(e,n=0,a=1){return map_r(hash_ints[e],0,255,n,a)}function map_v_str(e,n=0,a=1){return map_v(e,n,a).toFixed(6).toString()}function map_r(e,n,a,t,i){return(e-n)/(a-n)*(i-t)+t}function rr(){return Math.random()}function rd(){return seed^=seed<<13,seed^=seed>>17,seed^=seed<<5,((seed<0?1+~seed:seed)%1e3/1e3).toFixed(5)}function rb(e,n){return(e+(n-e)*rd()).toFixed(5)}function rc(e){return e[Math.floor(rb(0,.99*e.length))]}function rco(e){return a=[],e.forEach((e,n)=>{for(i=0;i<e.w;i++)a.push(e)}),rc(a)}function shn(e){return e.toFixed(5)}function lerp_hex(e,n,a){var t=+e.replace("#","0x"),i=t>>16,e=t>>8&255,t=255&t,n=+n.replace("#","0x");return"#"+((1<<24)+(i+a*((n>>16)-i)<<16)+(e+a*((n>>8&255)-e)<<8)+(t+a*((255&n)-t))|0).toString(16).slice(1)}function get_obj(e,n,a=!1){let t=e.filter(({n:e})=>e==n);return a?(t=t.map(({v:e})=>e),[...t]):t[0]}function shuffle(n){for(let e=n.length-1;0<e;e--){var a=Math.floor(rd()*(e+1));[n[e],n[a]]=[n[a],n[e]]}}cv=document.querySelector("canvas"),document.body.style.backgroundColor="#111",gl=cv.getContext("webgl"),st=(new Date).getTime(),tok_id=parseInt(tokenData.tokenId.slice(-4)).toFixed(5),MEQLOW=FC=fc=0,NDO=["32n","16n","8n","4n","2n","1n"],synth_flaga=0,synth_flagb=0,synth_list=[];let seed=get_seed(tokenData.hash),hash_ints=hti(tokenData.hash),hns=hash_ints.map((e,n)=>map_v_str(n,.1,1)),hnss=hash_ints.map((e,n)=>map_v_str(n,1,10));function expandClusterScale(a,e){let t=[];for(let n=0;n<e;n++)t=[...t,...a.map(e=>e<a[0]&&"C"<=e?`${e}${n+1}`:`${e}${n}`)];return t=[...t,`${a[0]}${e}`],t}function generateCluster(n,a,e,t,i,l,p,s=null){let r=[];var o=NDO.indexOf(e),c=Math.max(o,NDO.indexOf(t));let u=Math.floor(rb(0,n.length)),F=0;var x=Math.round(rb(i,l));for(let e=0;e<x;e++){var v=NDO[Math.round(rb(o,c))];if(r.push({t:F,note:n[u],duration:Tone.getTransport().toSeconds(v)}),s&&e===x-2){let e=a.indexOf(s.replace(/\d+/,""))-a.indexOf(n[u].replace(/\d+/,""));e<-a.length/2&&(e+=a.length),e>a.length/2&&(e-=a.length),u+e>=n.length&&(e-=a.length),u+e<0&&(e+=a.length),u+=e}else{var m=Math.ceil(rr()*p);let e=Math.sign(rr()-.5);0===u&&e<0&&(e=1),u===n.length-1&&0<e&&(e=-1),u=Math.max(0,Math.min(n.length-1,u+m*e))}F+=Tone.getTransport().toSeconds(v)}return r}function shiftClusterNote(e,n){let a=n.indexOf(e);return rr()<.5&&0<a?a--:a<n.length-1&&a++,n[a]}function n2f(n,a){if("just"!==a.tuning?.type)return new Tone.Frequency(n).toFrequency();{var[,t,n]=/([^\d]+)(\d+)/.exec(n),a=a.scale.indexOf(t);let e=n-4;return t<"E"&&"C"<=t&&--e,329.628*[1,1.125,1.265625,1.5,1.6875][a]*Math.pow(2,e)}}pho=90;let ae={init:(s,e="interactive")=>{ae.SScale=expandClusterScale(s.scale,1),Tone.setContext(new Tone.Context({latencyHint:e})),Tone.getTransport().bpm.value=60,ae.M=new Tone.Gain(0).toDestination(),ae.MEQ=new Tone.EQ3(s.M.eq).connect(ae.M),ae.MEnv=new Tone.Gain(0).connect(ae.MEQ),ae.MEnvLFO=new Tone.LFO({frequency:s.M.envelope.baseFrequency,partials:s.M.envelope.partials,phase:s.M.envelope.phase,min:s.M.envelope.minGain,max:s.M.envelope.maxGain,amplitude:1}).connect(ae.MEnv.gain),ae.comp=new Tone.Compressor(s.M.compressor).connect(ae.MEnv),ae.reverb=new Tone.Reverb({decay:10,preDelay:s.returns.reverb.pre/1e3}).connect(ae.MEnv),ae.reverb.generate(),ae.BDirectOut=new Tone.Gain(s.binauralSends.direct).connect(ae.MEQ),ae.BReverbOut=new Tone.Gain(s.binauralSends.reverb).connect(ae.reverb),ae.BEQ=new Tone.EQ3(s.binauralEq).connect(ae.BDirectOut).connect(ae.BReverbOut),ae.B1Volume=new Tone.Gain(0).connect(ae.BEQ),ae.B1VolLFO=new Tone.LFO({min:s.B1.volMin,max:s.B1.volMax,frequency:s.B1.volLFORate,amplitude:1}).connect(ae.B1Volume.gain),ae.B1Filter=new Tone.Filter({frequency:s.B1.filterFrequency,Q:s.B1.filterResonance,type:"lowpass",rolloff:"-24"}).connect(ae.B1Volume);e=(new Tone.Merge).connect(ae.B1Filter);ae.B1OscLeft=new Tone.Oscillator({frequency:new Tone.Frequency(s.B1.note).toFrequency(),volume:-15,channelCount:1}).connect(e,0,0),ae.B1OscRight=new Tone.Oscillator({frequency:new Tone.Frequency(s.B1.note).toFrequency()+s.B1.difference,volume:-15,channelCount:1}).connect(e,0,1),ae.B2Volume=new Tone.Gain(0).connect(ae.BEQ),ae.B2VolLFO=new Tone.LFO({min:s.B2.volMin,max:s.B2.volMax,frequency:s.B2.volLFORate,amplitude:1}).connect(ae.B2Volume.gain),ae.B2Filter=new Tone.Filter({frequency:s.B2.filterFrequency,Q:s.B2.filterResonance,type:"lowpass",rolloff:"-24"}).connect(ae.B2Volume);e=(new Tone.Merge).connect(ae.B2Filter);ae.B2OscLeft=new Tone.Oscillator({frequency:new Tone.Frequency(s.B2.note).toFrequency(),volume:-15,channelCount:1}).connect(e,0,0),ae.B2OscRight=new Tone.Oscillator({frequency:new Tone.Frequency(s.B2.note).toFrequency()+s.B2.difference,volume:-15,channelCount:1}).connect(e,0,1),ae.DDirectOut=new Tone.Gain(s.D.sends.direct).connect(ae.comp),ae.DReverbOut=new Tone.Gain(s.D.sends.reverb).connect(ae.reverb),ae.DGain=new Tone.Gain(0).connect(ae.DReverbOut).connect(ae.DDirectOut),ae.DGainLFO=new Tone.LFO({min:s.D.gainLFOMin??1,max:s.D.gainLFOMax??1,frequency:s.D.gainLFORate,amplitude:1}).connect(ae.DGain.gain),ae.DVolume=new Tone.Volume(s.D.vol).connect(ae.DGain),ae.DEQ=new Tone.EQ3(s.D.eq).connect(ae.DVolume),ae.DAP=new Tone.AutoPanner(s.D.autoPan).connect(ae.DEQ),ae.DF=new Tone.AutoFilter({frequency:s.D.filterRate,octaves:s.D.filterDepth,baseFrequency:s.D.filterFrequency,filter:{type:"lowpass",rolloff:"-12",Q:s.D.filterResonance}}).connect(ae.DAP),ae.DSynths=Array.from({length:3},(e,p)=>s.D.oscillators.map(({coarse:e,fine:n,vol:a})=>{n=1200*Math.log2(e)+n;let t=new Tone.Oscillator({type:"sawtooth",frequency:n2f(s.D.chord[p]??"E2",s),detune:n,volume:a}).connect(ae.DF),i=!1,l;return{triggerAttack:()=>{clearTimeout(l),i||(t.start(),i=!0)},triggerRelease:()=>{i&&(i=!1,l=setTimeout(()=>{t.stop()},1e3*s.M.fadeIn))},setFrequency:e=>{e?(t.frequency.value=e,i&&t.start()):i&&t.stop()},osc:t}})),ae.SDirectOut=new Tone.Gain(s.S.sends.direct).connect(ae.comp),ae.SReverbOut=new Tone.Gain(s.S.sends.reverb).connect(ae.reverb),ae.SVolume=new Tone.Volume(s.S.vol).connect(ae.SReverbOut).connect(ae.SDirectOut),ae.SEQ=new Tone.EQ3(s.S.eq).connect(ae.SVolume),ae.SAP=new Tone.AutoPanner(s.S.autoPan).connect(ae.SEQ),ae.SChorus=new Tone.Chorus(s.S.chorus).connect(ae.SAP),ae.SF=new Tone.Filter({type:"lowpass",rolloff:s.S.filterRolloff??"-24",Q:s.S.filterResonance}).connect(ae.SChorus),ae.SFEnv=new Tone.FrequencyEnvelope({baseFrequency:s.S.filterFrequency,...s.S.filterEnvelope}).connect(ae.SF.frequency),ae.SSynth=new Tone.Synth({oscillator:{type:s.S.oscillatorType},envelope:s.S.amplitudeEnvelope}).connect(ae.SF),ae.PDirectOut=new Tone.Gain(s.padSends.direct).connect(ae.comp),ae.PReverbOut=new Tone.Gain(s.padSends.reverb).connect(ae.reverb),ae.PVolume=new Tone.Volume(s.padVol).connect(ae.PDirectOut).connect(ae.PReverbOut),ae.PEQ=new Tone.EQ3(s.padEq).connect(ae.PVolume),ae.PChorus=new Tone.Chorus(s.padChorus).connect(ae.PEQ),ae.Ps=Array.from({length:2},(e,n)=>{let a=s[`P${n+1}`],t={};return t.gain=new Tone.Gain(0).connect(ae.PChorus),t.gainLFO=new Tone.LFO({min:a.gainLFOMin??1,max:a.gainLFOMax??1,frequency:a.gainLFORate,amplitude:1}).connect(t.gain.gain),t.autoPan=new Tone.AutoPanner(a.autoPan).connect(t.gain),t.pan=new Tone.Panner(a.pan).connect(t.autoPan),t.filter=new Tone.Filter({type:"lowpass",rolloff:a.filterRolloff??"-12",Q:a.filterResonance}).connect(t.pan),t.filterEnv=new Tone.FrequencyEnvelope({baseFrequency:a.filterFrequency,...a.filterEnvelope}).connect(t.filter.frequency),t.synths=Array.from({length:a.polyphony},()=>new Tone.Synth({oscillator:{type:a.oscillatorType,detune:a.detune},envelope:a.amplitudeEnvelope}).connect(t.filter)),t})},started:!(pz={B1:[rd()*pho,rr()*pho],B2:[rd()*pho,rr()*pho],Dp:[rd()*pho,rr()*pho],Df:[rd()*pho,rr()*pho],D:[rd()*pho,rr()*pho],M:[rd()*pho,rr()*pho],P1p:[rd()*pho,rr()*pho],P1:[rd()*pho,rr()*pho],P2p:[rd()*pho,rr()*pho],P2:[rd()*pho,rr()*pho],S:[90,90],Sp:[rd()*pho,rr()*pho],Q1:[rd()*pho,rr()*pho],Q2:[rd()*pho,rr()*pho],Q4:[rd()*pho,rr()*pho],Q8:[rd()*pho,rr()*pho],Q14:[rd()*pho,rr()*pho],Q20:[rd()*pho,rr()*pho]}),start:async(t,e)=>{if(!ae.started){await Tone.start(),Tone.getTransport().start(),clearTimeout(ae.lastBinauralStopper),t.B1.note&&(ae.B1OscLeft.start(),ae.B1OscRight.start()),t.B2.note&&(ae.B2OscLeft.start(),ae.B2OscRight.start()),ae.DSynths.forEach((e,n)=>e.forEach(e=>t.D.chord[n]&&e.triggerAttack())),ae.SCluster=generateCluster(ae.SScale,t.scale,t.S.minNoteDuration,t.S.maxNoteDuration,1,t.S.maxClusterSize,2,t.B1.note),ae.SPattern=new Tone.Pattern({callback:e=>{rr()<t.S.clusterProbability&&ae._playSynth(e,t)},values:[!0],interval:t.S.clusterInterval}).start(),ae.PPatterns=ae.Ps.map((e,n)=>{let a=t[`P${n+1}`];return new Tone.Pattern({callback:e=>{rr()<a.repeatProbability&&ae._playPad(n,e,t)},values:[!0],interval:a.repeatInterval}).start()}),ae.MEnvLFO.phase=pz.M[1],ae.B1VolLFO.phase=pz.B1[1],ae.B2VolLFO.phase=pz.B2[1],ae.DAP.phase=pz.Dp[1],ae.DGainLFO.phase=pz.D[1],ae.DF.phase=pz.Df[1],ae.SAP.phase=pz.Sp[1],ae.Ps[0].autoPan._lfo.phase=pz.P1p[1],ae.Ps[0].gainLFO.phase=pz.P1[1],ae.Ps[1].autoPan._lfo.phase=pz.P2p[1],ae.Ps[1].gainLFO.phase=pz.P2[1],ae.MEnvLFO.start(),ae.B1VolLFO.start(),ae.B2VolLFO.start(),ae.DAP.start(),ae.DGainLFO.start(),ae.DF.start(),ae.SAP.start(),ae.SChorus.start();for(var n of ae.Ps)n.autoPan.start(),n.gainLFO.start();ae.PChorus.start(),ae.M.gain.setValueAtTime(0,Tone.now()),ae.M.gain.linearRampToValueAtTime(t.M.gain,Tone.now()+t.M.fadeIn),ae.SVolume.volume.setValueAtTime(-1e3,Tone.now()),ae.SVolume.volume.linearRampToValueAtTime(sp.S.vol,Tone.now()+t.M.fadeIn+7),ae.started=!0}},_playSynth:(i,l)=>{let p=[...ae.SCluster];for(let e=1;e<p.length;e++){var n,a,t;rr()<.1&&(n=Tone.getTransport().toSeconds(l.S.minNoteDuration)/2,a=p[e],t=p[e-1],rr()<.5?(p[e-1]={...t,duration:t.duration-n},p[e]={...a,t:a.t-n,duration:a.duration+n}):(p[e-1]={...t,duration:t.duration+n},p[e]={...a,t:a.t+n,duration:a.duration-n}))}synth_flaga=0,synth_flagb=0,synth_list=[];for(let t=0;t<p.length;t++){let{t:e,note:n,duration:a}=p[t];t!==p.length-1&&rr()<.1&&(n=shiftClusterNote(n,ae.SScale));var s=n2f(n,l)*Math.pow(2,l.S.octave),r=.07*rr();ae.playSynthNote(i+e+r,s,a)}},playSynthNote:(e,n,a)=>{--synth_flaga,synth_flagb+=1,synth_list.push(a),ae.SSynth.triggerAttackRelease(n,a,e),ae.SFEnv.triggerAttackRelease(a,e)},_playPad:(a,t,i)=>{var l=i[`P${a+1}`],p=Tone.getTransport().toSeconds(l.repeatInterval)/3,s=.07*rr();for(let n=0;n<l.chord.length;n++){var r=l.chord[n];let e=ae.Ps[a].synths[n];r&&e.triggerAttackRelease(n2f(r,i),p,t+s),ae.Ps[a].filterEnv.triggerAttackRelease(p,t+s)}}},pp={pal:[{w:15,n:"Awe",v:"F2F3EEF2F3EEF0EDDA7D88975269939B361CF0EDDA39609400155F9B361CE5E6D8FAE193CC948200337F394F77D6AAA5A2938D5C98B43989A93D0000C66C5656526F905B5FDC9B80F0ECDB939690F5EBD9CC94828E74894DA9CC6D492BD8D1BEF3EED9F2F3EEF2F3EE"},{w:8,n:"Elysium",v:"F2F3EEF2F3EECBC6D5BDB4BD636474F2F3EE424D389794A0F2F3EEF2F3EE9A9AB08D73777A5663F2F3EE70595D935C689D8798B7BDC8817D7F9A9FA8F2F3EEF2F3EE888789967E8759454A474B467A5663F2F3EE70595D935C68564E49F2F3EEF2F3EE848A925A687C291F007A566370595D935C6835362EF2F3EEF2F3EE"},{w:8,n:"Liquid Dusk",v:"F2F3EEF2F3EEB68662230D00B68662BF8C61C88F5AD19559D39959D69B55E8A557EFA953E3A64BE5BA5CEFD171E6C96DE8CE81EBDDACE9E7CEECE3E4E4E5E9E6E7E1F5E3BDE7BC6EBD7E1FB36F1C9953177F3B0E7F401786522A895F35F2F3EE926B40A2774CBF94699C7347784F316A4027643A246C46335D3C2B2C16092C1609F2F3EEF2F3EE6D452C8E5D35B47F49D09E61DDB67BF6DAA8D7C499E5C384BF9D5EF2F3EEF2F3EE"},{w:8,n:"Chimera",v:"F2F3EEF2F3EE064f6e064f6ef68c5040456af3a257F2F3EEF2F3EE064f6e064f6ef68c5040456af3a257F2F3EEF2F3EE"},{w:8,n:"Moonpool",v:"F2F3EEF2F3EE6E8FB09DADC65D718C6D7E987989A28099B74465845E748C72849A78859639405071788A525F720E1D3408172E485367636B7E5A7995F2F3EEF2F3EE2E486334455F1F2B4573839D1C2A44434D665F66801E28416261694D5973606F843E4A5A00000B6261696C809B4E627DF2F3EEF2F3EE"},{w:10,n:"Body Electric",v:"F2F3EEF2F3EE0000001212120000003636368484847A7A7A5C5C5C4747471313132727271313130000001717172D2D2D707070B4B4B4F2F3EEF2F3EECBCBCBC0C0C02121211A1A1AF2F3EEF2F3EE969696C9C9C98181810000000202025C5C5C454545959595CBCBCBBEBEBEC9C9C92121211A1A1A646464BCBCBCAAAAAAF2F3EEAEAEAE646464010101272727010101010101F2F3EEF2F3EE"},{w:11,n:"Holotropic",v:"F2F3EE9C5555A298A3738CA20041701E547B194B6B717E7588978BAAABAC39688D909EA2748E92113864002357194B6B625E78928E945C5953829C983A5E779C55556E15059C5555F2F3EE94A0B4A4A0AE92A0AB7E8485BEBAB9928E832E303C92A1A67061685D5B613075925E717B668385F2F3EE194B6B113864002357194B6B759299B5BBBD92A8AEF2F3EEF2F3EE"},{w:8,n:"Asteria",v:"6346525845527242468C505577566468576A471F300C01255A5A816A638D9F839BD9C8B5CEC8B27242468C5055C7B49FC7B49FBEB0A4A99B999285878A8D918C9097ADAAAF0C01259691A38C849E8A809A7242468C50558A7F9F816D8F7356759B7386471F300C0125B5837FA773707C5E5D7E605F785E5485665A99705F926551"},{w:12,n:"Meadow",v:"121B2A01002801001265899759869BD3D6DBDBD2D7DED2D4F6EDE8F9C37DF9C37D444849455C6A5D8795567D8CF2F3EEF2F3EE4A707D567C89375F6B2F545D14191F000929C9BCACB57657BB6B4AC4704BAA6D51A69A8CD9DDE0D9DDE021210009182D1F2227253C4238575C31505317292D4B666F5B7C833C4A4D000000D69F5FD69F5FD2C7C3C6BCBAC3BDBDB6BABB4E6C765A737A000000181B2014151A"},{w:4,n:"Halcyon",v:"9A95A0756485B6A5C89B85A2835061C58FADBC849E883E3FBD636ECF707D7039468C495CB9627D683D4D3F2D397F43645E37502528304A354F3A2D3E1E231D2425252225232224232123222123222123222123221C211E2E272D42303D26262D482F377B40484C3037442F35A9554E9C4E474E282BB26A53CE7C5D8843319A605BC48A8CA06B6A714A4FA88DB1A38AAE594662B1A9B4"}],song:[{w:10,n:"Harmonic Transmission",v:1},{w:10,n:"Emanating Dreamscape",v:2},{w:10,n:"Oceanic Expanse",v:3},{w:10,n:"The Deep Now",v:4},{w:10,n:"Glimmering Horizon",v:5},{w:10,n:"Weightless River",v:6},{w:10,n:"Timeless Window",v:7},{w:10,n:"Infinite Portal",v:8},{w:10,n:"Luminous Space",v:9},{w:10,n:"Weightless Moment",v:10},{w:10,n:"Present-Time Awareness",v:11},{w:2,n:"Interbeing",v:12}],rotation:[{w:7,n:"Unperturbed",v:"0."},{w:3,n:"Angled",v:"1."},{w:1,n:"Whip Spiral",v:"3."},{w:2,n:"Eternal Spiral",v:"4."}],blur:[{w:1,n:"Angled Positive",v:"10.,10."},{w:1,n:"Angled Negative",v:"-10.,10."},{w:3,n:"Vertical",v:"0.,10."},{w:2,n:"Horizontal",v:"10.,0."}],e:[{w:0,n:"Water",v:"circle"},{w:0,n:"Earth",v:"rect"},{w:0,n:"Fire",v:"diamond"},{w:0,n:"Air",v:"none"}],e_xy:[{w:0,n:"Centered",v:1},{w:0,n:"Duality",v:3},{w:0,n:"Symmetric Duality",v:4},{w:0,n:"Trinity",v:2},{w:0,n:"None",v:0}],e_z:[{w:2,n:"Below",v:0},{w:1,n:"Omnipresent",v:1}],el_exp:[{w:1,n:"Expanding",v:[.9,1.2]},{w:10,n:"Static",v:[.95,1.05]}],grid:[{w:3,n:"Transcend",v:[2,4,2,4]},{w:2,n:"Exhale",v:[2,4,10,15]},{w:2,n:"Inhale",v:[10,15,2,4]},{w:3,n:"Lattice",v:[10,15,10,15]},{w:2,n:"Passage",v:[25,30,10,15]},{w:2,n:"Universal",v:[25,30,25,30]}]},p={pal:rco(pp.pal),rotation:rco(pp.rotation),blur:rco(pp.blur),e:rco(pp.e),el_exp:rco(pp.el_exp),grid:rco(pp.grid),song:rco(pp.song)};p.feel=["Immersive","Spacious","Serene","Spacious","Spacious","Immersive","Immersive","Spacious","Serene","Immersive","Serene","Heartbeat"][p.song.v-1],p.pal.v=p.pal.v.match(/.{6}/g).map(e=>"#"+e);let nm={"16n.":.0234375,"16n":.25/16,"8n.":.046875,"8n":.25/8,"4n.":.09375,"4n":.0625,"2n.":.1875,"2n":.125,"1n.":.375,"1n":.25,"1m":.25,"2m":.5,"3m":.75,"4m":1,"5m":1.25,"6m":1.5,"7m":1.75,"8m":2,"9m":2.25,"10m":2.5,"11m":2.75,"12m":3};if(vpl=[["Water","Water","Water","Fire","Fire","Fire","Air","Earth","Earth","Earth","Air",rc(["Earth","Fire","Water"])],[1,3,2,1,3,2,0,1,3,2,0,2],[["S"],[rc(["S","D"]),rc(["S","D"])],["S"],["S"],["S","S"],["S"],["S"],["S"],[rc(["B1","B2"]),rc(["B1","B2"])],["S"],["B1"],["Sp"]],[["D"],[rc(["S","D"]),rc(["S","D"])],["D"],["S"],[rc(["S","B2"]),rc(["S","B2"])],["S"],["S"],["S"],[rc(["D","B2"]),rc(["D","B1"])],["S"],["B1"],["Sp"]],["D","D","B1","B2","P2","B1","S","B2","D","B2",rc(["B1","B2"]),"D"],[["B1","B2","D","Df","S","Sp","2","1"],["B1","B2","D","Df","S","2","1"],["B1","B2","S","P2p","D","Df","2","1"],["B1","B1","P1","P2p","D","Df","S","2","1"],["B1","B2","P2","P2p","S","S","2","1"],["B1","B2","D","Df","S","2","1"],["B1","B2","D","Df","P1","P2","P2p","S","2","1"],["B1","B2","P2","P2p","S","2","1"],["B1","B2","D","Df","S","Sp","2","1"],["B1","B2","D","Df","S","S","2","1"],["B1","B2","4","2","1"],["B1","B2","P1","P2","D","Df"]],["14","14","14","14","14","14","14","14","14","14","14","14"],["D","D","D","D","S","D",rc(["B1","D"]),"P2","D","B1",rc(["B1","B2"]),"B1"],[rc(["B1","D"]),rc(["B1","Df"]),"D","D",rc(["B2","P1p"]),"B2","S","S","B2","B2",rc(["B1","B2"]),"B2"]],si=p.song.v-1,p.e=get_obj(pp.e,vpl[0][si]),p.e_xy=vpl[1][si],p.e_z=rc([0,1]),p.uSC=vpl[2][si],p.uSE=vpl[3][si],p.uGC=vpl[4][si],p.gw=vpl[5][si],p.uFC=vpl[6][si],p.uSpiral=vpl[7][si],p.uGP=vpl[8][si],"none"==p.e.v?p.e_z={w:0,n:"None",v:0}:(p.e_z=rco(pp.e_z),p.el_exp=rco(pp.el_exp)),spl=[[60,60,60,60,60,60,60,60,60,60,60,60],["E","E","E","E","E","E","E","E","E","E","E","E"],["F#","F#","F#","F#","F#","F#","F#","F#","F#","F#","F#","F#"],["G#","G#","G#","G#","G#","G#","G#","G#","G#","G#","G#","G#"],["B","B","B","B","B","B","B","B","B","B","B","B"],["C#","C#","C#","C#","C#","C#","C#","C#","C#","C#","C#","C#"],["just","just","just","just","just","just","just","just","just","just","just","just"],[1,1,1,1,1,1,1,1,1,1,1,1],[1.125,1.125,1.125,1.125,1.125,1.125,1.125,1.125,1.125,1.125,1.125,1.125],[1.265625,1.265625,1.265625,1.265625,1.265625,1.265625,1.265625,1.265625,1.265625,1.265625,1.265625,1.265625],[1.5,1.5,1.5,1.5,1.5,1.5,1.5,1.5,1.5,1.5,1.5,1.5],[1.6875,1.6875,1.6875,1.6875,1.6875,1.6875,1.6875,1.6875,1.6875,1.6875,1.6875,1.6875],["E","E","E","E","E","E","E","E","E","E","E","E"],[4,4,4,4,4,4,4,4,4,4,4,4],[329.628,329.628,329.628,329.628,329.628,329.628,329.628,329.628,329.628,329.628,329.628,329.628],[.07,.07,.07,.07,.07,.07,.07,.07,.07,.07,.07,.07],[15,15,15,15,15,15,15,15,15,15,15,15],[.001,.001,.001,.001,.001,.001,.001,.001,.001,.001,.001,.001],[.55,.75,.75,.75,.75,.75,.75,.75,0,0,0,.59],[.79,.71,.71,.71,.71,.71,.71,.71,1,1,1,.5],[.04,.88,.88,.88,.88,.88,.88,.86,.73,.73,.73,.47],[.52,.52,.52,.52,.52,.52,.52,.48,.52,.52,.52,.43],[122,188,188,188,188,188,188,207,122,122,122,28],[1,1,1,1,1,1,.39,1,0,0,0,1],[1,1,1,1,1,1,1,1,1,1,1,1],[.003,.003,.003,.021,.003,.027,.003,.003,.003,.042,.042,.024],[0,16.5,28.3,18.1,7.1,24.8,30,15.7,30,7.4,7.4,0],[14,20,2.4,1,19.8,5.2,20,20,14.4,20,20,1],[.08,.07,.06,.08,.06,.07,.25,.25,.25,.21,.42,.25],[-32.5,-10.3,-11.5,0,-.6,-20.8,-33.1,-16.2,-44.3,0,-27.1,0],[-11,-3,-4,-7.8,-4.6,-3.1,-8.8,-2,-3.5,-4.7,-3.7,-8.9],[0,0,0,0,0,0,0,.4,0,0,0,0],[.8,0,0,0,0,0,0,0,0,0,0,0],[71,250,76,250,192,250,250,250,194,133,133,194],[17073,2500,2500,869,2500,2500,2500,2500,17073,17073,17073,17073],[9.5,8.23,8.14,10,5.74,8.1,6.09,5.57,7.6,7.02,5.83,7.28],[10,10,10,10,10,10,10,10,10,10,10,10],[2.5,54.7,54.7,54.7,54.7,54.7,54.7,54.7,2.5,2.5,2.5,2.5],[.22,.28,.46,.13,.16,.03,.13,.09,.12,.06,.01,0],[1,1,1,1,1,1,.83,1,1,.65,.64,.19],["2m","2m","8m","6m","5m","4m","8m","4m","5m","8m","8m","8m"],[1,4,4,1,1,1,1,1,1,1,1,14],["G#1","G#1","G#1","C#2","C#2","E1","B1","F#1","F#1","G#1","F#1","F#2"],[2e3,2e3,2e3,2e3,2e3,2e3,2e3,2e3,2e3,962,962,2e3],[1,5.9,5.9,5.9,5.9,0,5.9,5.9,1,1,1,1],[.16,.19,0,.21,.03,0,0,0,0,.04,.04,0],[.81,1,.51,1,.73,1,.72,.38,.22,.17,.35,.33],["6m","6m","12m","12m","8m","7m","12m","6m","8m","6m","6m","8m"],[14,1,1,4,1,14,4,1,8,8,8,14],[2e3,226,226,1649,1972,1649,394,1649,367,1834,1834,1264],[1,0,0,0,0,0,0,0,1,1,1,1],["F#2","E3","B2","E3","G#2","E2","C#3","B2","E3","C#2","E2","C#3"],[3,3,3,3,3,3,3,3,3,3,3,3],["B1","B1","B1","C#2","C#2","F#1","F#1","F#1","F#1",null,null,"E1"],["E2",null,null,null,null,"F#2","C#3","C#3","E2","G#2","G#2","C#2"],["E3",null,null,null,null,"F#3",null,null,null,null,null,null],[-12.7,-9.4,-11.9,-24.8,-1e3,-28.8,-22.1,-1e3,-27.6,-30.2,-1e3,-23.3],[0,0,0,0,0,.19,0,0,0,0,0,0],[.88,.8,.8,.54,1,1,1,1,1,1,1,.78],["9m","6m","12m","10m","10m","7m","5m","5m","7m","7m","7m","12m"],[93,83,83,49,72,80,22,24,121,661,661,88],[0,0,0,0,0,0,0,0,1,1,1,1],["5m","7m","7m","9m","8m","5m","6m","7m","4m","4m","4m","9m"],[.69,.43,.43,1.71,0,1.26,2.36,2.94,0,0,0,.04],[.5,1,1,.5,1,1,.5,.5,1,4,4,.5],[1200,1200,1200,1200,1200,1200,1200,1200,1200,0,0,922],[.946,.946,.946,.946,.946,.946,.946,.946,.946,.946,.946,.946],[.6,.6,.6,.6,.6,.6,.6,.6,.6,.6,.6,.6],[1,1,1,1,1,1,.33,.33,1,1,1,1],[42.5,42.5,42.5,42.5,42.5,42.5,20.58,20.58,42.5,42.5,42.5,42.5],["exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential"],["exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential"],[0,-1.3,-1.3,-1.3,-1.3,-1.3,-1.3,-1.3,0,-7.6,-7.6,0],[1,1,1,1,1,1,2,2,1,1,1,2],[700,700,700,700,700,700,700,700,700,700,700,297],[20,.946,.946,.946,.946,.946,.946,.946,20,20,20,20],[.03072,.6,.6,.6,.6,.6,.6,.6,.03072,.03072,.03072,.03072],[1,1,1,1,1,1,1,1,1,1,1,1],[30.2,30.2,30.2,30.2,30.2,30.2,30.2,30.2,30.2,30.2,30.2,30.2],["exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential"],["exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential"],[-13.1,-1,-1,-1,-1,-1,-1,-1,-13.1,-13.1,-13.1,-13.1],[3,2,2,1,2,2,.5,.5,.5,.5,.5,.5],[1200,1200,1200,1200,1200,1200,1200,1200,1200,642,642,1200],[.946,.946,.946,.946,.946,.946,.946,.946,.946,.946,.946,.946],[.6,.6,.6,.6,.6,.6,.6,.6,.6,.6,.6,.6],[1,1,1,1,1,1,1,1,1,1,1,1],[5.41,5.41,5.41,5.41,5.41,5.41,5.41,5.41,5.41,5.41,5.41,5.41],["exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential"],["exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential"],[0,-4.1,-4.1,-4.1,-4.1,-4.1,-4.1,-4.1,0,-1e3,-1e3,0],[.5,1,1,1,1,1,3,3,.5,.5,.5,.5],[1186,0,0,0,0,0,0,0,1186,1186,1186,1186],[.946,2.97754,2.97754,2.97754,2.97754,2.97754,2.97754,2.97754,.946,.946,.946,.946],[.6,.6,.6,.6,.6,.6,.6,.6,.6,.6,.6,.6],[1,1,1,1,1,1,1,1,1,1,1,1],[5.41,5.41,5.41,5.41,5.41,5.41,13.61886,13.61886,5.41,5.41,5.41,5.41],["exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential"],["exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential"],[-3.7,0,0,0,0,0,0,0,-3.7,-1e3,-1e3,-3.7],["sine","sine","sine","sine","sine","sine","sine","sine","sine","sine","sine","sine"],[.46,1,1,.28,.55,.81,1,.25,.44,.24,.24,.65],[.2,.1,.1,.1,.1,.1,.1,.1,.1,5.4,5.4,.1],[1,.65,.65,.16,.16,.43,.41,.43,.29,0,0,.29],[-68.5,-70,-70,-70,-54.5,-70,-70,-70,-70,-70,-70,-70],[-37.3,-22.5,-40,-8.6,-12.2,-12,-10.1,-22.3,-13.6,-7.2,-7.2,-11.3],[-60.4,-10.6,-1.5,-9.9,-70,-32.3,-34.8,-14.8,-22.7,-5.7,-5.7,-70],[250,50,50,50,50,50,50,50,250,250,250,250],[2500,18e3,18e3,18e3,18e3,18e3,18e3,18e3,2500,2500,2500,2500],[.53,.72,.72,.52,.72,.87,.87,.87,.78,1,1,0],[1,1,1,1,1,.74,.74,.74,.83,.83,.83,1],[3,4,3,4,3,3,4,4,4,4,4,1],[.1,.1,.1,.1,.1,.1,.1,.1,.1,.1,.1,.1],[.1,.1,.1,.1,.1,.1,.1,.1,.1,.1,.1,.1],["8m","6m","4m","8m","8m","6m","6m","5m","5m","5m","5m","1m"],[1,1,1,1,1,.6,.9,1,.8,.9,.6,1],["4n","8n","16n","16n","16n","16n","4n","16n","16n","8n","8n","16n"],["2n","1n","8n","1n","8n","4n","2n","4n","1n","2n","2n","16n"],[4,3,1,1,1,3,1,6,6,3,3,1],[7,8,5,8,8,8,5,8,8,5,5,3],[2,2,2,2,2,2,2,2,2,2,2,2],[-16.9,-30.4,-13.7,-22.8,-6.6,-9.8,-13.8,-6.9,-27.1,-22.2,-1e3,-10.4],["sine","sine4","sine4","sine2","sine4","sine2","square2","sine","sine","fatsine2","fatsine2","sine"],[1.8225,3.70386,1.94672,1.01306,.43904,1.18638,1.8225,.54,.0675,.24334,1.70368,.41458],[5.4675,1,5.4675,1,9.9825,1,.06,1,1.31712,1.31712,.2025,.55566],[.59,.4,.64,.4,.72,.4,.86,.78,.29,.57,.62,.49],[25.3125,17.24976,35.56224,21.47466,9.9825,15.00282,28.47312,.73002,21.47466,24.31344,24.31344,17.24976],["exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential"],["exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential"],[5281,362,362,362,341,362,3587,1748,4035,5399,5399,1594],[0,.4,.4,.4,.4,.4,.4,.4,.4,.4,.4,.4],[1.09744,1.09744,1.09744,.001,1.01306,2.81216,2.81216,.02662,1.09744,.3125,.3125,1.09744],[.8,.8,.8,.8,.8,.8,.8,.8,.8,.8,.8,23.34102],[.83,0,0,0,0,0,0,0,0,0,0,0],[24.31344,0,0,0,0,9.9825,9.9825,9.9825,0,0,0,0],["exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential"],["exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential"],[1.9,1.1,1.1,1.1,1.1,1.8,1.8,1.8,1.1,1.1,1.1,1.1],["sine","sine","sine","sine","sine","sine","sine","sine","sine","sine","sine","sine"],[.2,.61,.92,.99,.14,.53,.38,.24,.27,.27,0,0],[1,.1,.1,.1,.1,.1,.1,.1,1,1,1,1],[1,.61,.71,.71,.07,.5,.5,.5,.5,.5,0,0],[-70,-70,-70,-70,-70,-70,-70,-70,-70,-70,-70,-2.2],[-20.8,-11.3,-36.1,-25.9,-35,-33.9,-19.7,-34.5,-16.6,-20.3,-2.6,-.9],[-37.3,0,0,-47.3,0,-10.6,-17,-55.6,0,0,0,0],[250,250,250,250,250,250,250,250,250,250,250,250],[2500,2500,2500,2500,2500,2500,2500,2500,2500,2500,2500,2500],[.11,.31,.48,0,.37,0,0,.33,.18,1,1,1],[.91,1,1,1,.9,.91,.41,.78,1,.92,.92,.38],[0,3.5,3.5,54,54,89,67,32,19,0,0,0],[0,.7,.7,0,0,.7,.7,.7,0,0,0,0],[.32,0,0,0,0,0,0,0,.32,.32,.32,.01],[37.3,1.5,1.5,1.5,1.5,1,1,1,37.3,37.3,37.3,0],[0,180,180,180,180,75,75,220,0,0,0,0],[.1,0,0,.27,.43,0,0,0,0,0,0,0],[2,2,2,2,2,2,2,2,2,2,2,2],["E2","C#3","C#3",null,"G#2",null,null,null,null,null,null,"E4"],["F#2","E4","E4","C#5","G#4","C#5","C#4","F#3","C#4","B4","B4","C#4"],["6m","2n","6m","4m","8m","8m","8m","7m","5m","5m","5m","5m"],[.9,.8,.8,.8,.8,.8,.8,.6,1,1,1,1],[-22.3,-1e3,-1e3,-29.4,-29.4,-25.8,-23.9,-22.6,-22.3,-22.3,-22.3,-22.3],[0,0,0,0,0,0,0,0,0,0,0,0],[1,.77,.87,.44,.8,.77,.77,.77,.61,.61,.61,.44],["1n","1n","1n","6m","1n","1n","3m","1n","1n","1n","1n","4m"],["sawtooth","sawtooth","sawtooth","sawtooth","sawtooth","sawtooth","sawtooth","sine","sine","sawtooth","sawtooth","sine"],[1.18638,.05488,1.37842,9.86078,9.86078,9.86078,9.86078,.71874,6.28864,6.28864,6.28864,6.28864],[1,1,1,1,1,1,1,1,1,1,1,1],[1,.79,.79,.79,.79,.79,.79,.79,1,.73,.73,.82],[5,29.58234,46.72128,29.58234,60,29.58234,29.58234,29.58234,23.34102,23.34102,23.34102,23.34102],["linear","linear","linear","linear","linear","linear","linear","linear","linear","linear","linear","linear"],["exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential"],["linear","linear","linear","linear","linear","linear","linear","linear","linear","linear","linear","linear"],[196,229,229,130,130,130,2011,130,1728,1690,1690,714],[0,.4,.4,.4,.4,.4,0,.4,0,0,0,0],[4.32,.39366,.39366,3.14928,3.14928,3.14928,3.90224,3.14928,4.32,4.32,4.32,4.32],[.8,.8,.8,.8,.8,.8,.8,.8,.8,.8,.8,.8],[0,.23,.23,.23,.23,.23,.23,.23,0,0,0,0],[0,15.00282,15.00282,15.00282,15.00282,15.00282,15.00282,15.00282,0,0,0,0],["exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential"],["exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential"],[1.1,2.5,2.5,2.5,2.5,2.5,2.5,2.5,1.1,1.1,1.1,1.1],["sine","sine","sine","sine","sine","sine","sine","sine","sine","sine","sine","sine"],[.86,.47,.47,.47,.47,.47,.47,.47,.86,.86,.86,.86],[1,8.1,8.1,8.1,8.1,8.1,8.1,8.1,1,1,1,1],[.93,.59,.59,.59,.59,.59,.59,.59,.93,.93,.93,.93],[-70,0,0,-36.9,-36.9,-36.9,-36.9,-40.1,-70,-70,-70,-70],[0,0,0,0,0,0,0,-10,0,0,0,0],[0,0,0,0,0,0,-37.5,-37.5,0,0,0,0],[250,250,250,250,250,250,250,250,250,250,250,250],[2500,2500,2500,2500,2500,2500,2500,2500,2500,2500,2500,2500],[.8,.8,.8,.34,.34,.34,.34,.34,.8,.8,.8,.8],[.6,.87,.87,.87,.87,.87,.87,.87,.6,.6,.6,.6],[3.5,3.5,3.5,3.5,3.5,3.5,3.5,3.5,3.5,3.5,3.5,3.5],[.7,.7,.7,.7,.7,.7,.7,.7,.7,.7,.7,.7],[0,0,0,0,0,0,0,0,0,0,0,0],[1.5,1.5,1.5,1.5,1.5,1.5,1.5,1.5,1.5,1.5,1.5,1.5],[180,180,180,180,180,180,180,180,180,180,180,180],[0,0,0,0,0,0,0,0,0,0,0,0],[0,0,.5,0,2.4,-11.5,-20.5,0,0,0,0,25.7],[-.56,0,-.41,-1,-1,-.88,-.67,-1,-1,-1,-1,-.57],[2,2,2,2,2,2,2,2,2,2,2,2],["G#3","G#3","G#3",null,"F#3",null,null,null,"G#3","F#4","F#4","G#3"],["E4","E4","E4","F#5","G#4","E6","F#4","C#4",null,null,null,"E4"],["3m","2n","6m","8m","6m","8m","7m","7m","8m","8m","8m","8m"],[1,1,1,1,1,1,1,.7,1,1,1,1],[-1e3,-1e3,-1e3,-20.4,-20.4,-18.7,-24.2,-13,-1e3,-1e3,-1e3,-1e3],[.2,0,0,0,0,0,0,0,0,0,0,0],[1,1,1,1,.23,1,.64,1,1,1,1,.37],["1n","2n","2n","2n","7m","6m","8m","7m","6m","10m","10m","6m"],["sawtooth","sawtooth","sawtooth","sawtooth","sawtooth","sawtooth","sawtooth","sine","sine","sine","sine","sine"],[0,0,20.3,0,0,23.1,-10.2,0,0,0,0,24.2],[.21296,.579,.579,2.81216,2.81216,2.81216,2.81216,7.78034,1.70368,1.70368,1.70368,1.70368],[1,1,1,1,1,1,1,1,1,1,1,1],[1,1,.71,1,1,1,1,1,1,1,1,1],[5,5,5,5,5,5,5,5,5,5,5,5],["linear","linear","linear","linear","linear","linear","linear","linear","linear","linear","linear","linear"],["exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential"],["linear","linear","linear","linear","linear","linear","linear","linear","linear","linear","linear","linear"],[420,420,420,420,420,269,281,281,420,420,420,420],[.4,.4,.4,.4,.4,.35,.35,.35,.4,.4,.4,.4],[.001,.001,.001,8.4375,8.4375,8.4375,8.4375,8.4375,.001,.001,.001,.001],[.8,.8,.8,.8,.8,.8,.8,.8,.8,.8,.8,.8],[0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0],["exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential"],["exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential"],[1.1,1.1,1.1,1.1,1.1,1.1,1.1,1.1,1.1,1.1,1.1,1.1],[3.5,3.5,3.5,3.5,3.5,3.5,3.5,3.5,3.5,3.5,3.5,3.5],[.7,.7,.7,.7,.7,.7,.7,.7,.7,.7,.7,.7],[0,0,0,0,0,0,0,0,0,0,0,0],[1.5,1.5,1.5,1.5,1.5,1.5,1.5,1.5,1.5,1.5,1.5,1.5],[180,180,180,180,180,180,180,180,180,180,180,180],[0,0,0,0,0,0,0,0,0,0,0,0],[.76,0,.7,.75,1,.74,.63,.65,.55,.01,.01,.22],["sine","sine","sine","sine","sine","sine","sine","sine","sine","sine","sine","sine"],[0,0,0,0,0,0,0,0,.75,.75,.75,.75],[1,1,1,1,1,1,1,1,1,1,1,1],[.5,.5,.5,.5,.5,.5,.5,.5,.5,.5,.5,.5],[-56,0,0,-49.5,-49.5,-49.5,-37.1,-51.9,-56,-56,-56,-56],[0,0,0,0,0,0,-21.1,-37.8,0,0,0,0],[0,0,0,0,0,0,-42.4,-19.3,0,0,0,0],[250,250,250,250,250,250,250,250,250,250,250,250],[2500,2500,2500,2500,2500,2500,2500,2500,2500,2500,2500,2500],[.8,.8,.8,0,0,0,.43,.7,.8,.8,.8,.8],[.6,.6,.6,.74,.74,.74,1,.47,.6,.6,.6,.6],[-9.4,-8.2,-9.3,-5.1,-3.5,-7.6,-12,-2.6,-5.7,-7.7,-17.3,-70],[0,0,0,0,0,.8,0,0,1.4,.5,.5,-18.1],[-.4,0,0,0,0,-.4,0,0,-70,-3.4,-3.4,-12.1],[139,250,458,250,194,250,50,70,135,50,50,135],[2500,2500,2500,2500,2500,2500,15561,15561,6347,9950,9950,6347],[.72,1,1,1,1,.77,1,1,1,1,1,1],[0,0,0,0,0,0,0,0,0,0,0,1],[0,.8,0,0,0,0,.8,0,.24,.24,.24,.19],[1,.6,1,.88,.91,.86,.6,.6,.03,.03,.03,1],[-1e3,-1e3,-20.6,-22.9,-24.2,-1e3,-16.4,-2.1,-9.8,-1e3,-1e3,-19.4],[-70,0,-70,-67.5,-70,-70,-70,-70,-69.5,-69.5,-69.5,-69.5],[-12.9,0,-33.9,-20.7,-15.1,-33.5,-37.6,-35.9,-19.1,-2
function hti(e){let n=[];for(let e=0;e<32;e++)n.push(tokenData.hash.slice(2+2*e,4+2*e));return n.map(e=>parseInt(e,16))}function get_seed(e){return parseInt(tokenData.hash.slice(0,16),16)}function map_v(e,n=0,a=1){return map_r(hash_ints[e],0,255,n,a)}function map_v_str(e,n=0,a=1){return map_v(e,n,a).toFixed(6).toString()}function map_r(e,n,a,t,i){return(e-n)/(a-n)*(i-t)+t}function rr(){return Math.random()}function rd(){return seed^=seed<<13,seed^=seed>>17,seed^=seed<<5,((seed<0?1+~seed:seed)%1e3/1e3).toFixed(5)}function rb(e,n){return(e+(n-e)*rd()).toFixed(5)}function rc(e){return e[Math.floor(rb(0,.99*e.length))]}function rco(e){return a=[],e.forEach((e,n)=>{for(i=0;i<e.w;i++)a.push(e)}),rc(a)}function shn(e){return e.toFixed(5)}function lerp_hex(e,n,a){var t=+e.replace("#","0x"),i=t>>16,e=t>>8&255,t=255&t,n=+n.replace("#","0x");return"#"+((1<<24)+(i+a*((n>>16)-i)<<16)+(e+a*((n>>8&255)-e)<<8)+(t+a*((255&n)-t))|0).toString(16).slice(1)}function get_obj(e,n,a=!1){let t=e.filter(({n:e})=>e==n);return a?(t=t.map(({v:e})=>e),[...t]):t[0]}function shuffle(n){for(let e=n.length-1;0<e;e--){var a=Math.floor(rd()*(e+1));[n[e],n[a]]=[n[a],n[e]]}}cv=document.querySelector("canvas"),document.body.style.backgroundColor="#111",gl=cv.getContext("webgl"),st=(new Date).getTime(),tok_id=parseInt(tokenData.tokenId.slice(-4)).toFixed(5),MEQLOW=FC=fc=0,NDO=["32n","16n","8n","4n","2n","1n"],synth_flaga=0,synth_flagb=0,synth_list=[];let seed=get_seed(tokenData.hash),hash_ints=hti(tokenData.hash),hns=hash_ints.map((e,n)=>map_v_str(n,.1,1)),hnss=hash_ints.map((e,n)=>map_v_str(n,1,10));function expandClusterScale(a,e){let t=[];for(let n=0;n<e;n++)t=[...t,...a.map(e=>e<a[0]&&"C"<=e?`${e}${n+1}`:`${e}${n}`)];return t=[...t,`${a[0]}${e}`],t}function generateCluster(n,a,e,t,i,l,p,s=null){let r=[];var o=NDO.indexOf(e),c=Math.max(o,NDO.indexOf(t));let u=Math.floor(rb(0,n.length)),F=0;var x=Math.round(rb(i,l));for(let e=0;e<x;e++){var v=NDO[Math.round(rb(o,c))];if(r.push({t:F,note:n[u],duration:Tone.getTransport().toSeconds(v)}),s&&e===x-2){let e=a.indexOf(s.replace(/\d+/,""))-a.indexOf(n[u].replace(/\d+/,""));e<-a.length/2&&(e+=a.length),e>a.length/2&&(e-=a.length),u+e>=n.length&&(e-=a.length),u+e<0&&(e+=a.length),u+=e}else{var m=Math.ceil(rr()*p);let e=Math.sign(rr()-.5);0===u&&e<0&&(e=1),u===n.length-1&&0<e&&(e=-1),u=Math.max(0,Math.min(n.length-1,u+m*e))}F+=Tone.getTransport().toSeconds(v)}return r}function shiftClusterNote(e,n){let a=n.indexOf(e);return rr()<.5&&0<a?a--:a<n.length-1&&a++,n[a]}function n2f(n,a){if("just"!==a.tuning?.type)return new Tone.Frequency(n).toFrequency();{var[,t,n]=/([^\d]+)(\d+)/.exec(n),a=a.scale.indexOf(t);let e=n-4;return t<"E"&&"C"<=t&&--e,329.628*[1,1.125,1.265625,1.5,1.6875][a]*Math.pow(2,e)}}pho=90;let ae={init:(s,e="interactive")=>{ae.SScale=expandClusterScale(s.scale,1),Tone.setContext(new Tone.Context({latencyHint:e})),Tone.getTransport().bpm.value=60,ae.M=new Tone.Gain(0).toDestination(),ae.MEQ=new Tone.EQ3(s.M.eq).connect(ae.M),ae.MEnv=new Tone.Gain(0).connect(ae.MEQ),ae.MEnvLFO=new Tone.LFO({frequency:s.M.envelope.baseFrequency,partials:s.M.envelope.partials,phase:s.M.envelope.phase,min:s.M.envelope.minGain,max:s.M.envelope.maxGain,amplitude:1}).connect(ae.MEnv.gain),ae.comp=new Tone.Compressor(s.M.compressor).connect(ae.MEnv),ae.reverb=new Tone.Reverb({decay:10,preDelay:s.returns.reverb.pre/1e3}).connect(ae.MEnv),ae.reverb.generate(),ae.BDirectOut=new Tone.Gain(s.binauralSends.direct).connect(ae.MEQ),ae.BReverbOut=new Tone.Gain(s.binauralSends.reverb).connect(ae.reverb),ae.BEQ=new Tone.EQ3(s.binauralEq).connect(ae.BDirectOut).connect(ae.BReverbOut),ae.B1Volume=new Tone.Gain(0).connect(ae.BEQ),ae.B1VolLFO=new Tone.LFO({min:s.B1.volMin,max:s.B1.volMax,frequency:s.B1.volLFORate,amplitude:1}).connect(ae.B1Volume.gain),ae.B1Filter=new Tone.Filter({frequency:s.B1.filterFrequency,Q:s.B1.filterResonance,type:"lowpass",rolloff:"-24"}).connect(ae.B1Volume);e=(new Tone.Merge).connect(ae.B1Filter);ae.B1OscLeft=new Tone.Oscillator({frequency:new Tone.Frequency(s.B1.note).toFrequency(),volume:-15,channelCount:1}).connect(e,0,0),ae.B1OscRight=new Tone.Oscillator({frequency:new Tone.Frequency(s.B1.note).toFrequency()+s.B1.difference,volume:-15,channelCount:1}).connect(e,0,1),ae.B2Volume=new Tone.Gain(0).connect(ae.BEQ),ae.B2VolLFO=new Tone.LFO({min:s.B2.volMin,max:s.B2.volMax,frequency:s.B2.volLFORate,amplitude:1}).connect(ae.B2Volume.gain),ae.B2Filter=new Tone.Filter({frequency:s.B2.filterFrequency,Q:s.B2.filterResonance,type:"lowpass",rolloff:"-24"}).connect(ae.B2Volume);e=(new Tone.Merge).connect(ae.B2Filter);ae.B2OscLeft=new Tone.Oscillator({frequency:new Tone.Frequency(s.B2.note).toFrequency(),volume:-15,channelCount:1}).connect(e,0,0),ae.B2OscRight=new Tone.Oscillator({frequency:new Tone.Frequency(s.B2.note).toFrequency()+s.B2.difference,volume:-15,channelCount:1}).connect(e,0,1),ae.DDirectOut=new Tone.Gain(s.D.sends.direct).connect(ae.comp),ae.DReverbOut=new Tone.Gain(s.D.sends.reverb).connect(ae.reverb),ae.DGain=new Tone.Gain(0).connect(ae.DReverbOut).connect(ae.DDirectOut),ae.DGainLFO=new Tone.LFO({min:s.D.gainLFOMin??1,max:s.D.gainLFOMax??1,frequency:s.D.gainLFORate,amplitude:1}).connect(ae.DGain.gain),ae.DVolume=new Tone.Volume(s.D.vol).connect(ae.DGain),ae.DEQ=new Tone.EQ3(s.D.eq).connect(ae.DVolume),ae.DAP=new Tone.AutoPanner(s.D.autoPan).connect(ae.DEQ),ae.DF=new Tone.AutoFilter({frequency:s.D.filterRate,octaves:s.D.filterDepth,baseFrequency:s.D.filterFrequency,filter:{type:"lowpass",rolloff:"-12",Q:s.D.filterResonance}}).connect(ae.DAP),ae.DSynths=Array.from({length:3},(e,p)=>s.D.oscillators.map(({coarse:e,fine:n,vol:a})=>{n=1200*Math.log2(e)+n;let t=new Tone.Oscillator({type:"sawtooth",frequency:n2f(s.D.chord[p]??"E2",s),detune:n,volume:a}).connect(ae.DF),i=!1,l;return{triggerAttack:()=>{clearTimeout(l),i||(t.start(),i=!0)},triggerRelease:()=>{i&&(i=!1,l=setTimeout(()=>{t.stop()},1e3*s.M.fadeIn))},setFrequency:e=>{e?(t.frequency.value=e,i&&t.start()):i&&t.stop()},osc:t}})),ae.SDirectOut=new Tone.Gain(s.S.sends.direct).connect(ae.comp),ae.SReverbOut=new Tone.Gain(s.S.sends.reverb).connect(ae.reverb),ae.SVolume=new Tone.Volume(s.S.vol).connect(ae.SReverbOut).connect(ae.SDirectOut),ae.SEQ=new Tone.EQ3(s.S.eq).connect(ae.SVolume),ae.SAP=new Tone.AutoPanner(s.S.autoPan).connect(ae.SEQ),ae.SChorus=new Tone.Chorus(s.S.chorus).connect(ae.SAP),ae.SF=new Tone.Filter({type:"lowpass",rolloff:s.S.filterRolloff??"-24",Q:s.S.filterResonance}).connect(ae.SChorus),ae.SFEnv=new Tone.FrequencyEnvelope({baseFrequency:s.S.filterFrequency,...s.S.filterEnvelope}).connect(ae.SF.frequency),ae.SSynth=new Tone.Synth({oscillator:{type:s.S.oscillatorType},envelope:s.S.amplitudeEnvelope}).connect(ae.SF),ae.PDirectOut=new Tone.Gain(s.padSends.direct).connect(ae.comp),ae.PReverbOut=new Tone.Gain(s.padSends.reverb).connect(ae.reverb),ae.PVolume=new Tone.Volume(s.padVol).connect(ae.PDirectOut).connect(ae.PReverbOut),ae.PEQ=new Tone.EQ3(s.padEq).connect(ae.PVolume),ae.PChorus=new Tone.Chorus(s.padChorus).connect(ae.PEQ),ae.Ps=Array.from({length:2},(e,n)=>{let a=s[`P${n+1}`],t={};return t.gain=new Tone.Gain(0).connect(ae.PChorus),t.gainLFO=new Tone.LFO({min:a.gainLFOMin??1,max:a.gainLFOMax??1,frequency:a.gainLFORate,amplitude:1}).connect(t.gain.gain),t.autoPan=new Tone.AutoPanner(a.autoPan).connect(t.gain),t.pan=new Tone.Panner(a.pan).connect(t.autoPan),t.filter=new Tone.Filter({type:"lowpass",rolloff:a.filterRolloff??"-12",Q:a.filterResonance}).connect(t.pan),t.filterEnv=new Tone.FrequencyEnvelope({baseFrequency:a.filterFrequency,...a.filterEnvelope}).connect(t.filter.frequency),t.synths=Array.from({length:a.polyphony},()=>new Tone.Synth({oscillator:{type:a.oscillatorType,detune:a.detune},envelope:a.amplitudeEnvelope}).connect(t.filter)),t})},started:!(pz={B1:[rd()*pho,rr()*pho],B2:[rd()*pho,rr()*pho],Dp:[rd()*pho,rr()*pho],Df:[rd()*pho,rr()*pho],D:[rd()*pho,rr()*pho],M:[rd()*pho,rr()*pho],P1p:[rd()*pho,rr()*pho],P1:[rd()*pho,rr()*pho],P2p:[rd()*pho,rr()*pho],P2:[rd()*pho,rr()*pho],S:[90,90],Sp:[rd()*pho,rr()*pho],Q1:[rd()*pho,rr()*pho],Q2:[rd()*pho,rr()*pho],Q4:[rd()*pho,rr()*pho],Q8:[rd()*pho,rr()*pho],Q14:[rd()*pho,rr()*pho],Q20:[rd()*pho,rr()*pho]}),start:async(t,e)=>{if(!ae.started){await Tone.start(),Tone.getTransport().start(),clearTimeout(ae.lastBinauralStopper),t.B1.note&&(ae.B1OscLeft.start(),ae.B1OscRight.start()),t.B2.note&&(ae.B2OscLeft.start(),ae.B2OscRight.start()),ae.DSynths.forEach((e,n)=>e.forEach(e=>t.D.chord[n]&&e.triggerAttack())),ae.SCluster=generateCluster(ae.SScale,t.scale,t.S.minNoteDuration,t.S.maxNoteDuration,1,t.S.maxClusterSize,2,t.B1.note),ae.SPattern=new Tone.Pattern({callback:e=>{rr()<t.S.clusterProbability&&ae._playSynth(e,t)},values:[!0],interval:t.S.clusterInterval}).start(),ae.PPatterns=ae.Ps.map((e,n)=>{let a=t[`P${n+1}`];return new Tone.Pattern({callback:e=>{rr()<a.repeatProbability&&ae._playPad(n,e,t)},values:[!0],interval:a.repeatInterval}).start()}),ae.MEnvLFO.phase=pz.M[1],ae.B1VolLFO.phase=pz.B1[1],ae.B2VolLFO.phase=pz.B2[1],ae.DAP.phase=pz.Dp[1],ae.DGainLFO.phase=pz.D[1],ae.DF.phase=pz.Df[1],ae.SAP.phase=pz.Sp[1],ae.Ps[0].autoPan._lfo.phase=pz.P1p[1],ae.Ps[0].gainLFO.phase=pz.P1[1],ae.Ps[1].autoPan._lfo.phase=pz.P2p[1],ae.Ps[1].gainLFO.phase=pz.P2[1],ae.MEnvLFO.start(),ae.B1VolLFO.start(),ae.B2VolLFO.start(),ae.DAP.start(),ae.DGainLFO.start(),ae.DF.start(),ae.SAP.start(),ae.SChorus.start();for(var n of ae.Ps)n.autoPan.start(),n.gainLFO.start();ae.PChorus.start(),ae.M.gain.setValueAtTime(0,Tone.now()),ae.M.gain.linearRampToValueAtTime(t.M.gain,Tone.now()+t.M.fadeIn),ae.SVolume.volume.setValueAtTime(-1e3,Tone.now()),ae.SVolume.volume.linearRampToValueAtTime(sp.S.vol,Tone.now()+t.M.fadeIn+7),ae.started=!0}},_playSynth:(i,l)=>{let p=[...ae.SCluster];for(let e=1;e<p.length;e++){var n,a,t;rr()<.1&&(n=Tone.getTransport().toSeconds(l.S.minNoteDuration)/2,a=p[e],t=p[e-1],rr()<.5?(p[e-1]={...t,duration:t.duration-n},p[e]={...a,t:a.t-n,duration:a.duration+n}):(p[e-1]={...t,duration:t.duration+n},p[e]={...a,t:a.t+n,duration:a.duration-n}))}synth_flaga=0,synth_flagb=0,synth_list=[];for(let t=0;t<p.length;t++){let{t:e,note:n,duration:a}=p[t];t!==p.length-1&&rr()<.1&&(n=shiftClusterNote(n,ae.SScale));var s=n2f(n,l)*Math.pow(2,l.S.octave),r=.07*rr();ae.playSynthNote(i+e+r,s,a)}},playSynthNote:(e,n,a)=>{--synth_flaga,synth_flagb+=1,synth_list.push(a),ae.SSynth.triggerAttackRelease(n,a,e),ae.SFEnv.triggerAttackRelease(a,e)},_playPad:(a,t,i)=>{var l=i[`P${a+1}`],p=Tone.getTransport().toSeconds(l.repeatInterval)/3,s=.07*rr();for(let n=0;n<l.chord.length;n++){var r=l.chord[n];let e=ae.Ps[a].synths[n];r&&e.triggerAttackRelease(n2f(r,i),p,t+s),ae.Ps[a].filterEnv.triggerAttackRelease(p,t+s)}}},pp={pal:[{w:15,n:"Awe",v:"F2F3EEF2F3EEF0EDDA7D88975269939B361CF0EDDA39609400155F9B361CE5E6D8FAE193CC948200337F394F77D6AAA5A2938D5C98B43989A93D0000C66C5656526F905B5FDC9B80F0ECDB939690F5EBD9CC94828E74894DA9CC6D492BD8D1BEF3EED9F2F3EEF2F3EE"},{w:8,n:"Elysium",v:"F2F3EEF2F3EECBC6D5BDB4BD636474F2F3EE424D389794A0F2F3EEF2F3EE9A9AB08D73777A5663F2F3EE70595D935C689D8798B7BDC8817D7F9A9FA8F2F3EEF2F3EE888789967E8759454A474B467A5663F2F3EE70595D935C68564E49F2F3EEF2F3EE848A925A687C291F007A566370595D935C6835362EF2F3EEF2F3EE"},{w:8,n:"Liquid Dusk",v:"F2F3EEF2F3EEB68662230D00B68662BF8C61C88F5AD19559D39959D69B55E8A557EFA953E3A64BE5BA5CEFD171E6C96DE8CE81EBDDACE9E7CEECE3E4E4E5E9E6E7E1F5E3BDE7BC6EBD7E1FB36F1C9953177F3B0E7F401786522A895F35F2F3EE926B40A2774CBF94699C7347784F316A4027643A246C46335D3C2B2C16092C1609F2F3EEF2F3EE6D452C8E5D35B47F49D09E61DDB67BF6DAA8D7C499E5C384BF9D5EF2F3EEF2F3EE"},{w:8,n:"Chimera",v:"F2F3EEF2F3EE064f6e064f6ef68c5040456af3a257F2F3EEF2F3EE064f6e064f6ef68c5040456af3a257F2F3EEF2F3EE"},{w:8,n:"Moonpool",v:"F2F3EEF2F3EE6E8FB09DADC65D718C6D7E987989A28099B74465845E748C72849A78859639405071788A525F720E1D3408172E485367636B7E5A7995F2F3EEF2F3EE2E486334455F1F2B4573839D1C2A44434D665F66801E28416261694D5973606F843E4A5A00000B6261696C809B4E627DF2F3EEF2F3EE"},{w:10,n:"Body Electric",v:"F2F3EEF2F3EE0000001212120000003636368484847A7A7A5C5C5C4747471313132727271313130000001717172D2D2D707070B4B4B4F2F3EEF2F3EECBCBCBC0C0C02121211A1A1AF2F3EEF2F3EE969696C9C9C98181810000000202025C5C5C454545959595CBCBCBBEBEBEC9C9C92121211A1A1A646464BCBCBCAAAAAAF2F3EEAEAEAE646464010101272727010101010101F2F3EEF2F3EE"},{w:11,n:"Holotropic",v:"F2F3EE9C5555A298A3738CA20041701E547B194B6B717E7588978BAAABAC39688D909EA2748E92113864002357194B6B625E78928E945C5953829C983A5E779C55556E15059C5555F2F3EE94A0B4A4A0AE92A0AB7E8485BEBAB9928E832E303C92A1A67061685D5B613075925E717B668385F2F3EE194B6B113864002357194B6B759299B5BBBD92A8AEF2F3EEF2F3EE"},{w:8,n:"Asteria",v:"6346525845527242468C505577566468576A471F300C01255A5A816A638D9F839BD9C8B5CEC8B27242468C5055C7B49FC7B49FBEB0A4A99B999285878A8D918C9097ADAAAF0C01259691A38C849E8A809A7242468C50558A7F9F816D8F7356759B7386471F300C0125B5837FA773707C5E5D7E605F785E5485665A99705F926551"},{w:12,n:"Meadow",v:"121B2A01002801001265899759869BD3D6DBDBD2D7DED2D4F6EDE8F9C37DF9C37D444849455C6A5D8795567D8CF2F3EEF2F3EE4A707D567C89375F6B2F545D14191F000929C9BCACB57657BB6B4AC4704BAA6D51A69A8CD9DDE0D9DDE021210009182D1F2227253C4238575C31505317292D4B666F5B7C833C4A4D000000D69F5FD69F5FD2C7C3C6BCBAC3BDBDB6BABB4E6C765A737A000000181B2014151A"},{w:4,n:"Halcyon",v:"9A95A0756485B6A5C89B85A2835061C58FADBC849E883E3FBD636ECF707D7039468C495CB9627D683D4D3F2D397F43645E37502528304A354F3A2D3E1E231D2425252225232224232123222123222123222123221C211E2E272D42303D26262D482F377B40484C3037442F35A9554E9C4E474E282BB26A53CE7C5D8843319A605BC48A8CA06B6A714A4FA88DB1A38AAE594662B1A9B4"}],song:[{w:10,n:"Harmonic Transmission",v:1},{w:10,n:"Emanating Dreamscape",v:2},{w:10,n:"Oceanic Expanse",v:3},{w:10,n:"The Deep Now",v:4},{w:10,n:"Glimmering Horizon",v:5},{w:10,n:"Weightless River",v:6},{w:10,n:"Timeless Window",v:7},{w:10,n:"Infinite Portal",v:8},{w:10,n:"Luminous Space",v:9},{w:10,n:"Weightless Moment",v:10},{w:10,n:"Present-Time Awareness",v:11},{w:2,n:"Interbeing",v:12}],rotation:[{w:7,n:"Unperturbed",v:"0."},{w:3,n:"Angled",v:"1."},{w:1,n:"Whip Spiral",v:"3."},{w:2,n:"Eternal Spiral",v:"4."}],blur:[{w:1,n:"Angled Positive",v:"10.,10."},{w:1,n:"Angled Negative",v:"-10.,10."},{w:3,n:"Vertical",v:"0.,10."},{w:2,n:"Horizontal",v:"10.,0."}],e:[{w:0,n:"Water",v:"circle"},{w:0,n:"Earth",v:"rect"},{w:0,n:"Fire",v:"diamond"},{w:0,n:"Air",v:"none"}],e_xy:[{w:0,n:"Centered",v:1},{w:0,n:"Duality",v:3},{w:0,n:"Symmetric Duality",v:4},{w:0,n:"Trinity",v:2},{w:0,n:"None",v:0}],e_z:[{w:2,n:"Below",v:0},{w:1,n:"Omnipresent",v:1}],el_exp:[{w:1,n:"Expanding",v:[.9,1.2]},{w:10,n:"Static",v:[.95,1.05]}],grid:[{w:3,n:"Transcend",v:[2,4,2,4]},{w:2,n:"Exhale",v:[2,4,10,15]},{w:2,n:"Inhale",v:[10,15,2,4]},{w:3,n:"Lattice",v:[10,15,10,15]},{w:2,n:"Passage",v:[25,30,10,15]},{w:2,n:"Universal",v:[25,30,25,30]}]},p={pal:rco(pp.pal),rotation:rco(pp.rotation),blur:rco(pp.blur),e:rco(pp.e),el_exp:rco(pp.el_exp),grid:rco(pp.grid),song:rco(pp.song)};p.feel=["Immersive","Spacious","Serene","Spacious","Spacious","Immersive","Immersive","Spacious","Serene","Immersive","Serene","Heartbeat"][p.song.v-1],p.pal.v=p.pal.v.match(/.{6}/g).map(e=>"#"+e);let nm={"16n.":.0234375,"16n":.25/16,"8n.":.046875,"8n":.25/8,"4n.":.09375,"4n":.0625,"2n.":.1875,"2n":.125,"1n.":.375,"1n":.25,"1m":.25,"2m":.5,"3m":.75,"4m":1,"5m":1.25,"6m":1.5,"7m":1.75,"8m":2,"9m":2.25,"10m":2.5,"11m":2.75,"12m":3};if(vpl=[["Water","Water","Water","Fire","Fire","Fire","Air","Earth","Earth","Earth","Air",rc(["Earth","Fire","Water"])],[1,3,2,1,3,2,0,1,3,2,0,2],[["S"],[rc(["S","D"]),rc(["S","D"])],["S"],["S"],["S","S"],["S"],["S"],["S"],[rc(["B1","B2"]),rc(["B1","B2"])],["S"],["B1"],["Sp"]],[["D"],[rc(["S","D"]),rc(["S","D"])],["D"],["S"],[rc(["S","B2"]),rc(["S","B2"])],["S"],["S"],["S"],[rc(["D","B2"]),rc(["D","B1"])],["S"],["B1"],["Sp"]],["D","D","B1","B2","P2","B1","S","B2","D","B2",rc(["B1","B2"]),"D"],[["B1","B2","D","Df","S","Sp","2","1"],["B1","B2","D","Df","S","2","1"],["B1","B2","S","P2p","D","Df","2","1"],["B1","B1","P1","P2p","D","Df","S","2","1"],["B1","B2","P2","P2p","S","S","2","1"],["B1","B2","D","Df","S","2","1"],["B1","B2","D","Df","P1","P2","P2p","S","2","1"],["B1","B2","P2","P2p","S","2","1"],["B1","B2","D","Df","S","Sp","2","1"],["B1","B2","D","Df","S","S","2","1"],["B1","B2","4","2","1"],["B1","B2","P1","P2","D","Df"]],["14","14","14","14","14","14","14","14","14","14","14","14"],["D","D","D","D","S","D",rc(["B1","D"]),"P2","D","B1",rc(["B1","B2"]),"B1"],[rc(["B1","D"]),rc(["B1","Df"]),"D","D",rc(["B2","P1p"]),"B2","S","S","B2","B2",rc(["B1","B2"]),"B2"]],si=p.song.v-1,p.e=get_obj(pp.e,vpl[0][si]),p.e_xy=vpl[1][si],p.e_z=rc([0,1]),p.uSC=vpl[2][si],p.uSE=vpl[3][si],p.uGC=vpl[4][si],p.gw=vpl[5][si],p.uFC=vpl[6][si],p.uSpiral=vpl[7][si],p.uGP=vpl[8][si],"none"==p.e.v?p.e_z={w:0,n:"None",v:0}:(p.e_z=rco(pp.e_z),p.el_exp=rco(pp.el_exp)),spl=[[60,60,60,60,60,60,60,60,60,60,60,60],["E","E","E","E","E","E","E","E","E","E","E","E"],["F#","F#","F#","F#","F#","F#","F#","F#","F#","F#","F#","F#"],["G#","G#","G#","G#","G#","G#","G#","G#","G#","G#","G#","G#"],["B","B","B","B","B","B","B","B","B","B","B","B"],["C#","C#","C#","C#","C#","C#","C#","C#","C#","C#","C#","C#"],["just","just","just","just","just","just","just","just","just","just","just","just"],[1,1,1,1,1,1,1,1,1,1,1,1],[1.125,1.125,1.125,1.125,1.125,1.125,1.125,1.125,1.125,1.125,1.125,1.125],[1.265625,1.265625,1.265625,1.265625,1.265625,1.265625,1.265625,1.265625,1.265625,1.265625,1.265625,1.265625],[1.5,1.5,1.5,1.5,1.5,1.5,1.5,1.5,1.5,1.5,1.5,1.5],[1.6875,1.6875,1.6875,1.6875,1.6875,1.6875,1.6875,1.6875,1.6875,1.6875,1.6875,1.6875],["E","E","E","E","E","E","E","E","E","E","E","E"],[4,4,4,4,4,4,4,4,4,4,4,4],[329.628,329.628,329.628,329.628,329.628,329.628,329.628,329.628,329.628,329.628,329.628,329.628],[.07,.07,.07,.07,.07,.07,.07,.07,.07,.07,.07,.07],[15,15,15,15,15,15,15,15,15,15,15,15],[.001,.001,.001,.001,.001,.001,.001,.001,.001,.001,.001,.001],[.55,.75,.75,.75,.75,.75,.75,.75,0,0,0,.59],[.79,.71,.71,.71,.71,.71,.71,.71,1,1,1,.5],[.04,.88,.88,.88,.88,.88,.88,.86,.73,.73,.73,.47],[.52,.52,.52,.52,.52,.52,.52,.48,.52,.52,.52,.43],[122,188,188,188,188,188,188,207,122,122,122,28],[1,1,1,1,1,1,.39,1,0,0,0,1],[1,1,1,1,1,1,1,1,1,1,1,1],[.003,.003,.003,.021,.003,.027,.003,.003,.003,.042,.042,.024],[0,16.5,28.3,18.1,7.1,24.8,30,15.7,30,7.4,7.4,0],[14,20,2.4,1,19.8,5.2,20,20,14.4,20,20,1],[.08,.07,.06,.08,.06,.07,.25,.25,.25,.21,.42,.25],[-32.5,-10.3,-11.5,0,-.6,-20.8,-33.1,-16.2,-44.3,0,-27.1,0],[-11,-3,-4,-7.8,-4.6,-3.1,-8.8,-2,-3.5,-4.7,-3.7,-8.9],[0,0,0,0,0,0,0,.4,0,0,0,0],[.8,0,0,0,0,0,0,0,0,0,0,0],[71,250,76,250,192,250,250,250,194,133,133,194],[17073,2500,2500,869,2500,2500,2500,2500,17073,17073,17073,17073],[9.5,8.23,8.14,10,5.74,8.1,6.09,5.57,7.6,7.02,5.83,7.28],[10,10,10,10,10,10,10,10,10,10,10,10],[2.5,54.7,54.7,54.7,54.7,54.7,54.7,54.7,2.5,2.5,2.5,2.5],[.22,.28,.46,.13,.16,.03,.13,.09,.12,.06,.01,0],[1,1,1,1,1,1,.83,1,1,.65,.64,.19],["2m","2m","8m","6m","5m","4m","8m","4m","5m","8m","8m","8m"],[1,4,4,1,1,1,1,1,1,1,1,14],["G#1","G#1","G#1","C#2","C#2","E1","B1","F#1","F#1","G#1","F#1","F#2"],[2e3,2e3,2e3,2e3,2e3,2e3,2e3,2e3,2e3,962,962,2e3],[1,5.9,5.9,5.9,5.9,0,5.9,5.9,1,1,1,1],[.16,.19,0,.21,.03,0,0,0,0,.04,.04,0],[.81,1,.51,1,.73,1,.72,.38,.22,.17,.35,.33],["6m","6m","12m","12m","8m","7m","12m","6m","8m","6m","6m","8m"],[14,1,1,4,1,14,4,1,8,8,8,14],[2e3,226,226,1649,1972,1649,394,1649,367,1834,1834,1264],[1,0,0,0,0,0,0,0,1,1,1,1],["F#2","E3","B2","E3","G#2","E2","C#3","B2","E3","C#2","E2","C#3"],[3,3,3,3,3,3,3,3,3,3,3,3],["B1","B1","B1","C#2","C#2","F#1","F#1","F#1","F#1",null,null,"E1"],["E2",null,null,null,null,"F#2","C#3","C#3","E2","G#2","G#2","C#2"],["E3",null,null,null,null,"F#3",null,null,null,null,null,null],[-12.7,-9.4,-11.9,-24.8,-1e3,-28.8,-22.1,-1e3,-27.6,-30.2,-1e3,-23.3],[0,0,0,0,0,.19,0,0,0,0,0,0],[.88,.8,.8,.54,1,1,1,1,1,1,1,.78],["9m","6m","12m","10m","10m","7m","5m","5m","7m","7m","7m","12m"],[93,83,83,49,72,80,22,24,121,661,661,88],[0,0,0,0,0,0,0,0,1,1,1,1],["5m","7m","7m","9m","8m","5m","6m","7m","4m","4m","4m","9m"],[.69,.43,.43,1.71,0,1.26,2.36,2.94,0,0,0,.04],[.5,1,1,.5,1,1,.5,.5,1,4,4,.5],[1200,1200,1200,1200,1200,1200,1200,1200,1200,0,0,922],[.946,.946,.946,.946,.946,.946,.946,.946,.946,.946,.946,.946],[.6,.6,.6,.6,.6,.6,.6,.6,.6,.6,.6,.6],[1,1,1,1,1,1,.33,.33,1,1,1,1],[42.5,42.5,42.5,42.5,42.5,42.5,20.58,20.58,42.5,42.5,42.5,42.5],["exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential"],["exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential"],[0,-1.3,-1.3,-1.3,-1.3,-1.3,-1.3,-1.3,0,-7.6,-7.6,0],[1,1,1,1,1,1,2,2,1,1,1,2],[700,700,700,700,700,700,700,700,700,700,700,297],[20,.946,.946,.946,.946,.946,.946,.946,20,20,20,20],[.03072,.6,.6,.6,.6,.6,.6,.6,.03072,.03072,.03072,.03072],[1,1,1,1,1,1,1,1,1,1,1,1],[30.2,30.2,30.2,30.2,30.2,30.2,30.2,30.2,30.2,30.2,30.2,30.2],["exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential"],["exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential"],[-13.1,-1,-1,-1,-1,-1,-1,-1,-13.1,-13.1,-13.1,-13.1],[3,2,2,1,2,2,.5,.5,.5,.5,.5,.5],[1200,1200,1200,1200,1200,1200,1200,1200,1200,642,642,1200],[.946,.946,.946,.946,.946,.946,.946,.946,.946,.946,.946,.946],[.6,.6,.6,.6,.6,.6,.6,.6,.6,.6,.6,.6],[1,1,1,1,1,1,1,1,1,1,1,1],[5.41,5.41,5.41,5.41,5.41,5.41,5.41,5.41,5.41,5.41,5.41,5.41],["exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential"],["exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential"],[0,-4.1,-4.1,-4.1,-4.1,-4.1,-4.1,-4.1,0,-1e3,-1e3,0],[.5,1,1,1,1,1,3,3,.5,.5,.5,.5],[1186,0,0,0,0,0,0,0,1186,1186,1186,1186],[.946,2.97754,2.97754,2.97754,2.97754,2.97754,2.97754,2.97754,.946,.946,.946,.946],[.6,.6,.6,.6,.6,.6,.6,.6,.6,.6,.6,.6],[1,1,1,1,1,1,1,1,1,1,1,1],[5.41,5.41,5.41,5.41,5.41,5.41,13.61886,13.61886,5.41,5.41,5.41,5.41],["exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential"],["exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential","exponential"],[-3.7,0,0,0,0,0,0,0,-3.7,-1e3,-1e3,-3.7],["sine","sine","sine","sine","sine","sine","sine","sine","sine","sine","sine","sine"],[.46,1,1,.28,.55,.81,1,.25,.44,.24,.24,.65],[.2,.1,.1,.1,.1,.1,.1,.1,.1,5.4,5.4,.1],[1,.65,.65,.16,.16,.43,.41,.43,.29,0,0,.29],[-68.5,-70,-70,-70,-54.5,-70,-70,-70,-70,-70,-70,-70],[-37.3,-22.5,-40,-8.6,-12.2,-12,-10.1,-22.3,-13.6,-7.2,-7.2,-11.3],[-60.4,-10.6,-1.5,-9.9,-70,-32.3,-34.8,-14.8,-22.7,-5.7,-5.7,-70],[250,50,50,50,50,50,50,50,250,250,250,250],[2500,18e3,18e3,18e3,18e3,18e3,18e3,18e3,2500,2500,2500,2500],[.53,.72,.72,.52,.72,.87,.87,.87,.78,1,1,0],[1,1,1,1,1,.74,.74,.74,.83,.83,.83,1],[3,4,3,4,3,3,4,4,4,4,4,1],[.1,.1,.1,.1,.1,.1,.1,.1,.1,.1,.1,.1],[.1,.1,.1,.1,.1,.1,.1,.1,.1,.1,.1,.1],["8m","6m","4m","8m","8m","6m","6m","5m","5m","5m","5m","1m"],[1,1,1,1,1,.6,.9,1,.8,.9,.6,1],["4n","8n","16n","16n","16n","16n","4n","16n","16n","8n","8n","16n"],["2n","1n","8n","1n","8n","4n","2n","4n","1n","2n","2n","16n"],[4,3,1,1,1,3,1,6,6,3,3,1],[7,8,5,8,8,8,5,8,8,5,5,3],[2,2,2,2,2,2,2,2,2,2,2,2],[-16.9,-30.4,-13.7,-22.8,-6.6,-9.8,-13.8,-6.9,-27.1,-22.2,-1e3,-10.4],["sine","sine4","sine4","sine2","sine4","sine2","square2","sine","sine","fatsine2","fatsine2","sine"],[1.8225,3.70386,1.94672,1.01306,.43904,1.18638,1.8225,.54,.0675,.24334,1
function hti(e){let n=[];for(let e=0;e<32;e++)n.push(tokenData.hash.slice(2+2*e,4+2*e));return n.map(e=>parseInt(e,16))}function get_seed(e){return parseInt(tokenData.hash.slice(0,16),16)}function map_v(e,n=0,a=1){return map_r(hash_ints[e],0,255,n,a)}function map_v_str(e,n=0,a=1){return map_v(e,n,a).toFixed(6).toString()}function map_r(e,n,a,t,i){return(e-n)/(a-n)*(i-t)+t}function rr(){return Math.random()}function rd(){return seed^=seed<<13,seed^=seed>>17,seed^=seed<<5,((seed<0?1+~seed:seed)%1e3/1e3).toFixed(5)}function rb(e,n){return(e+(n-e)*rd()).toFixed(5)}function rc(e){return e[Math.floor(rb(0,.99*e.length))]}function rco(e){return a=[],e.forEach((e,n)=>{for(i=0;i<e.w;i++)a.push(e)}),rc(a)}function shn(e){return e.toFixed(5)}function lerp_hex(e,n,a){var t=+e.replace("#","0x"),i=t>>16,e=t>>8&255,t=255&t,n=+n.replace("#","0x");return"#"+((1<<24)+(i+a*((n>>16)-i)<<16)+(e+a*((n>>8&255)-e)<<8)+(t+a*((255&n)-t))|0).toString(16).slice(1)}function get_obj(e,n,a=!1){let t=e.filter(({n:e})=>e==n);return a?(t=t.map(({v:e})=>e),[...t]):t[0]}function shuffle(n){for(let e=n.length-1;0<e;e--){var a=Math.floor(rd()*(e+1));[n[e],n[a]]=[n[a],n[e]]}}cv=document.querySelector("canvas"),document.body.style.backgroundColor="#111",gl=cv.getContext("webgl"),st=(new Date).getTime(),tok_id=parseInt(tokenData.tokenId.slice(-4)).toFixed(5),MEQLOW=FC=fc=0,NDO=["32n","16n","8n","4n","2n","1n"],synth_flaga=0,synth_flagb=0,synth_list=[];let seed=get_seed(tokenData.hash),hash_ints=hti(tokenData.hash),hns=hash_ints.map((e,n)=>map_v_str(n,.1,1)),hnss=hash_ints.map((e,n)=>map_v_str(n,1,10));function expandClusterScale(a,e){let t=[];for(let n=0;n<e;n++)t=[...t,...a.map(e=>e<a[0]&&"C"<=e?`${e}${n+1}`:`${e}${n}`)];return t=[...t,`${a[0]}${e}`],t}function generateCluster(n,a,e,t,i,l,p,s=null){let r=[];var o=NDO.indexOf(e),c=Math.max(o,NDO.indexOf(t));let u=Math.floor(rb(0,n.length)),F=0;var x=Math.round(rb(i,l));for(let e=0;e<x;e++){var v=NDO[Math.round(rb(o,c))];if(r.push({t:F,note:n[u],duration:Tone.getTransport().toSeconds(v)}),s&&e===x-2){let e=a.indexOf(s.replace(/\d+/,""))-a.indexOf(n[u].replace(/\d+/,""));e<-a.length/2&&(e+=a.length),e>a.length/2&&(e-=a.length),u+e>=n.length&&(e-=a.length),u+e<0&&(e+=a.length),u+=e}else{var m=Math.ceil(rr()*p);let e=Math.sign(rr()-.5);0===u&&e<0&&(e=1),u===n.length-1&&0<e&&(e=-1),u=Math.max(0,Math.min(n.length-1,u+m*e))}F+=Tone.getTransport().toSeconds(v)}return r}function shiftClusterNote(e,n){let a=n.indexOf(e);return rr()<.5&&0<a?a--:a<n.length-1&&a++,n[a]}function n2f(n,a){if("just"!==a.tuning?.type)return new Tone.Frequency(n).toFrequency();{var[,t,n]=/([^\d]+)(\d+)/.exec(n),a=a.scale.indexOf(t);let e=n-4;return t<"E"&&"C"<=t&&--e,329.628*[1,1.125,1.265625,1.5,1.6875][a]*Math.pow(2,e)}}pho=90;let ae={init:(s,e="interactive")=>{ae.SScale=expandClusterScale(s.scale,1),Tone.setContext(new Tone.Context({latencyHint:e})),Tone.getTransport().bpm.value=60,ae.M=new Tone.Gain(0).toDestination(),ae.MEQ=new Tone.EQ3(s.M.eq).connect(ae.M),ae.MEnv=new Tone.Gain(0).connect(ae.MEQ),ae.MEnvLFO=new Tone.LFO({frequency:s.M.envelope.baseFrequency,partials:s.M.envelope.partials,phase:s.M.envelope.phase,min:s.M.envelope.minGain,max:s.M.envelope.maxGain,amplitude:1}).connect(ae.MEnv.gain),ae.comp=new Tone.Compressor(s.M.compressor).connect(ae.MEnv),ae.reverb=new Tone.Reverb({decay:10,preDelay:s.returns.reverb.pre/1e3}).connect(ae.MEnv),ae.reverb.generate(),ae.BDirectOut=new Tone.Gain(s.binauralSends.direct).connect(ae.MEQ),ae.BReverbOut=new Tone.Gain(s.binauralSends.reverb).connect(ae.reverb),ae.BEQ=new Tone.EQ3(s.binauralEq).connect(ae.BDirectOut).connect(ae.BReverbOut),ae.B1Volume=new Tone.Gain(0).connect(ae.BEQ),ae.B1VolLFO=new Tone.LFO({min:s.B1.volMin,max:s.B1.volMax,frequency:s.B1.volLFORate,amplitude:1}).connect(ae.B1Volume.gain),ae.B1Filter=new Tone.Filter({frequency:s.B1.filterFrequency,Q:s.B1.filterResonance,type:"lowpass",rolloff:"-24"}).connect(ae.B1Volume);e=(new Tone.Merge).connect(ae.B1Filter);ae.B1OscLeft=new Tone.Oscillator({frequency:new Tone.Frequency(s.B1.note).toFrequency(),volume:-15,channelCount:1}).connect(e,0,0),ae.B1OscRight=new Tone.Oscillator({frequency:new Tone.Frequency(s.B1.note).toFrequency()+s.B1.difference,volume:-15,channelCount:1}).connect(e,0,1),ae.B2Volume=new Tone.Gain(0).connect(ae.BEQ),ae.B2VolLFO=new Tone.LFO({min:s.B2.volMin,max:s.B2.volMax,frequency:s.B2.volLFORate,amplitude:1}).connect(ae.B2Volume.gain),ae.B2Filter=new Tone.Filter({frequency:s.B2.filterFrequency,Q:s.B2.filterResonance,type:"lowpass",rolloff:"-24"}).connect(ae.B2Volume);e=(new Tone.Merge).connect(ae.B2Filter);ae.B2OscLeft=new Tone.Oscillator({frequency:new Tone.Frequency(s.B2.note).toFrequency(),volume:-15,channelCount:1}).connect(e,0,0),ae.B2OscRight=new Tone.Oscillator({frequency:new Tone.Frequency(s.B2.note).toFrequency()+s.B2.difference,volume:-15,channelCount:1}).connect(e,0,1),ae.DDirectOut=new Tone.Gain(s.D.sends.direct).connect(ae.comp),ae.DReverbOut=new Tone.Gain(s.D.sends.reverb).connect(ae.reverb),ae.DGain=new Tone.Gain(0).connect(ae.DReverbOut).connect(ae.DDirectOut),ae.DGainLFO=new Tone.LFO({min:s.D.gainLFOMin??1,max:s.D.gainLFOMax??1,frequency:s.D.gainLFORate,amplitude:1}).connect(ae.DGain.gain),ae.DVolume=new Tone.Volume(s.D.vol).connect(ae.DGain),ae.DEQ=new Tone.EQ3(s.D.eq).connect(ae.DVolume),ae.DAP=new Tone.AutoPanner(s.D.autoPan).connect(ae.DEQ),ae.DF=new Tone.AutoFilter({frequency:s.D.filterRate,octaves:s.D.filterDepth,baseFrequency:s.D.filterFrequency,filter:{type:"lowpass",rolloff:"-12",Q:s.D.filterResonance}}).connect(ae.DAP),ae.DSynths=Array.from({length:3},(e,p)=>s.D.oscillators.map(({coarse:e,fine:n,vol:a})=>{n=1200*Math.log2(e)+n;let t=new Tone.Oscillator({type:"sawtooth",frequency:n2f(s.D.chord[p]??"E2",s),detune:n,volume:a}).connect(ae.DF),i=!1,l;return{triggerAttack:()=>{clearTimeout(l),i||(t.start(),i=!0)},triggerRelease:()=>{i&&(i=!1,l=setTimeout(()=>{t.stop()},1e3*s.M.fadeIn))},setFrequency:e=>{e?(t.frequency.value=e,i&&t.start()):i&&t.stop()},osc:t}})),ae.SDirectOut=new Tone.Gain(s.S.sends.direct).connect(ae.comp),ae.SReverbOut=new Tone.Gain(s.S.sends.reverb).connect(ae.reverb),ae.SVolume=new Tone.Volume(s.S.vol).connect(ae.SReverbOut).connect(ae.SDirectOut),ae.SEQ=new Tone.EQ3(s.S.eq).connect(ae.SVolume),ae.SAP=new Tone.AutoPanner(s.S.autoPan).connect(ae.SEQ),ae.SChorus=new Tone.Chorus(s.S.chorus).connect(ae.SAP),ae.SF=new Tone.Filter({type:"lowpass",rolloff:s.S.filterRolloff??"-24",Q:s.S.filterResonance}).connect(ae.SChorus),ae.SFEnv=new Tone.FrequencyEnvelope({baseFrequency:s.S.filterFrequency,...s.S.filterEnvelope}).connect(ae.SF.frequency),ae.SSynth=new Tone.Synth({oscillator:{type:s.S.oscillatorType},envelope:s.S.amplitudeEnvelope}).connect(ae.SF),ae.PDirectOut=new Tone.Gain(s.padSends.direct).connect(ae.comp),ae.PReverbOut=new Tone.Gain(s.padSends.reverb).connect(ae.reverb),ae.PVolume=new Tone.Volume(s.padVol).connect(ae.PDirectOut).connect(ae.PReverbOut),ae.PEQ=new Tone.EQ3(s.padEq).connect(ae.PVolume),ae.PChorus=new Tone.Chorus(s.padChorus).connect(ae.PEQ),ae.Ps=Array.from({length:2},(e,n)=>{let a=s[`P${n+1}`],t={};return t.gain=new Tone.Gain(0).connect(ae.PChorus),t.gainLFO=new Tone.LFO({min:a.gainLFOMin??1,max:a.gainLFOMax??1,frequency:a.gainLFORate,amplitude:1}).connect(t.gain.gain),t.autoPan=new Tone.AutoPanner(a.autoPan).connect(t.gain),t.pan=new Tone.Panner(a.pan).connect(t.autoPan),t.filter=new Tone.Filter({type:"lowpass",rolloff:a.filterRolloff??"-12",Q:a.filterResonance}).connect(t.pan),t.filterEnv=new Tone.FrequencyEnvelope({baseFrequency:a.filterFrequency,...a.filterEnvelope}).connect(t.filter.frequency),t.synths=Array.from({length:a.polyphony},()=>new Tone.Synth({oscillator:{type:a.oscillatorType,detune:a.detune},envelope:a.amplitudeEnvelope}).connect(t.filter)),t})},started:!(pz={B1:[rd()*pho,rr()*pho],B2:[rd()*pho,rr()*pho],Dp:[rd()*pho,rr()*pho],Df:[rd()*pho,rr()*pho],D:[rd()*pho,rr()*pho],M:[rd()*pho,rr()*pho],P1p:[rd()*pho,rr()*pho],P1:[rd()*pho,rr()*pho],P2p:[rd()*pho,rr()*pho],P2:[rd()*pho,rr()*pho],S:[90,90],Sp:[rd()*pho,rr()*pho],Q1:[rd()*pho,rr()*pho],Q2:[rd()*pho,rr()*pho],Q4:[rd()*pho,rr()*pho],Q8:[rd()*pho,rr()*pho],Q14:[rd()*pho,rr()*pho],Q20:[rd()*pho,rr()*pho]}),start:async(t,e)=>{if(!ae.started){await Tone.start(),Tone.getTransport().start(),clearTimeout(ae.lastBinauralStopper),t.B1.note&&(ae.B1OscLeft.start(),ae.B1OscRight.start()),t.B2.note&&(ae.B2OscLeft.start(),ae.B2OscRight.start()),ae.DSynths.forEach((e,n)=>e.forEach(e=>t.D.chord[n]&&e.triggerAttack())),ae.SCluster=generateCluster(ae.SScale,t.scale,t.S.minNoteDuration,t.S.maxNoteDuration,1,t.S.maxClusterSize,2,t.B1.note),ae.SPattern=new Tone.Pattern({callback:e=>{rr()<t.S.clusterProbability&&ae._playSynth(e,t)},values:[!0],interval:t.S.clusterInterval}).start(),ae.PPatterns=ae.Ps.map((e,n)=>{let a=t[`P${n+1}`];return new Tone.Pattern({callback:e=>{rr()<a.repeatProbability&&ae._playPad(n,e,t)},values:[!0],interval:a.repeatInterval}).start()}),ae.MEnvLFO.phase=pz.M[1],ae.B1VolLFO.phase=pz.B1[1],ae.B2VolLFO.phase=pz.B2[1],ae.DAP.phase=pz.Dp[1],ae.DGainLFO.phase=pz.D[1],ae.DF.phase=pz.Df[1],ae.SAP.phase=pz.Sp[1],ae.Ps[0].autoPan._lfo.phase=pz.P1p[1],ae.Ps[0].gainLFO.phase=pz.P1[1],ae.Ps[1].autoPan._lfo.phase=pz.P2p[1],ae.Ps[1].gainLFO.phase=pz.P2[1],ae.MEnvLFO.start(),ae.B1VolLFO.start(),ae.B2VolLFO.start(),ae.DAP.start(),ae.DGainLFO.start(),ae.DF.start(),ae.SAP.start(),ae.SChorus.start();for(var n of ae.Ps)n.autoPan.start(),n.gainLFO.start();ae.PChorus.start(),ae.M.gain.setValueAtTime(0,Tone.now()),ae.M.gain.linearRampToValueAtTime(t.M.gain,Tone.now()+t.M.fadeIn),ae.SVolume.volume.setValueAtTime(-1e3,Tone.now()),ae.SVolume.volume.linearRampToValueAtTime(sp.S.vol,Tone.now()+t.M.fadeIn+7),ae.started=!0}},_playSynth:(i,l)=>{let p=[...ae.SCluster];for(let e=1;e<p.length;e++){var n,a,t;rr()<.1&&(n=Tone.getTransport().toSeconds(l.S.minNoteDuration)/2,a=p[e],t=p[e-1],rr()<.5?(p[e-1]={...t,duration:t.duration-n},p[e]={...a,t:a.t-n,duration:a.duration+n}):(p[e-1]={...t,duration:t.duration+n},p[e]={...a,t:a.t+n,duration:a.duration-n}))}synth_flaga=0,synth_flagb=0,synth_list=[];for(let t=0;t<p.length;t++){let{t:e,note:n,duration:a}=p[t];t!==p.length-1&&rr()<.1&&(n=shiftClusterNote(n,ae.SScale));var s=n2f(n,l)*Math.pow(2,l.S.octave),r=.07*rr();ae.playSynthNote(i+e+r,s,a)}},playSynthNote:(e,n,a)=>{--synth_flaga,synth_flagb+=1,synth_list.push(a),ae.SSynth.triggerAttackRelease(n,a,e),ae.SFEnv.triggerAttackRelease(a,e)},_playPad:(a,t,i)=>{var l=i[`P${a+1}`],p=Tone.getTransport().toSeconds(l.repeatInterval)/3,s=.07*rr();for(let n=0;n<l.chord.length;n++){var r=l.chord[n];let e=ae.Ps[a].synths[n];r&&e.triggerAttackRelease(n2f(r,i),p,t+s),ae.Ps[a].filterEnv.triggerAttackRelease(p,t+s)}}},pp={pal:[{w:15,n:"Awe",v:"F2F3EEF2F3EEF0EDDA7D88975269939B361CF0EDDA39609400155F9B361CE5E6D8FAE193CC948200337F394F77D6AAA5A2938D5C98B43989A93D0000C66C5656526F905B5FDC9B80F0ECDB939690F5EBD9CC94828E74894DA9CC6D492BD8D1BEF3EED9F2F3EEF2F3EE"},{w:8,n:"Elysium",v:"F2F3EEF2F3EECBC6D5BDB4BD636474F2F3EE424D389794A0F2F3EEF2F3EE9A9AB08D73777A5663F2F3EE70595D935C689D8798B7BDC8817D7F9A9FA8F2F3EEF2F3EE888789967E8759454A474B467A5663F2F3EE70595D935C68564E49F2F3EEF2F3EE848A925A687C291F007A566370595D935C6835362EF2F3EEF2F3EE"},{w:8,n:"Liquid Dusk",v:"F2F3EEF2F3EEB68662230D00B68662BF8C61C88F5AD19559D39959D69B55E8A557EFA953E3A64BE5BA5CEFD171E6C96DE8CE81EBDDACE9E7CEECE3E4E4E5E9E6E7E1F5E3BDE7BC6EBD7E1FB36F1C9953177F3B0E7F401786522A895F35F2F3EE926B40A2774CBF94699C7347784F316A4027643A246C46335D3C2B2C16092C1609F2F3EEF2F3EE6D452C8E5D35B47F49D09E61DDB67BF6DAA8D7C499E5C384BF9D5EF2F3EEF2F3EE"},{w:8,n:"Chimera",v:"F2F3EEF2F3EE064f6e064f6ef68c5040456af3a257F2F3EEF2F3EE064f6e064f6ef68c5040456af3a257F2F3EEF2F3EE"},{w:8,n:"Moonpool",v:"F2F3EEF2F3EE6E8FB09DADC65D718C6D7E987989A28099B74465845E748C72849A78859639405071788A525F720E1D3408172E485367636B7E5A7995F2F3EEF2F3EE2E486334455F1F2B4573839D1C2A44434D665F66801E28416261694D5973606F843E4A5A00000B6261696C809B4E627DF2F3EEF2F3EE"},{w:10,n:"Body Electric",v:"F2F3EEF2F3EE0000001212120000003636368484847A7A7A5C5C5C4747471313132727271313130000001717172D2D2D707070B4B4B4F2F3EEF2F3EECBCBCBC0C0C02121211A1A1AF2F3EEF2F3EE969696C9C9C98181810000000202025C5C5C454545959595CBCBCBBEBEBEC9C9C92121211A1A1A646464BCBCBCAAAAAAF2F3EEAEAEAE646464010101272727010101010101F2F3EEF2F3EE"},{w:11,n:"Holotropic",v:"F2F3EE9C5555A298A3738CA20041701E547B194B6B717E7588978BAAABAC39688D909EA2748E92113864002357194B6B625E78928E945C5953829C983A5E779C55556E15059C5555F2F3EE94A0B4A4A0AE92A0AB7E8485BEBAB9928E832E303C92A1A67061685D5B613075925E717B668385F2F3EE194B6B113864002357194B6B759299B5BBBD92A8AEF2F3EEF2F3EE"},{w:8,n:"Asteria",v:"6346525845527242468C505577566468576A471F300C01255A5A816A638D9F839BD9C8B5CEC8B27242468C5055C7B49FC7B49FBEB0A4A99B999285878A8D918C9097ADAAAF0C01259691A38C849E8A809A7242468C50558A7F9F816D8F7356759B7386471F300C0125B5837FA773707C5E5D7E605F785E5485665A99705F926551"},{w:12,n:"Meadow",v:"121B2A01002801001265899759869BD3D6DBDBD2D7DED2D4F6EDE8F9C37DF9C37D444849455C6A5D8795567D8CF2F3EEF2F3EE4A707D567C89375F6B2F545D14191F000929C9BCACB57657BB6B4AC4704BAA6D51A69A8CD9DDE0D9DDE021210009182D1F2227253C4238575C31505317292D4B666F5B7C833C4A4D000000D69F5FD69F5FD2C7C3C6BCBAC3BDBDB6BABB4E6C765A737A000000181B2014151A"},{w:4,n:"Halcyon",v:"9A95A0756485B6A5C89B85A2835061C58FADBC849E883E3FBD636ECF707D7039468C495CB9627D683D4D3F2D397F43645E37502528304A354F3A2D3E1E231D2425252225232224232123222123222123222123221C211E2E272D42303D26262D482F377B40484C3037442F35A9554E9C4E474E282BB26A53CE7C5D8843319A605BC48A8CA06B6A714A4FA88DB1A38AAE594662B1A9B4"}],song:[{w:10,n:"Harmonic Transmission",v:1},{w:10,n:"Emanating Dreamscape",v:2},{w:10,n:"Oceanic Expanse",v:3},{w:10,n:"The Deep Now",v:4},{w:10,n:"Glimmering Horizon",v:5},{w:10,n:"Weightless River",v:6},{w:10,n:"Timeless Window",v:7},{w:10,n:"Infinite Portal",v:8},{w:10,n:"Luminous Space",v:9},{w:10,n:"Weightless Moment",v:10},{w:10,n:"Present-Time Awareness",v:11},{w:2,n:"Interbeing",v:12}],rotation:[{w:7,n:"Unperturbed",v:"0."},{w:3,n:"Angled",v:"1."},{w:1,n:"Whip Spiral",v:"3."},{w:2,n:"Eternal Spiral",v:"4."}],blur:[{w:1,n:"Angled Positive",v:"10.,10."},{w:1,n:"Angled Negative",v:"-10.,10."},{w:3,n:"Vertical",v:"0.,10."},{w:2,n:"Horizontal",v:"10.,0."}],e:[{w:0,n:"Water",v:"circle"},{w:0,n:"Earth",v:"rect"},{w:0,n:"Fire",v:"diamond"},{w:0,n:"Air",v:"none"}],e_xy:[{w:0,n:"Centered",v:1},{w:0,n:"Duality",v:3},{w:0,n:"Symmetric Duality",v:4},{w:0,n:"Trinity",v:2},{w:0,n:"None",v:0}],e_z:[{w:2,n:"Below",v:0},{w:1,n:"Omnipresent",v:1}],el_exp:[{w:1,n:"Expanding",v:[.9,1.2]},{w:10,n:"Static",v:[.95,1.05]}],grid:[{w:3,n:"Transcend",v:[2,4,2,4]},{w:2,n:"Exhale",v:[2,4,10,15]},{w:2,n:"Inhale",v:[10,15,2,4]},{w:3,n:"Lattice",v:[10,15,10,15]},{w:2,n:"Passage",v:[25,30,10,15]},{w:2,n:"Universal",v:[25,30,25,30]}]},p={pal:rco(pp.pal),rotation:rco(pp.rotation),blur:rco(pp.blur),e:rco(pp.e),el_exp:rco(pp.el_exp),grid:rco(pp.grid),song:rco(pp.song)};p.feel=["Immersive","Spacious","Serene","Spacious","Spacious","Immersive","Immersive","Spacious","Serene","Immersive","Serene","Heartbeat"][p.song.v-1],p.pal.v=p.pal.v.match(/.{6}/g).map(e=>"#"+e);let nm={"16n.":.0234375,"16n":.25/16,"8n.":.046875,"8n":.25/8,"4n.":.09375,"4n":.0625,"2n.":.1875,"2n":.125,"1n.":.375,"1n":.25,"1m":.25,"2m":.5,"3m":.75,"4m":1,"5m":1.25,"6m":1.5,"7m":1.75,"8m":2,"9m":2.25,"10m":2.5,"11m":2.75,"12m":3};if(vpl=[["Water","Water","Water","Fire","Fire","Fire","Air","Earth","Earth","Earth","Air",rc(["Earth","Fire","Water"])],[1,3,2,1,3,2,0,1,3,2,0,2],[["S"],[rc(["S","D"]),rc(["S","D"])],["S"],["S"],["S","S"],["S"],["S"],["S"],[rc(["B1","B2"]),rc(["B1","B2"])],["S"],["B1"],["Sp"]],[["D"],[rc(["S","D"]),rc(["S","D"])],["D"],["S"],[rc(["S","B2"]),rc(["S","B2"])],["S"],["S"],["S"],[rc(["D","B2"]),rc(["D","B1"])],["S"],["B1"],["Sp"]],["D","D","B1","B2","P2","B1","S","B2","D","B2",rc(["B1","B2"]),"D"],[["B1","B2","D","Df","S","Sp","2","1"],["B1","B2","D","Df","S","2","1"],["B1","B2","S","P2p","D","Df","2","1"],["B1","B1","P1","P2p","D","Df","S","2","1"
function hti(e){let n=[];for(let e=0;e<32;e++)n.push(tokenData.hash.slice(2+2*e,4+2*e));return n.map(e=>parseInt(e,16))}function get_seed(e){return parseInt(tokenData.hash.slice(0,16),16)}function map_v(e,n=0,a=1){return map_r(hash_ints[e],0,255,n,a)}function map_v_str(e,n=0,a=1){return map_v(e,n,a).toFixed(6).toString()}function map_r(e,n,a,t,i){return(e-n)/(a-n)*(i-t)+t}function rr(){return Math.random()}function rd(){return seed^=seed<<13,seed^=seed>>17,seed^=seed<<5,((seed<0?1+~seed:seed)%1e3/1e3).toFixed(5)}function rb(e,n){return(e+(n-e)*rd()).toFixed(5)}function rc(e){return e[Math.floor(rb(0,.99*e.length))]}function rco(e){return a=[],e.forEach((e,n)=>{for(i=0;i<e.w;i++)a.push(e)}),rc(a)}function shn(e){return e.toFixed(5)}function lerp_hex(e,n,a){var t=+e.replace("#","0x"),i=t>>16,e=t>>8&255,t=255&t,n=+n.replace("#","0x");return"#"+((1<<24)+(i+a*((n>>16)-i)<<16)+(e+a*((n>>8&255)-e)<<8)+(t+a*((255&n)-t))|0).toString(16).slice(1)}function get_obj(e,n,a=!1){let t=e.filter(({n:e})=>e==n);return a?(t=t.map(({v:e})=>e),[...t]):t[0]}function shuffle(n){for(let e=n.length-1;0<e;e--){var a=Math.floor(rd()*(e+1));[n[e],n[a]]=[n[a],n[e]]}}cv=document.querySelector("canvas"),document.body.style.backgroundColor="#111",gl=cv.getContext("webgl"),st=(new Date).getTime(),tok_id=parseInt(tokenData.tokenId.slice(-4)).toFixed(5),MEQLOW=FC=fc=0,NDO=["32n","16n","8n","4n","2n","1n"],synth_flaga=0,synth_flagb=0,synth_list=[];let seed=get_seed(tokenData.hash),hash_ints=hti(tokenData.hash),hns=hash_ints.map((e,n)=>map_v_str(n,.1,1)),hnss=hash_ints.map((e,n)=>map_v_str(n,1,10));function expandClusterScale(a,e){let t=[];for(let n=0;n<e;n++)t=[...t,...a.map(e=>e<a[0]&&"C"<=e?`${e}${n+1}`:`${e}${n}`)];return t=[...t,`${a[0]}${e}`],t}function generateCluster(n,a,e,t,i,l,p,s=null){let r=[];var o=NDO.indexOf(e),c=Math.max(o,NDO.indexOf(t));let u=Math.floor(rb(0,n.length)),F=0;var x=Math.round(rb(i,l));for(let e=0;e<x;e++){var v=NDO[Math.round(rb(o,c))];if(r.push({t:F,note:n[u],duration:Tone.getTransport().toSeconds(v)}),s&&e===x-2){let e=a.indexOf(s.replace(/\d+/,""))-a.indexOf(n[u].replace(/\d+/,""));e<-a.length/2&&(e+=a.length),e>a.length/2&&(e-=a.length),u+e>=n.length&&(e-=a.length),u+e<0&&(e+=a.length),u+=e}else{var m=Math.ceil(rr()*p);let e=Math.sign(rr()-.5);0===u&&e<0&&(e=1),u===n.length-1&&0<e&&(e=-1),u=Math.max(0,Math.min(n.length-1,u+m*e))}F+=Tone.getTransport().toSeconds(v)}return r}function shiftClusterNote(e,n){let a=n.indexOf(e);return rr()<.5&&0<a?a--:a<n.length-1&&a++,n[a]}function n2f(n,a){if("just"!==a.tuning?.type)return new Tone.Frequency(n).toFrequency();{var[,t,n]=/([^\d]+)(\d+)/.exec(n),a=a.scale.indexOf(t);let e=n-4;return t<"E"&&"C"<=t&&--e,329.628*[1,1.125,1.265625,1.5,1.6875][a]*Math.pow(2,e)}}pho=90;let ae={init:(s,e="interactive")=>{ae.SScale=expandClusterScale(s.scale,1),Tone.setContext(new Tone.Context({latencyHint:e})),Tone.getTransport().bpm.value=60,ae.M=new Tone.Gain(0).toDestination(),ae.MEQ=new Tone.EQ3(s.M.eq).connect(ae.M),ae.MEnv=new Tone.Gain(0).connect(ae.MEQ),ae.MEnvLFO=new Tone.LFO({frequency:s.M.envelope.baseFrequency,partials:s.M.envelope.partials,phase:s.M.envelope.phase,min:s.M.envelope.minGain,max:s.M.envelope.maxGain,amplitude:1}).connect(ae.MEnv.gain),ae.comp=new Tone.Compressor(s.M.compressor).connect(ae.MEnv),ae.reverb=new Tone.Reverb({decay:10,preDelay:s.returns.reverb.pre/1e3}).connect(ae.MEnv),ae.reverb.generate(),ae.BDirectOut=new Tone.Gain(s.binauralSends.direct).connect(ae.MEQ),ae.BReverbOut=new Tone.Gain(s.binauralSends.reverb).connect(ae.reverb),ae.BEQ=new Tone.EQ3(s.binauralEq).connect(ae.BDirectOut).connect(ae.BReverbOut),ae.B1Volume=new Tone.Gain(0).connect(ae.BEQ),ae.B1VolLFO=new Tone.LFO({min:s.B1.volMin,max:s.B1.volMax,frequency:s.B1.volLFORate,amplitude:1}).connect(ae.B1Volume.gain),ae.B1Filter=new Tone.Filter({frequency:s.B1.filterFrequency,Q:s.B1.filterResonance,type:"lowpass",rolloff:"-24"}).connect(ae.B1Volume);e=(new Tone.Merge).connect(ae.B1Filter);ae.B1OscLeft=new Tone.Oscillator({frequency:new Tone.Frequency(s.B1.note).toFrequency(),volume:-15,channelCount:1}).connect(e,0,0),ae.B1OscRight=new Tone.Oscillator({frequency:new Tone.Frequency(s.B1.note).toFrequency()+s.B1.difference,volume:-15,channelCount:1}).connect(e,0,1),ae.B2Volume=new Tone.Gain(0).connect(ae.BEQ),ae.B2VolLFO=new Tone.LFO({min:s.B2.volMin,max:s.B2.volMax,frequency:s.B2.volLFORate,amplitude:1}).connect(ae.B2Volume.gain),ae.B2Filter=new Tone.Filter({frequency:s.B2.filterFrequency,Q:s.B2.filterResonance,type:"lowpass",rolloff:"-24"}).connect(ae.B2Volume);e=(new Tone.Merge).connect(ae.B2Filter);ae.B2OscLeft=new Tone.Oscillator({frequency:new Tone.Frequency(s.B2.note).toFrequency(),volume:-15,channelCount:1}).connect(e,0,0),ae.B2OscRight=new Tone.Oscillator({frequency:new Tone.Frequency(s.B2.note).toFrequency()+s.B2.difference,volume:-15,channelCount:1}).connect(e,0,1),ae.DDirectOut=new Tone.Gain(s.D.sends.direct).connect(ae.comp),ae.DReverbOut=new Tone.Gain(s.D.sends.reverb).connect(ae.reverb),ae.DGain=new Tone.Gain(0).connect(ae.DReverbOut).connect(ae.DDirectOut),ae.DGainLFO=new Tone.LFO({min:s.D.gainLFOMin??1,max:s.D.gainLFOMax??1,frequency:s.D.gainLFORate,amplitude:1}).connect(ae.DGain.gain),ae.DVolume=new Tone.Volume(s.D.vol).connect(ae.DGain),ae.DEQ=new Tone.EQ3(s.D.eq).connect(ae.DVolume),ae.DAP=new Tone.AutoPanner(s.D.autoPan).connect(ae.DEQ),ae.DF=new Tone.AutoFilter({frequency:s.D.filterRate,octaves:s.D.filterDepth,baseFrequency:s.D.filterFrequency,filter:{type:"lowpass",rolloff:"-12",Q:s.D.filterResonance}}).connect(ae.DAP),ae.DSynths=Array.from({length:3},(e,p)=>s.D.oscillators.map(({coarse:e,fine:n,vol:a})=>{n=1200*Math.log2(e)+n;let t=new Tone.Oscillator({type:"sawtooth",frequency:n2f(s.D.chord[p]??"E2",s),detune:n,volume:a}).connect(ae.DF),i=!1,l;return{triggerAttack:()=>{clearTimeout(l),i||(t.start(),i=!0)},triggerRelease:()=>{i&&(i=!1,l=setTimeout(()=>{t.stop()},1e3*s.M.fadeIn))},setFrequency:e=>{e?(t.frequency.value=e,i&&t.start()):i&&t.stop()},osc:t}})),ae.SDirectOut=new Tone.Gain(s.S.sends.direct).connect(ae.comp),ae.SReverbOut=new Tone.Gain(s.S.sends.reverb).connect(ae.reverb),ae.SVolume=new Tone.Volume(s.S.vol).connect(ae.SReverbOut).connect(ae.SDirectOut),ae.SEQ=new Tone.EQ3(s.S.eq).connect(ae.SVolume),ae.SAP=new Tone.AutoPanner(s.S.autoPan).connect(ae.SEQ),ae.SChorus=new Tone.Chorus(s.S.chorus).connect(ae.SAP),ae.SF=new Tone.Filter({type:"lowpass",rolloff:s.S.filterRolloff??"-24",Q:s.S.filterResonance}).connect(ae.SChorus),ae.SFEnv=new Tone.FrequencyEnvelope({baseFrequency:s.S.filterFrequency,...s.S.filterEnvelope}).connect(ae.SF.frequency),ae.SSynth=new Tone.Synth({oscillator:{type:s.S.oscillatorType},envelope:s.S.amplitudeEnvelope}).connect(ae.SF),ae.PDirectOut=new Tone.Gain(s.padSends.direct).connect(ae.comp),ae.PReverbOut=new Tone.Gain(s.padSends.reverb).connect(ae.reverb),ae.PVolume=new Tone.Volume(s.padVol).connect(ae.PDirectOut).connect(ae.PReverbOut),ae.PEQ=new Tone.EQ3(s.padEq).connect(ae.PVolume),ae.PChorus=new Tone.Chorus(s.padChorus).connect(ae.PEQ),ae.Ps=Array.from({length:2},(e,n)=>{let a=s[`P${n+1}`],t={};return t.gain=new Tone.Gain(0).connect(ae.PChorus),t.gainLFO=new Tone.LFO({min:a.gainLFOMin??1,max:a.gainLFOMax??1,frequency:a.gainLFORate,amplitude:1}).connect(t.gain.gain),t.autoPan=new Tone.AutoPanner(a.autoPan).connect(t.gain),t.pan=new Tone.Panner(a.pan).connect(t.autoPan),t.filter=new Tone.Filter({type:"lowpass",rolloff:a.filterRolloff??"-12",Q:a.filterResonance}).connect(t.pan),t.filterEnv=new Tone.FrequencyEnvelope({baseFrequency:a.filterFrequency,...a.filterEnvelope}).connect(t.filter.frequency),t.synths=Array.from({length:a.polyphony},()=>new Tone.Synth({oscillator:{type:a.oscillatorType,detune:a.detune},envelope:a.amplitudeEnvelope}).connect(t.filter)),t})},started:!(pz={B1:[rd()*pho,rr()*pho],B2:[rd()*pho,rr()*pho],Dp:[rd()*pho,rr()*pho],Df:[rd()*pho,rr()*pho],D:[rd()*pho,rr()*pho],M:[rd()*pho,rr()*pho],P1p:[rd()*pho,rr()*pho],P1:[rd()*pho,rr()*pho],P2p:[rd()*pho,rr()*pho],P2:[rd()*p
// CC BY-NC 4.0 https://github.com/aaronpenne/ let dim=Math.min(window.innerWidth,window.innerHeight),mil=0,sd=gs(tokenData.hash),hi=hti(tokenData.hash),cw="#F2F3EE",cb="#222",p_pal=[{w:10,n:"Riley",v:["#E8E2D6","#333"]},{w:5,n:"Light",v:["#E8E2D6","#eee","#fff",cw]},{w:5,n:"Darkness",v:["#111","#333","#313035","#000",cb]},{w:5,n:"Phoenix",v:["#8F3935","#D94","#E8E2D6"]},{w:10,n:"Sands",v:["#BA7182","#C99","#DA9","#D94"]},{w:20,n:"Bacon",v:["#A33","#89292D"]},{w:20,n:"South Beach",v:["#253122","#f9c1ce","#fdd4bd","#78cdd0"]},{w:20,n:"Young Again",v:["#a36aa5","#fcb315","#006eb8","#e31f26"]},{w:10,n:"Laguna",v:["#9bc","#cee","#099","#78cdd0"]},{w:10,n:"Slayer",v:["#6d4145","#ca92a8","#713b4c","#f9c1ce"]},{w:20,n:"Thaddeus",v:["#064f6e","#f68c50","#40456a","#f3a257"]},{w:10,n:"Squidgit",v:["#7a4456","#c2ae93","#c27544","#762c19"]},{w:10,n:"BB",v:["#12354e","#c2ae93","#bb7125","#eea78c"]},{w:20,n:"Cat's Game",v:["#45A","#336","#A33","#f3a257"]},{w:20,n:"Cat's Cradle",v:["#45A","#336","#358","#5493B6"]},{w:20,n:"Sycamore",v:["#6E4E37","#B73","#CCC","#C54","#C95","#D57C30","#D94"]},{w:40,n:"Zephyr",v:["#336","#358","#365","#45A","#4C3F5D","#4E6E61","#576","#5493B6","#7AC","#89292D","#87A","#8F3935","#A33","#B8513B","#B78","#CCC","#C54","#C95","#D57C30","#D94","#DA9","#C99","#DEC254","#E8E2D6"]}],out=gj(p_pal,"Zephyr",!0);p_pal.push({w:20,n:"Oracle",v:[cb,cw,rndC(...out)]});let p_bg=[{w:250,n:"Light",v:cw},{w:50,n:"Darkness",v:cb}],p_form=[{w:25,n:"Hard",v:"-1."},{w:225,n:"Circle",v:".3"},{w:50,n:"Soft",v:".03"}],p_sp=[{w:25,n:"Meditative",v:1},{w:275,n:"Conceptual",v:20}],p_ns=[{w:2,v:4},{w:5,v:5},{w:5,v:6},{w:2,v:10},{w:4,v:15},{w:4,v:20},{w:2,v:25}],p_sk=[{w:5,n:"Cross",v:"(((uv.y>-inv)&&(uv.y<inv))||((uv.x>-inv)&&(uv.x<inv)))"},{w:20,n:"Slice",v:"((uv.y>-inv*2.)&&(uv.y<inv*2.))"},{w:10,n:"Quarter",v:"(((uv.y>0.)&&(uv.x>0.))||((uv.y<0.) && (uv.x<0.)))"},{w:240,n:"Hidden",v:"(uv.y>1.)"},{w:25,n:"Half",v:"(uv.y<0.)"}],p_rd=[{w:180,n:"Balanced",v:"-90."},{w:100,n:"Tilted",v:"45."},{w:20,n:"Tilted Mirror",v:"-45."}],p_d=[{w:290,n:"Out",v:"-"},{w:10,n:"In",v:"+"}],bgi=cw,bgo=rndCJ(p_bg),sp=rndCJ(p_sp),pal=rndCJ(p_pal),nstp=rndCJ(p_ns);nstp="Light"==pal.n||"Darkness"==pal.n?rndC([15,20,25]):nstp.v;let stp=hi.map((n,e)=>mvs(e)).slice(32-nstp).sort();stp.push("0.","1."),stp.sort();let nb=nstp<5?0:parseInt(rndB(0,stp.length/4)),nw=nstp<5?0:parseInt(rndB(1,stp.length/4)),form=rndCJ(p_form),sk=rndCJ(p_sk),rd=rndCJ(p_rd),dr=rndCJ(p_d),col=pnc(pal.v,stp.length),scm="1.",sct=".25";"Balanced"!=rd.n&&"Circle"!=form.n&&(scm="1.325",sct=".005"),"Circle"==form.n&&"Hidden"==sk.n&&(rd=gj(p_rd,"Balanced"));let pz="Meditative"==sp.n?0:5;"Light"!=pal.n&&"Darkness"!=pal.n||(nb=0,nw=0,bgi=pal.v[0],sk=gj(p_sk,"Hidden")),"Light"==pal.n&&(bgo=gj(p_bg,"Light")),"Darkness"==pal.n&&(bgo=gj(p_bg,"Darkness"));let coli="";for(i=0;i<col.length;i++)coli+=`uniform vec3 c${i};`;let mixes="",mx=[];stp.forEach((n,e)=>{e<stp.length-1?mixes+=e%2==0?`c = mix(c, c${e}, smoothstep(${n}, ${stp[e+1]}, d));`:`c = mix(c, c${e}, step(${n}, d));`:e==stp.length-1&&(mixes+=`c = mix(c, c${e}, smoothstep(${n}, 1., d));`),mx.push(`c${e},`)}),mx.pop(),mx.shift();let mx_c=[...mx],mx_bw=[...mx];for(sh(mx_c),i=0;i<nb;i++)mixes=mixes.replace(mx_c.pop(),"uBK,");for(i=0;i<nw;i++)mixes=mixes.replace(mx_c.pop(),"uWT,");let mixes_bw=mixes;mx_bw.forEach((n,e)=>{bw=e%2==0?"uBK,":"uWT,",mixes_bw=mixes_bw.replace(n,bw)});let sv="attribute vec3 aPosition;attribute vec2 aTexCoord;varying vec2 vTC;void main(){vTC=aTexCoord;vec4 p4=vec4(aPosition,1.);p4.xy=p4.xy*2.-1.;gl_Position=p4;}",sf=` precision highp float;varying vec2 vTC;uniform float uT;uniform vec2 uR;uniform vec3 uWT,uBK,final_color,uBGI,uBGO;${coli}float sdf(vec2 p,vec2 b,vec4 r){r.xy=(p.x>0.)?r.xy:r.zw;r.x =(p.y>0.)?r.x :r.y;vec2 q=abs(p)-b+r.x;return min(max(q.x,q.y),0.)+length(max(q,0.))-r.x;}vec3 sh(float d){vec3 c=vec3(uBGO*.25);c=mix(c,vec3(uBGO),smoothstep(${sct}-.3,${sct}+.1,d));return c;}vec3 px(vec2 uv){float sc=2.5*${scm};float bx=sdf(uv,vec2(.3,.3),vec4(${form.v}));float d=mod(bx*sc ${dr.v} uT-.25,1.);if(bx*sc > ${sct}){return sh(bx*sc);}vec3 c=vec3(uBGI);float inv=.02;if ${sk.v}{${mixes_bw}}else{${mixes}}return c;}mat2 rot(float a){a *= 3.14159/180.;float s=sin(a),c=cos(a);return mat2( c,-s,s,c );}void main(){float ps=1./uR.y;vec2 uv=vTC-.5;uv *= rot(${rd.v}); const vec2 H2=vec2(.5698402909980532,.7548776662466927);const float aa=1.5, ns=8.;vec3 col=vec3(0.);for(float i=0.;i<ns;i+=1.){vec2 d=fract(H2*i+.5)-.5;col += px(uv+d*ps*aa);}col/=ns; gl_FragColor=vec4(col,1.);} // ty @piterpasma for the anti-aliasing routine `;function setup(){createCanvas(dim,dim,WEBGL),s=createShader(sv,sf),shader(s),console.log(tokenData.hash),col.forEach((n,e)=>{s.setUniform(`c${e}`,htv(n))}),document.body.style.backgroundColor=bgo.v}function draw(){frameCount%sp.v==0&&frameCount>60*pz&&(mil+=2e-4),s.setUniform("uBGI",htv(bgi)),s.setUniform("uBGO",htv(bgo.v)),s.setUniform("uT",mil),s.setUniform("uR",[width,height]),s.setUniform("uWT",htv(cw)),s.setUniform("uBK",htv(cb)),rect(0,0,width,height)}function keyTyped(){switch(key){case"s":save(`${get_timestamp()}.jpg`);break;case"1":sp.v=1;break;case"2":sp.v=2;break;case"3":sp.v=7.25;break;case"4":sp.v=43;break;case"5":sp.v=260;break;case"6":sp.v=520;break;case"7":sp.v=1040;break;case"0":sp.v=0}}function windowResized(){dim=Math.min(window.innerWidth,window.innerHeight),resizeCanvas(dim,dim)}function hti(n){let e=[];for(let n=0;n<32;n++)e.push(tokenData.hash.slice(2+2*n,4+2*n));return e.map(n=>parseInt(n,16))}function gs(n){return parseInt(tokenData.hash.slice(0,16),16)}function mv(n){return mr(hi[n],0,255,0,1)}function mvs(n){return mv(n,0,1).toFixed(6).toString()}function mr(n,e,t,s,r){return(n-e)/(t-e)*(r-s)+s}function rnd(){return sd^=sd<<13,sd^=sd>>17,sd^=sd<<5,(sd<0?1+~sd:sd)%1e3/1e3}function rndB(n,e){return n+(e-n)*rnd()}function rndC(n){return n[Math.floor(rndB(0,.99*n.length))]}function rndCJ(n){return a=[],n.forEach((n,e)=>{for(i=0;i<n.w;i++)a.push(n)}),rndC(a)}function sh(e){for(let n=e.length-1;0<n;n--){var t=Math.floor(rnd()*(n+1));[e[n],e[t]]=[e[t],e[n]]}}function rme(n,e){for(var t=0;t<n.length;)n[t]===e?n.splice(t,1):++t;return n}function pnc(n,e){for(aa=[],idx=0;idx<e;idx++)cc=[...n],0==idx||1==n.length||(last_elem=aa[aa.length-1],cc=rme(cc,last_elem)),aa.push(rndC(cc));return aa}function htv(n){return h=/^\#([A-Fa-f\d]+)$/.exec(n)[1],3===h.length?[parseInt(h[0]+h[0],16)/255,parseInt(h[1]+h[1],16)/255,parseInt(h[2]+h[2],16)/255]:6===h.length?[parseInt(h[0]+h[1],16)/255,parseInt(h[2]+h[3],16)/255,parseInt(h[4]+h[5],16)/255]:void 0}function gj(n,e,t=!1){let s=n.filter(({n})=>n==e);return t?(s=s.map(({v:n})=>n),[...s]):s[0]}
"Return" is a meditation on returning inward, cyclical change, and the beauty of iteration. The composition of each piece slowly loops, providing a new experience for the viewer over time. Created by Aaron Penne
// CC BY-NC 4.0 https://github.com/aaronpenne/ let dim=Math.min(window.innerWidth,window.innerHeight),mil=0,sd=gs(tokenData.hash),hi=hti(tokenData.hash),cw="#F2F3EE",cb="#222",p_pal=[{w:10,n:"Riley",v:["#E8E2D6","#333"]},{w:5,n:"Light",v:["#E8E2D6","#eee","#fff",cw]},{w:5,n:"Darkness",v:["#111","#333","#313035","#000",cb]},{w:5,n:"Phoenix",v:["#8F3935","#D94","#E8E2D6"]},{w:10,n:"Sands",v:["#BA7182","#C99","#DA9","#D94"]},{w:20,n:"Bacon",v:["#A33","#89292D"]},{w:20,n:"South Beach",v:["#253122","#f9c1ce","#fdd4bd","#78cdd0"]},{w:20,n:"Young Again",v:["#a36aa5","#fcb315","#006eb8","#e31f26"]},{w:10,n:"Laguna",v:["#9bc","#cee","#099","#78cdd0"]},{w:10,n:"Slayer",v:["#6d4145","#ca92a8","#713b4c","#f9c1ce"]},{w:20,n:"Thaddeus",v:["#064f6e","#f68c50","#40456a","#f3a257"]},{w:10,n:"Squidgit",v:["#7a4456","#c2ae93","#c27544","#762c19"]},{w:10,n:"BB",v:["#12354e","#c2ae93","#bb7125","#eea78c"]},{w:20,n:"Cat's Game",v:["#45A","#336","#A33","#f3a257"]},{w:20,n:"Cat's Cradle",v:["#45A","#336","#358","#5493B6"]},{w:20,n:"Sycamore",v:["#6E4E37","#B73","#CCC","#C54","#C95","#D57C30","#D94"]},{w:40,n:"Zephyr",v:["#336","#358","#365","#45A","#4C3F5D","#4E6E61","#576","#5493B6","#7AC","#89292D","#87A","#8F3935","#A33","#B8513B","#B78","#CCC","#C54","#C95","#D57C30","#D94","#DA9","#C99","#DEC254","#E8E2D6"]}],out=gj(p_pal,"Zephyr",!0);p_pal.push({w:20,n:"Oracle",v:[cb,cw,rndC(...out)]});let p_bg=[{w:250,n:"Light",v:cw},{w:50,n:"Darkness",v:cb}],p_form=[{w:25,n:"Hard",v:"-1."},{w:225,n:"Circle",v:".3"},{w:50,n:"Soft",v:".03"}],p_sp=[{w:25,n:"Meditative",v:1},{w:275,n:"Conceptual",v:20}],p_ns=[{w:2,v:4},{w:5,v:5},{w:5,v:6},{w:2,v:10},{w:4,v:15},{w:4,v:20},{w:2,v:25}],p_sk=[{w:5,n:"Cross",v:"(((uv.y>-inv)&&(uv.y<inv))||((uv.x>-inv)&&(uv.x<inv)))"},{w:20,n:"Slice",v:"((uv.y>-inv*2.)&&(uv.y<inv*2.))"},{w:10,n:"Quarter",v:"(((uv.y>0.)&&(uv.x>0.))||((uv.y<0.) && (uv.x<0.)))"},{w:240,n:"Hidden",v:"(uv.y>1.)"},{w:25,n:"Half",v:"(uv.y<0.)"}],p_rd=[{w:180,n:"Balanced",v:"-90."},{w:100,n:"Tilted",v:"45."},{w:20,n:"Tilted Mirror",v:"-45."}],p_d=[{w:290,n:"Out",v:"-"},{w:10,n:"In",v:"+"}],bgi=cw,bgo=rndCJ(p_bg),sp=rndCJ(p_sp),pal=rndCJ(p_pal),nstp=rndCJ(p_ns);nstp="Light"==pal.n||"Darkness"==pal.n?rndC([15,20,25]):nstp.v;let stp=hi.map((n,e)=>mvs(e)).slice(32-nstp).sort();stp.push("0.","1."),stp.sort();let nb=nstp<5?0:parseInt(rndB(0,stp.length/4)),nw=nstp<5?0:parseInt(rndB(1,stp.length/4)),form=rndCJ(p_form),sk=rndCJ(p_sk),rd=rndCJ(p_rd),dr=rndCJ(p_d),col=pnc(pal.v,stp.length),scm="1.",sct=".25";"Balanced"!=rd.n&&"Circle"!=form.n&&(scm="1.325",sct=".005"),"Circle"==form.n&&"Hidden"==sk.n&&(rd=gj(p_rd,"Balanced"));let pz="Meditative"==sp.n?0:5;"Light"!=pal.n&&"Darkness"!=pal.n||(nb=0,nw=0,bgi=pal.v[0],sk=gj(p_sk,"Hidden")),"Light"==pal.n&&(bgo=gj(p_bg,"Light")),"Darkness"==pal.n&&(bgo=gj(p_bg,"Darkness"));let coli="";for(i=0;i<col.length;i++)coli+=`uniform vec3 c${i};`;let mixes="",mx=[];stp.forEach((n,e)=>{e<stp.length-1?mixes+=e%2==0?`c = mix(c, c${e}, smoothstep(${n}, ${stp[e+1]}, d));`:`c = mix(c, c${e}, step(${n}, d));`:e==stp.length-1&&(mixes+=`c = mix(c, c${e}, smoothstep(${n}, 1., d));`),mx.push(`c${e},`)}),mx.pop(),mx.shift();let mx_c=[...mx],mx_bw=[...mx];for(sh(mx_c),i=0;i<nb;i++)mixes=mixes.replace(mx_c.pop(),"uBK,");for(i=0;i<nw;i++)mixes=mixes.replace(mx_c.pop(),"uWT,");let mixes_bw=mixes;mx_bw.forEach((n,e)=>{bw=e%2==0?"uBK,":"uWT,",mixes_bw=mixes_bw.replace(n,bw)});let sv="attribute vec3 aPosition;attribute vec2 aTexCoord;varying vec2 vTC;void main(){vTC=aTexCoord;vec4 p4=vec4(aPosition,1.);p4.xy=p4.xy*2.-1.;gl_Position=p4;}",sf=` precision highp float;varying vec2 vTC;uniform float uT;uniform vec2 uR;uniform vec3 uWT,uBK,final_color,uBGI,uBGO;${coli}float sdf(vec2 p,vec2 b,vec4 r){r.xy=(p.x>0.)?r.xy:r.zw;r.x =(p.y>0.)?r.x :r.y;vec2 q=abs(p)-b+r.x;return min(max(q.x,q.y),0.)+length(max(q,0.))-r.x;}vec3 sh(float d){vec3 c=vec3(uBGO*.25);c=mix(c,vec3(uBGO),smoothstep(${sct}-.3,${sct}+.1,d));return c;}vec3 px(vec2 uv){float sc=2.5*${scm};float bx=sdf(uv,vec2(.3,.3),vec4(${form.v}));float d=mod(bx*sc ${dr.v} uT-.25,1.);if(bx*sc > ${sct}){return sh(bx*sc);}vec3 c=vec3(uBGI);float inv=.02;if ${sk.v}{${mixes_bw}}else{${mixes}}return c;}mat2 rot(float a){a *= 3.14159/180.;float s=sin(a),c=cos(a);return mat2( c,-s,s,c );}void main(){float ps=1./uR.y;vec2 uv=vTC-.5;uv *= rot(${rd.v}); const vec2 H2=vec2(.5698402909980532,.7548776662466927);const float aa=1.5, ns=8.;vec3 col=vec3(0.);for(float i=0.;i<ns;i+=1.){vec2 d=fract(H2*i+.5)-.5;col += px(uv+d*ps*aa);}col/=ns; gl_FragColor=vec4(col,1.);} // ty @piterpasma for the anti-aliasing routine `;function setup(){createCanvas(dim,dim,WEBGL),s=createShader(sv,sf),shader(s),console.log(tokenData.hash),col.forEach((n,e)=>{s.setUniform(`c${e}`,htv(n))})}function draw(){frameCount%sp.v==0&&frameCount>60*pz&&(mil+=2e-4),s.setUniform("uBGI",htv(bgi)),s.setUniform("uBGO",htv(bgo.v)),s.setUniform("uT",mil),s.setUniform("uR",[width,height]),s.setUniform("uWT",htv(cw)),s.setUniform("uBK",htv(cb)),rect(0,0,width,height)}function keyTyped(){switch(key){case"s":save(`${get_timestamp()}.jpg`);break;case"1":sp.v=1;break;case"2":sp.v=2;break;case"3":sp.v=7.25;break;case"4":sp.v=43;break;case"5":sp.v=260;break;case"6":sp.v=520;break;case"7":sp.v=1040;break;case"0":sp.v=0}}function windowResized(){dim=Math.min(window.innerWidth,window.innerHeight),resizeCanvas(dim,dim)}function hti(n){let e=[];for(let n=0;n<32;n++)e.push(tokenData.hash.slice(2+2*n,4+2*n));return e.map(n=>parseInt(n,16))}function gs(n){return parseInt(tokenData.hash.slice(0,16),16)}function mv(n){return mr(hi[n],0,255,0,1)}function mvs(n){return mv(n,0,1).toFixed(6).toString()}function mr(n,e,t,s,r){return(n-e)/(t-e)*(r-s)+s}function rnd(){return sd^=sd<<13,sd^=sd>>17,sd^=sd<<5,(sd<0?1+~sd:sd)%1e3/1e3}function rndB(n,e){return n+(e-n)*rnd()}function rndC(n){return n[Math.floor(rndB(0,.99*n.length))]}function rndCJ(n){return a=[],n.forEach((n,e)=>{for(i=0;i<n.w;i++)a.push(n)}),rndC(a)}function sh(e){for(let n=e.length-1;0<n;n--){var t=Math.floor(rnd()*(n+1));[e[n],e[t]]=[e[t],e[n]]}}function rme(n,e){for(var t=0;t<n.length;)n[t]===e?n.splice(t,1):++t;return n}function pnc(n,e){for(aa=[],idx=0;idx<e;idx++)cc=[...n],0==idx||1==n.length||(last_elem=aa[aa.length-1],cc=rme(cc,last_elem)),aa.push(rndC(cc));return aa}function htv(n){return h=/^\#([A-Fa-f\d]+)$/.exec(n)[1],3===h.length?[parseInt(h[0]+h[0],16)/255,parseInt(h[1]+h[1],16)/255,parseInt(h[2]+h[2],16)/255]:6===h.length?[parseInt(h[0]+h[1],16)/255,parseInt(h[2]+h[3],16)/255,parseInt(h[4]+h[5],16)/255]:void 0}function gj(n,e,t=!1){let s=n.filter(({n})=>n==e);return t?(s=s.map(({v:n})=>n),[...s]):s[0]}
// CC BY-NC 4.0 https://github.com/aaronpenne/ let rv=hti(tokenData.hash),sd=gs(tokenData.hash),dim=Math.min(window.innerWidth,window.innerHeight);var v;let cw="#F6F6F5",cb="#171718";function setup(){dim=Math.min(window.innerWidth,window.innerHeight),createCanvas(dim,dim,P2D),colorMode(RGB,100,100,100,100),rectMode(CORNERS),ellipseMode(CORNERS),strokeCap(SQUARE),ew=["#222","#336","#358","#333","#365","#45A","#4C3F5D","#4E6E61","#544","#576","#5493B6","#6E4E37","#7AC","#78876E","#89292D","#87A","#8F3935","#A33","#B8513B","#B78","#B73","#CCC","#C54","#C95","#D57C30","#D94","#DA9","#C99","#DEC254","#E8E2D6","#F2F3EE"]}function draw(){sd=gs(tokenData.hash),noiseSeed(sd),randomSeed(sd),v={sd:sd,xp:.18,yp:.18,xd:mv(2,100,300),yd:mv(3,600,700),xo:mv(4,.002,.005),yo:mv(5,.005,.03),xa:mv(6,.1*width,.3*width),ya:mv(7,.1*height,.3*width),bd:int(mv(8,10,200)),sw:!0,dk:!1,tk:.01*height,bk:mv(9)<.5?"r":"e",sd:mv(10)<.3,bks:mv(11)<.5,bkc:mv(12)<.8?cb:cw,xdn:mv(13)<.5?-1:1,xf:mv(14)<.1?1:0,cs:mv(18)<.15},mv(16)<.6?(v.sxn=!1,v.syn=!1):mv(16)<.7?(v.sxn=!0,v.syn=!0):mv(16)<.8?(v.sxn=!1,v.syn=!0):mv(16)<=1&&(v.sxn=!0,v.syn=!1),v.xa*=v.xdn,1===v.xf&&(v.xa=0),mv(0)<.15?(v.xp=-.14,v.xd*=1.5,v.yo*=2):mv(0)<.3&&(v.yp=-.14,v.yd*=1.5,v.xo*=2),mv(1)<.005?(v.p=[cw],v.sw=!0,v.cs=!1):mv(1)<.01?(v.p=[cb],v.sw=!0,v.cs=!1,v.dk=!0):mv(1)<.02?(v.p=["#823d65",cw,cb],v.cs=!1,v.sd=!1,colorMode(HSB,360,100,100)):mv(1)<.1?(v.p=[cw,cb],v.sw=!0,v.cs=!1):mv(1)<.3?v.p=[rc(ew),cb,cw]:mv(1)<.48?v.p=[rc(ew),rc(ew),rc(ew),cb,cw]:mv(1)<.52?v.p=["#8F3935",cw,"#D94"]:mv(1)<.57?v.p=["#BA7182","#C99","#DA9","#D94",cw]:mv(1)<.61?v.p=["#89292D","#8F3935","#A33",cw]:mv(1)<.62?v.p=["#253122","#f9c1ce","#fdd4bd","#78cdd0",cw]:mv(1)<.64?v.p=["#bce4e5","#cab356","#f15a30","#00b49b"]:mv(1)<.66?v.p=["#9bc","#cc9","#cee","#099","#78cdd0",cw]:mv(1)<.69?v.p=["#6d4145","#ca92a8","#713b4c","#f9c1ce",cw,cb]:mv(1)<.7?v.p=["#064f6e","#ae5224","#ebd3a2","#635a3a",cw]:mv(1)<.72?v.p=["#4f4086","#1e0e3f","#9a72aa","#c53c69",cw]:mv(1)<.75?v.p=["#f5ecc2","#eeb480","#837e31","#253122",cw]:mv(1)<.77?v.p=["#064f6e","#f68c50","#40456a","#f3a257",cw,cb]:mv(1)<.79?v.p=["#a36aa5","#ebd3a2","#8fa071","#e31f26",cw]:mv(1)<.8?v.p=["#34454c","#d8a37b","#71502f","#f5ecc2",cw]:mv(1)<.81?v.p=["#547076","#c5a56e","#f5ecc2","#dd4027",cw,cb]:mv(1)<.82?v.p=["#a36aa5","#fcb315","#006eb8","#e31f26",cw]:mv(1)<.86?v.p=["#34454c","#ae5224","#eeb480","#b5decc",cw]:mv(1)<.87?v.p=["#006eb8","#00978d","#fdbf68","#f99d1b",cw,cb]:mv(1)<.88?v.p=["#97acc8","#b5decc","#ffefae","#f37420",cw]:mv(1)<.9?v.p=["#7d133a","#a36752","#b6bfc1","#f9c1ce",cw,cb]:mv(1)<.92?v.p=["#7a4456","#c2ae93","#c27544","#762c19",cw,cb]:mv(1)<.94?v.p=["#12354e","#c2ae93","#bb7125","#eea78c",cw]:mv(1)<.95?v.p=["#D0DBD7","#739C8E","#CEB0CA","#ca92a8","#713b4c",cw,cb]:v.p=ew.concat([cw,cw,cw,cw]),strokeWeight(v.tk),bc=v.bkc===cw?cb:cw,v.cs&&(v.bkc=v.p[0]),background(bc),da(),noLoop()}function gg(e=10,v=10,c=.2,t=.2){var a;gd=[],e=round(e),v=round(v);for(var n=width*c,d=width*(1-c),i=height*t,o=height*(1-t),r=0;r<=v;r++){for(row=[],a=0;a<=e;a++)j_=n+(d-n)*a/e,i_=i+(o-i)*r/v,row.push([j_,i_]);gd.push(row)}return gd}function windowResized(){dim=Math.min(window.innerWidth,window.innerHeight),resizeCanvas(dim,dim)}function get_timestamp(){return(new Date).toISOString().replace(/[^T0-9]/g,"").replace("T","_")}function dal(e,c,t=0){for(beginShape(),j=0;j<e[c].length;j++)x=e[c][j][0],y=e[c][j][1],x_=v.sxn?x+v.xdn*t-map(noise(c*v.xo),0,1,-v.xa,v.xa):x+v.xdn*t-map(noise(c*v.xo,j*v.yo),0,1,-v.xa,v.xa),y_=v.syn?y-t/2+map(noise(j*v.yo),0,1,-v.ya,v.ya):y-t/2+map(noise(c*v.xo,j*v.yo),0,1,-v.ya,v.ya),curveVertex(x_,y_);endShape()}function da(){push(),v.bks?(strokeWeight(.5*v.tk),stroke(v.bkc),noFill()):(noStroke(),fill(v.bkc));var e=.1*dim;for("r"===v.bk?rect(e,e,width-e,height-e):"e"===v.bk&&ellipse(e,e,width-e,height-e),pop(),v.sd&&(v.yd*=.5),strokeWeight(v.tk),gd=gg(v.xd,v.yd,v.xp,v.yp),tic=color(rc(v.p)),tac=color(rc(v.p)),i=0;i<gd.length&&(v.sw&&(push(),noFill(),stroke("#1111"),v.dk&&stroke("#EEE1"),dal(gd,i,.004*height),pop()),i%v.bd==0&&(tic=color(rc(v.p)),tac=color(rc(v.p))),push(),noFill(),v.sd?stroke(rc(v.p)):stroke(lerpColor(tic,tac,i%v.bd/v.bd)),dal(gd,i),pop(),i!==gd.length-2);i++);}function hti(e){let v=[];for(let e=0;e<32;e++)v.push(tokenData.hash.slice(2+2*e,4+2*e));return v.map(e=>parseInt(e,16))}function gs(e){return parseInt(tokenData.hash.slice(0,16),16)}function mv(e,v=0,c=1){return map(rv[e],0,255,v,c)}function rand_dec(){return sd^=sd<<13,sd^=sd>>17,sd^=sd<<5,(sd<0?1+~sd:sd)%1e3/1e3}function rand_between(e,v){return e+(v-e)*rand_dec()}function rc(e){return e[Math.floor(rand_between(0,.99*e.length))]}