{"id":"piano-keys","version":"1.0.0","title":"Piano Keys","summary":"A two-octave piano playing a repeating tune: keys press down and glowing notes and colour rings rise from them. Loops perfectly.","kind":"object","target":"three","collections":["satisfying","hypnotic-loops","product-reveals"],"tags":["piano","keyboard","music","notes","sound waves","keys","melody","glow","studio","loop","3d"],"loopable":true,"motion":"procedural","durationSeconds":16,"status":"published","media":{"poster":"https://aipixelwizard.com/media/piano-keys/1.0.0/poster.webp","preview":"https://aipixelwizard.com/media/piano-keys/1.0.0/preview.mp4","sample":"https://aipixelwizard.com/media/piano-keys/1.0.0/sample.mp4","sampleBytes":2230811,"sampleNote":"Pre-rendered with the default settings. Customised settings must be exported locally (npm run render)."},"urls":{"page":"https://aipixelwizard.com/visuals/piano-keys","manifest":"https://aipixelwizard.com/api/v1/visuals/piano-keys/versions/1.0.0","agentMd":"https://aipixelwizard.com/registry/piano-keys/1.0.0/agent.md","files":"https://aipixelwizard.com/registry/piano-keys/1.0.0/","demo":"https://aipixelwizard.com/registry/piano-keys/1.0.0/index.html"},"description":"A keyboard playing itself. A two-octave piano of ivory and ebony keys plays a little tune that repeats every loop: each note presses its key down on its hinge, and as it sounds a glowing note rises from the key on a lazy sway, followed by rings of colour that spread as they climb and fade, hue by pitch. Choose the tune (arpeggio, scale or chords), the colours of the rising sound (rainbow, aurora, ember or mono), how high the sound climbs, the finish of the piano (ivory, rose or midnight), the backdrop colour and whether the camera sways.","role":"Object (3D, three.js): a musical showpiece that plays itself, for music, learning and creative content.","useCases":["A music lesson, studio or label scene","A creative or relaxing background","A visual for piano or lofi tracks"],"synonyms":["piano keyboard","playing piano","music keys","keyboard animation","musical notes rising","self-playing piano"],"digest":"c69fb8a50445390ac2c447fbe99c61026fcfe786792301e79f312b81b7ef1a07","implementation":{"target":"three","runtime":"browser","language":"javascript","module":"esm","entry":"src/piano-keys.js","exports":[{"name":"createPiano","signature":"createPiano({ tune?, palette?, rise?, body? }) => { group, setProgress(progress), dispose() }","description":"The keyboard with its casing and rising notes and rings, about 14 wide, resting on y = 0; needs an environment map."},{"name":"TUNES","signature":"TUNES: { arpeggio, scale, chords }","description":"Lists of [step, white key] notes on 32 steps per loop."},{"name":"PALETTES","signature":"PALETTES: { rainbow, aurora, ember, mono }","description":"Colours of the rising sound by pitch."}],"reusable":["src/piano-keys.js"],"demo":"demo.js","harness":"index.html"},"dependencies":[{"id":"three","version":"0.185.1","scope":"source","reason":"Renderer, geometry and shader materials."},{"id":"chrome-material","version":"1.1.0","scope":"demo","reason":"Studio environment light, backdrop and contact shadow."},{"id":"apw-runtime","version":"1.0.0","scope":"demo","reason":"Demo harness."}],"uses":[],"usedBy":[],"params":[{"key":"tune","label":"Tune","type":"select","default":"arpeggio","options":[{"value":"arpeggio","label":"Arpeggio"},{"value":"scale","label":"Scale"},{"value":"chords","label":"Chords"}]},{"key":"palette","label":"Sound colours","type":"select","default":"rainbow","options":[{"value":"rainbow","label":"Rainbow"},{"value":"aurora","label":"Aurora"},{"value":"ember","label":"Ember"},{"value":"mono","label":"Mono"}]},{"key":"rise","label":"Rise","type":"number","min":0.5,"max":1.6,"step":0.1,"default":1},{"key":"body","label":"Piano","type":"select","default":"ivory","options":[{"value":"ivory","label":"Ivory and ebony"},{"value":"rose","label":"Rose"},{"value":"midnight","label":"Midnight"}]},{"key":"background","label":"Backdrop","type":"color","default":"#11131c"},{"key":"orbit","label":"Camera sway","type":"boolean","default":true}],"presets":[{"id":"default","label":"Arpeggio, rainbow","params":{}},{"id":"chords","label":"Chords, aurora","params":{"tune":"chords","palette":"aurora","background":"#0c1620"}},{"id":"scale","label":"Scale, ember","params":{"tune":"scale","palette":"ember","body":"rose","background":"#1c1218"}},{"id":"mono","label":"Mono, midnight","params":{"palette":"mono","body":"midnight","rise":1.4,"background":"#0e1016"}}],"output":{"width":1080,"height":1080,"fps":30,"durationSeconds":16,"posterSeconds":4,"alpha":false,"motion":"procedural","loop":{"seamless":true,"cycleSeconds":16,"method":"The tune is a fixed list of notes on 32 steps per loop; each key's press and each rising note and ring is a function of the time since its note was struck, wrapping round the loop, and the camera sway is a sine of the loop, so the last frame meets the first."},"seed":null},"composition":{"inputs":"Time within the loop; the tune, sound colours, rise, piano finish, backdrop and camera sway.","outputs":"A full frame rendered in 3D with a studio environment.","coordinates":"Fourteen white keys 1 wide and 5 long run along x from −6.5 to 6.5, hinged at z = −2.5; the casing stands behind them; sound rises from y ≈ 1 to y ≈ 8.","lighting":"A warm key light with a shadow map, a shadow-catching floor and the studio environment; the rising sound is self-lit and additive.","timing":"setProgress(progress) presses each struck key and places each note and ring; frames render in any order.","compatibleWith":["chrome-material","orbit-camera","kinetic-title","number-reveal"],"notes":["Black keys are present but not struck by the built-in tunes."]},"reuse":["Music lesson: Arpeggio, rainbow.","Calm: Chords, aurora.","Warm: Scale, ember."],"integration":{"newProject":"Create a WebGLRenderer with a studio environment and a shadow-casting light, add createPiano().group and call piano.setProgress(progress) each frame; export TUNES to write your own.","existingProject":"Copy src/piano-keys.js; add the group to your scene with an environment map."},"performance":{"notes":"14 white and 10 black keys, a casing and up to about 130 additive instanced rings and notes with a shadow map: about a millisecond a frame on an integrated Intel GPU.","limits":"Software WebGL renders in about a second a frame."},"limitations":["There is no audio: the notes are visual only.","The built-in tunes strike white keys only."],"license":{"spdx":"MIT","notice":"Copyright (c) 2026 AI Pixel Wizard. Released under the MIT License. See LICENSE in this folder.","thirdParty":[]},"rights":{"approvedForPublicRelease":true},"provenance":"Adapted from the owner's threejs-sketches/objects-scenes/piano-keys (MIT) and rebuilt for AI Pixel Wizard in October 2026 as an original studio object: a hinged two-octave keyboard playing a fixed note list with glowing notes and expanding rings by the time since each strike, on an exact loop.","changelog":[{"version":"1.0.0","date":"2026-10-05","notes":"Initial release."}],"verification":{"testedOn":"2026-10-06","inputs":{"piano-keys@1.0.0":"c69fb8a50445390ac2c447fbe99c61026fcfe786792301e79f312b81b7ef1a07","three@0.185.1":"664ca387e5fab46ff2daaa6895e1d015426850891af5ea5082cbbcc3985b068c","chrome-material@1.1.0":"ecb41776bfc1ee88997604f916a5ffe833f971d7edcc97c855697a5792d6f1dd","apw-runtime@1.0.0":"5be859cdac74823ba0bcc32c6daf06688a871104d24db5d4ceaffffd84d7c40d"},"environment":"Chrome 154.0.8037.97 headless on Linux 7.0.0-38-generic (x64), Node 22.14.0","renderer":"WebGL 2 via SwiftShader (software)","width":1080,"height":1080,"fps":30,"frames":480,"renderSeconds":549.4,"loopCheck":{"checked":true,"seamless":true,"maxDifference":0,"note":"Frame 0 vs end state (progress 1): mean |Δ| 0.0000, max |Δ| 0 of 255."},"determinism":{"checked":true,"identical":true},"errors":[],"media":{"poster":"/media/piano-keys/1.0.0/poster.webp","preview":"/media/piano-keys/1.0.0/preview.mp4","sample":"/media/piano-keys/1.0.0/sample.mp4","sampleBytes":2230811}},"files":[{"path":"LICENSE","size":1072,"sha256":"8a5f3a96f07e11522ec4bdd0a583356f99bad1245920f9709cee09b995a45153","contentType":"text/plain; charset=utf-8","url":"https://aipixelwizard.com/registry/piano-keys/1.0.0/LICENSE"},{"path":"asset.json","size":8112,"sha256":"bbf24d5ff62a2dd73d754aff21831d82cdc943c4e11a618bed175799121c4902","contentType":"application/json; charset=utf-8","url":"https://aipixelwizard.com/registry/piano-keys/1.0.0/asset.json"},{"path":"demo.js","size":2361,"sha256":"b4325ac373b7c6c7c11e603ad5bb73207abfadb3498a793f8821827a3de6d291","contentType":"text/javascript; charset=utf-8","url":"https://aipixelwizard.com/registry/piano-keys/1.0.0/demo.js"},{"path":"index.html","size":524,"sha256":"fa73798bf50f1a2523ef0f0365ed4b0f4863dbce5ffeab5ceba9d762b933f8e9","contentType":"text/html; charset=utf-8","url":"https://aipixelwizard.com/registry/piano-keys/1.0.0/index.html"},{"path":"src/piano-keys.js","size":7732,"sha256":"6f5c19bc762c8fe10886760245cf525d929ab09eedd5d777410e5f6f07687ce7","contentType":"text/javascript; charset=utf-8","url":"https://aipixelwizard.com/registry/piano-keys/1.0.0/src/piano-keys.js"}],"warnings":[]}