Skip to content

Commit

Permalink
fix: fix weird parse errors
Browse files Browse the repository at this point in the history
  • Loading branch information
delanni committed Dec 15, 2023
1 parent cb56036 commit e570119
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions sketches.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@
{
"name": "Zumicubi",
"type": "code",
"code": "\nvar c1 = shape(4)\n\t.scale(() => Math.sin(time /60 * Math.tan(time/69))*3)\n\t.mult(osc(1, 1, 1)\n\t\t.rotate(Math.PI / 2))\n\nc1.out(o0)\n\nsrc(o0)\n\t.diff(src(o0)\n\t\t.scale(1.1))\n\t.out(o1)\n\nsrc(o1)\n\t.add(src(o1)\n\t\t.scale(0.1, 3), 0.91)\n\t.blend(src(o2), 0.8)\n\t.blend(src(o2)\n\t\t.rotate(Math.PI / 2))\n\t.diff(src(o2)\n\t\t.mult(osc(1, 1, 2)))\n\t.add(src(o1))\n\t.sub(src(o0))\n\t.out(o2)\n\nsrc(o2)\n\t.add(src(o3)\n\t\t.scale(0.9)\n .scrollX(() => Math.sin(time))\n \n .scrollY(() => Math.cos(time*.9))\n\t\t.rotate(0.0, Math.random() * 0.1 - 0.05), [-1, 1].fast(0.4)\n\t\t.smooth(0.9))\n.add(src(o2))\n\t.out(o3)\n\nrender(o3)",
"code": "\nvar c1 = shape(4)\n\t.scale(() => Math.sin(time /60 * Math.tan(time/69)) * 3)\n\t.mult(osc(1, 1, 1)\n\t\t.rotate(Math.PI / 2))\n\nc1.out(o0)\n\nsrc(o0)\n\t.diff(src(o0)\n\t\t.scale(1.1))\n\t.out(o1)\n\nsrc(o1)\n\t.add(src(o1)\n\t\t.scale(0.1, 3), 0.91)\n\t.blend(src(o2), 0.8)\n\t.blend(src(o2)\n\t\t.rotate(Math.PI / 2))\n\t.diff(src(o2)\n\t\t.mult(osc(1, 1, 2)))\n\t.add(src(o1))\n\t.sub(src(o0))\n\t.out(o2)\n\nsrc(o2)\n\t.add(src(o3)\n\t\t.scale(0.9)\n .scrollX(() => Math.sin(time))\n \n .scrollY(() => Math.cos(time * .9))\n\t\t.rotate(0.0, Math.random() * 0.1 - 0.05), [-1, 1].fast(0.4)\n\t\t.smooth(0.9))\n.add(src(o2))\n\t.out(o3)\n\nrender(o3)",
"bpm": 0,
"midi": null
},
{
"name": "Burning squares",
"type": "code",
"code": "shape(4)\n\t.scale(1, height / width)\n\t.modulate(noise(4,2,4), [0,1].fast(0.1).smooth())\n\t.mult(osc(1,0.1,1).kaleid(10))\n\t.rotate(0,-0.15)\n\t.out(o0)\n\nsrc(o0)\n\t.blend(src(o0)\n\t\t.scale(0.8)\n\t\t.rotate(0.3, 0.4))\n\t.blend(src(o1)\n\t\t.scroll(0.2)\n\t\t.kaleid(4))\n\t.out(o1)\n\nsrc(o1)\n\t.add(src(o1)\n\t\t.scale(0.9))\n\t.add(src(o1)\n\t\t.scale(0.8))\n\t.add(src(o1)\n\t\t.scale(0.7))\n\t.rotate(0, -0.2)\n\t.diff(src(o1)\n\t\t.scale(() => Math.log(Math.min(3000, Math.max(0.4, Math.tan(time / 10)*Math.cos(time/10/2))))))\n\t.out(o2)\n\nsrc(o2).diff(src(o3).repeat(3,3).kaleid(4).rotate(0.1,0.1)).out(o3)\n\nrender(o3)",
"code": "shape(4)\n\t.scale(1, height / width)\n\t.modulate(noise(4,2,4), [0,1].fast(0.1).smooth())\n\t.mult(osc(1,0.1,1).kaleid(10))\n\t.rotate(0,-0.15)\n\t.out(o0)\n\nsrc(o0)\n\t.blend(src(o0)\n\t\t.scale(0.8)\n\t\t.rotate(0.3, 0.4))\n\t.blend(src(o1)\n\t\t.scroll(0.2)\n\t\t.kaleid(4))\n\t.out(o1)\n\nsrc(o1)\n\t.add(src(o1)\n\t\t.scale(0.9))\n\t.add(src(o1)\n\t\t.scale(0.8))\n\t.add(src(o1)\n\t\t.scale(0.7))\n\t.rotate(0, -0.2)\n\t.diff(src(o1)\n\t\t.scale(() => Math.log(Math.min(3000, Math.max(0.4, Math.tan(time / 10) * Math.cos(time/10/2))))))\n\t.out(o2)\n\nsrc(o2).diff(src(o3).repeat(3,3).kaleid(4).rotate(0.1,0.1)).out(o3)\n\nrender(o3)",
"bpm": 0,
"midi": null
},
Expand All @@ -30,7 +30,7 @@
{
"name": "windyred",
"type": "code",
"code": "\nbpm = 140\n\nconst saw = ({\n\tmin = 0,\n\tmax = 1,\n\tx = 1,\n\tt\n} = {}) => ({\n\ttime\n}) => {\n\tconst spb = 60 / bpm * x;\n\tconst p = (time % spb) / spb * (max - min) + min;\n\n\tif (t) {\n\t\treturn t(p);\n\t} else {\n\t\treturn p;\n\t}\n}\n\n\nshape(4)\n\t.scale(saw({\n\t\tmin: 0.7,\n\t\tmax: 1.1\n\t}))\n\t.rotate(0, 0.1)\n\t.color(0.3, 0.03, 0.09)\n\t//.hue([0, 2].fast(0.05).smooth())\n\t.add(src(o0)\n\t\t.scale([0.8, 1].fast(0.1)\n\t\t\t.smooth()), 0.99)\n\t.diff(src(o0)\n\t\t.scale([0.8, 1].fast(0.2)\n\t\t\t.smooth()))\n\t.scroll(() => -mouse.x / width*2, () => -mouse.y / height + 0.5)\n\t.diff(shape(4)\n\t\t.scale([0.3, 0.7].smooth(2)))\n\t.sub(shape(4)\n\t\t.scale(saw({\n\t\t\tmin: 0.7,\n\t\t\tmax: 1.1\n\t\t})), [0, 1].smooth())\n\t.out(o0)\n\nconst mode = [\n\tMath.sin,\n\tMath.cos,\n\tMath.tan,\n\tx => Math.random()\n]\nconst rand = (e) => e[Math.floor(Math.random() * e.length)];\n\nsrc(o0)\n\t.scale(0.8)\n\t.add(src(o1)\n\t\t.mult(osc(1, 1, 1)\n\t\t\t.kaleid(10)), () => mouse.x / width)\n\t.scale(saw({\n\t\tmax: 1.7,\n\t\tmin: 0.7,\n\t\tx: 10\n\t}))\n\t.diff(src(o0))\n\t.rotate([Math.random(), Math.random(), Math.random() - 0.5, Math.random(), Math.random() - 0.5], 0.1)\n\t.out(o1)\n\nsrc(o1)\n\t.add(src(o2), 0.1)\n\t.out(o2)\n\nsrc(o2)\n\t.blend(src(o2)\n\t\t.kaleid(6))\n\t.diff(o0)\n\t.out(o3)\n\nrender(o3)",
"code": "\nbpm = 140\n\nconst saw = ({\n\tmin = 0,\n\tmax = 1,\n\tx = 1,\n\tt\n} = {}) => ({\n\ttime\n}) => {\n\tconst spb = 60 / bpm * x;\n\tconst p = (time % spb) / spb * (max - min) + min;\n\n\tif (t) {\n\t\treturn t(p);\n\t} else {\n\t\treturn p;\n\t}\n}\n\n\nshape(4)\n\t.scale(saw({\n\t\tmin: 0.7,\n\t\tmax: 1.1\n\t}))\n\t.rotate(0, 0.1)\n\t.color(0.3, 0.03, 0.09)\n\t//.hue([0, 2].fast(0.05).smooth())\n\t.add(src(o0)\n\t\t.scale([0.8, 1].fast(0.1)\n\t\t\t.smooth()), 0.99)\n\t.diff(src(o0)\n\t\t.scale([0.8, 1].fast(0.2)\n\t\t\t.smooth()))\n\t.scroll(() => -mouse.x / width * 2, () => -mouse.y / height + 0.5)\n\t.diff(shape(4)\n\t\t.scale([0.3, 0.7].smooth(2)))\n\t.sub(shape(4)\n\t\t.scale(saw({\n\t\t\tmin: 0.7,\n\t\t\tmax: 1.1\n\t\t})), [0, 1].smooth())\n\t.out(o0)\n\nconst mode = [\n\tMath.sin,\n\tMath.cos,\n\tMath.tan,\n\tx => Math.random()\n]\nconst rand = (e) => e[Math.floor(Math.random() * e.length)];\n\nsrc(o0)\n\t.scale(0.8)\n\t.add(src(o1)\n\t\t.mult(osc(1, 1, 1)\n\t\t\t.kaleid(10)), () => mouse.x / width)\n\t.scale(saw({\n\t\tmax: 1.7,\n\t\tmin: 0.7,\n\t\tx: 10\n\t}))\n\t.diff(src(o0))\n\t.rotate([Math.random(), Math.random(), Math.random() - 0.5, Math.random(), Math.random() - 0.5], 0.1)\n\t.out(o1)\n\nsrc(o1)\n\t.add(src(o2), 0.1)\n\t.out(o2)\n\nsrc(o2)\n\t.blend(src(o2)\n\t\t.kaleid(6))\n\t.diff(o0)\n\t.out(o3)\n\nrender(o3)",
"bpm": "140",
"midi": null
},
Expand Down Expand Up @@ -165,7 +165,7 @@
{
"name": "Pumpin 5",
"type": "code",
"code": "bpm = 170\n\nshape(4).scrollX(0,0.23239).scrollY(0,0.3).kaleid(5)\n .diff(shape(5).scrollX(0, -0.1111).scrollY(0,-Math.random()/10).kaleid(7))\n .rotate(0.3, 0.01)\n .repeat(2,1)\n .out(o0)\n\nsrc(o0).blend(o1,0.99).rotate(0,[0.001, -0.001].fast(0.004).smooth()).add(o0,0.1).out(o1)\n\nox = osc(6,-0.1,[0,2].fast(0.01).smooth()).brightness(0.1)\n\nsrc(o1)\n .mult(ox.saturate(0.2))\n .diff(shape(2).scale(({time})=> 2*(time%(60/bpm))))\n .out(o2)\n\n\nsrc(o2).blend(src(o2).scale(0.99).diff(o1).diff(ox.kaleid(10)), [0,1].fast(0.1).smooth()).out(o3) \n\nrender(o3)",
"code": "bpm = 170\n\nshape(4).scrollX(0,0.23239).scrollY(0,0.3).kaleid(5)\n .diff(shape(5).scrollX(0, -0.1111).scrollY(0,-Math.random()/10).kaleid(7))\n .rotate(0.3, 0.01)\n .repeat(2,1)\n .out(o0)\n\nsrc(o0).blend(o1,0.99).rotate(0,[0.001, -0.001].fast(0.004).smooth()).add(o0,0.1).out(o1)\n\nox = osc(6,-0.1,[0,2].fast(0.01).smooth()).brightness(0.1)\n\nsrc(o1)\n .mult(ox.saturate(0.2))\n .diff(shape(2).scale(({time})=> 2 * (time%(60/bpm))))\n .out(o2)\n\n\nsrc(o2).blend(src(o2).scale(0.99).diff(o1).diff(ox.kaleid(10)), [0,1].fast(0.1).smooth()).out(o3) \n\nrender(o3)",
"bpm": "170",
"midi": null
},
Expand Down Expand Up @@ -224,7 +224,7 @@
{
"name": "rotacats midi",
"type": "code",
"code": "\nbpm = 140\n\nconst rx = Math.random()\ns0.initImage(\"https://cataas.com/cat/says/MEOW?a=x\" + rx)\n\ns1.initImage(\"https://cataas.com/cat/says/MEOW?a=x\" + rx)\n\nsrc(s0).colorama( midi(\"green\", {min: -0.001, max: 1}) ).modulate(noise( midi(\"blue\", {min: 0, max: 6}) )).out(o0)\n\n\nsrc(s1).scale([0.7, 1.1].fast(2).smooth()).rotate(midi(\"red\", {min: 0, max:Math.PI*4})).out(o1)\n\nsrc(o0).mult(o1, midi(\"yellow\")).out(o2);\n\nsrc(o2).blend(src(o3).scale([1,1.06]), midi(65, {min: 0.2, max:0.95})).out(o3)\n\nrender(o3);\n\n",
"code": "\nbpm = 140\n\nconst rx = Math.random()\ns0.initImage(\"https://cataas.com/cat/says/MEOW?a=x\" + rx)\n\ns1.initImage(\"https://cataas.com/cat/says/MEOW?a=x\" + rx)\n\nsrc(s0).colorama( midi(\"green\", {min: -0.001, max: 1}) ).modulate(noise( midi(\"blue\", {min: 0, max: 6}) )).out(o0)\n\n\nsrc(s1).scale([0.7, 1.1].fast(2).smooth()).rotate(midi(\"red\", {min: 0, max:Math.PI * 4})).out(o1)\n\nsrc(o0).mult(o1, midi(\"yellow\")).out(o2);\n\nsrc(o2).blend(src(o3).scale([1,1.06]), midi(65, {min: 0.2, max:0.95})).out(o3)\n\nrender(o3);\n\n",
"bpm": "140",
"midi": true
},
Expand Down Expand Up @@ -266,14 +266,14 @@
{
"name": "Bubbles midi",
"type": "code",
"code": "/*Bubbles:*/\nvar x = 0;\nvar y = 0;\nbpm = 140;\nn1 = noise(14, 2, 10)\n\t.contrast(5)\n\t.invert([0, 0.1, 0, 0.2].fast(0.2)\n\t\t.ease(\"easeInOutQuart\"))\n\t.scale([1.542, 1.2, 1, 0.37].fast(2)\n\t\t.ease(\"easeInOutCubic\"))\n\t.kaleid(3)\n\t.rotate(3.14 / 8, 0.1);\nn2 = noise(7, 2, 10)\n\t.invert([0, 0.1, 0, 0.6].fast(0.008)\n\t\t.ease(\"easeInOutQuart\"))\n\t.scale([1, 1.2].fast(2)\n\t\t.ease(\"easeInOutCubic\"))\n\t.rotate(-3.14 / 8, -0.12);\nn1.blend(n2, [0.855, 1].fast(1.204 ** -5)\n\t\t.smooth())\n\t.out(o0);\nvoronoi(15.386, 2, [1, 2, 3, 5, 10].fast(0.125)\n\t\t.smooth())\n\t.mult(osc(1, 0.084, 1))\n\t.saturate([0.1, 0.9].fast(0.2)\n\t\t.smooth())\n\t.brightness(0.4)\n\t.blend(src(o1), [0.95, 0.99].fast(0.125)\n\t\t.smooth())\n\t.out(o1);\nsrc(o0)\n\t.modulateScale(src(o1))\n\t.modulateRotate(src(o1)\n\t\t.rotate(0.1, 0.1))\n\t.add(src(o2), 0.5)\n\t.mult(src(o1))\n\t.out(o2);\nsrc(o2)\n\t.rotate(0, 0.1)\n\t.scale(midi(\"red\", {min:0, max: 3, transform: Math.sin}))\n\t.add(src(o2), 0.453)\n\t.out(o3);\nrender(o3);",
"code": "/ * Bubbles: * /\nvar x = 0;\nvar y = 0;\nbpm = 140;\nn1 = noise(14, 2, 10)\n\t.contrast(5)\n\t.invert([0, 0.1, 0, 0.2].fast(0.2)\n\t\t.ease(\"easeInOutQuart\"))\n\t.scale([1.542, 1.2, 1, 0.37].fast(2)\n\t\t.ease(\"easeInOutCubic\"))\n\t.kaleid(3)\n\t.rotate(3.14 / 8, 0.1);\nn2 = noise(7, 2, 10)\n\t.invert([0, 0.1, 0, 0.6].fast(0.008)\n\t\t.ease(\"easeInOutQuart\"))\n\t.scale([1, 1.2].fast(2)\n\t\t.ease(\"easeInOutCubic\"))\n\t.rotate(-3.14 / 8, -0.12);\nn1.blend(n2, [0.855, 1].fast(1.204 ** -5)\n\t\t.smooth())\n\t.out(o0);\nvoronoi(15.386, 2, [1, 2, 3, 5, 10].fast(0.125)\n\t\t.smooth())\n\t.mult(osc(1, 0.084, 1))\n\t.saturate([0.1, 0.9].fast(0.2)\n\t\t.smooth())\n\t.brightness(0.4)\n\t.blend(src(o1), [0.95, 0.99].fast(0.125)\n\t\t.smooth())\n\t.out(o1);\nsrc(o0)\n\t.modulateScale(src(o1))\n\t.modulateRotate(src(o1)\n\t\t.rotate(0.1, 0.1))\n\t.add(src(o2), 0.5)\n\t.mult(src(o1))\n\t.out(o2);\nsrc(o2)\n\t.rotate(0, 0.1)\n\t.scale(midi(\"red\", {min:0, max: 3, transform: Math.sin}))\n\t.add(src(o2), 0.453)\n\t.out(o3);\nrender(o3);",
"bpm": "140",
"midi": true
},
{
"name": "Eye of the night midi",
"type": "code",
"code": "\nvar hori = osc(1,1,1)\n\t.scale([1, 1.5])\nvar verti = osc(1)\n\t.rotate([Math.PI / 2, Math.random(), Math.PI / -2, Math.PI / 3, Math.PI / 4 * -3])\n\nhori.blend(verti, [0.1, 0.9].fast(6 / 8)\n\t\t.smooth())\n\t.out(o0)\n\nsrc(o0)\n\t.modulate(hori.blend(verti, [-1, 1].fast(0.01)\n\t\t.smooth()))\n\t.out(o1)\n\nsrc(o1)\n\t.diff(src(o0)\n\t\t.scale(() => Math.sin(time / 10)))\n\t.out(o2)\n\nsrc(o2)\n\t.blend(src(o2))\n\t.repeat([3, 6], [3, 1, -1, 3, -6])\n\t.blend(src(o3)\n\t\t.scale(1.2).rotate(midi(\"red\", {min: -Math.PI+0.1, max: Math.PI-0.1})))\n\t.sub(src(o3).scale(1.1).mask(shape([10, 100].smooth()).scale(() => 3*Math.sin(time/4))))\n\t.brightness(midi(\"yellow\", {min: -0.001, max: 1}))\n\t.saturate(1.2)\n\t.hue(() => 1)\n\t.out(o3)\n\nrender(o3)",
"code": "\nvar hori = osc(1,1,1)\n\t.scale([1, 1.5])\nvar verti = osc(1)\n\t.rotate([Math.PI / 2, Math.random(), Math.PI / -2, Math.PI / 3, Math.PI / 4 * -3])\n\nhori.blend(verti, [0.1, 0.9].fast(6 / 8)\n\t\t.smooth())\n\t.out(o0)\n\nsrc(o0)\n\t.modulate(hori.blend(verti, [-1, 1].fast(0.01)\n\t\t.smooth()))\n\t.out(o1)\n\nsrc(o1)\n\t.diff(src(o0)\n\t\t.scale(() => Math.sin(time / 10)))\n\t.out(o2)\n\nsrc(o2)\n\t.blend(src(o2))\n\t.repeat([3, 6], [3, 1, -1, 3, -6])\n\t.blend(src(o3)\n\t\t.scale(1.2).rotate(midi(\"red\", {min: -Math.PI+0.1, max: Math.PI-0.1})))\n\t.sub(src(o3).scale(1.1).mask(shape([10, 100].smooth()).scale(() => 3 * Math.sin(time/4))))\n\t.brightness(midi(\"yellow\", {min: -0.001, max: 1}))\n\t.saturate(1.2)\n\t.hue(() => 1)\n\t.out(o3)\n\nrender(o3)",
"bpm": 0,
"midi": true
},
Expand Down

0 comments on commit e570119

Please sign in to comment.