Hand Cranked Whitney Music Box

Seele01-Flash
By
Hand Cranked Whitney Music Box is a unique interactive musical puzzle game where you create beautiful pentatonic melodies by turning a virtual hand crank. Experience the mesmerizing combination of music and motion graphics in this browser-based musical instrument.

Prompt

MODEL: Seele01-Flash
Please use Three.js to generate a **mobile-first game** with the theme "Hand Cranked Whitney Music Box". Please read the following detailed game design requirements first, and then generate the code accordingly: ### 1. Assets & Environment * **Visual Style**: A minimalist, generative art style inspired by John Whitney's "Digital Harmony". Use a dark, void-like background (hex: #111111) to make the elements pop. * **The Music Box Mechanism**: Create a central visualization consisting of 48 distinct spheres arranged in a spiral or concentric circles on a 2D plane within 3D space. Each sphere should have a unique color based on the HSL spectrum (forming a rainbow gradient from center to edge). * **The Crank**: Model a 3D "Crank Handle" attached to the side or bottom of the screen. It should look tactile, composed of a metal arm and a wooden or plastic knob. * **The Trigger Line**: A distinct, glowing vertical line (or radius line) that serves as the "playhead." When a sphere crosses this line, it triggers an event. * **Performance**: Use `THREE.InstancedMesh` for the 48 spheres to ensure 60FPS on mobile devices. Use simple Lambert materials for lighting efficiency. ### 2. Audio Requirements * **Synthesis**: Use the Web Audio API directly (no external large assets). Create a polyphonic synthesizer using simple sine or triangle waves to mimic a celesta or music box tone. * **Scale**: Map the 48 spheres to a **Pentatonic Scale** spanning several octaves. The inner spheres play lower pitches, and outer spheres play higher pitches. * **Sound Logic**: A note must play *only* when a sphere intersects the "Trigger Line." * **Envelope**: Short attack, medium decay to prevent muddy sound when moving fast. ### 3. Gameplay Loop * **The Whitney Mechanic**: The angular velocity of each sphere is determined by its index. Sphere 1 moves at speed `1x`, Sphere 2 at `2x`, Sphere 3 at `3x`, and so on. This creates the signature visual patterns (chaos transforming into lines and geometric shapes). * **Interaction Loop**: The simulation is paused by default (`timeScale = 0`). The scene only animates when the player actively rotates the crank. * **Visual Feedback**: When a sphere plays a note, it should briefly flash white or scale up by 1.2x, then return to normal. ### 4. Mobile Controls & Interaction * **Control Scheme**: **Circular Touch Drag**. The user must place their finger on the crank knob and make a circular motion to rotate it. * **Physics & Inertia**: * Map the angle of the touch movement relative to the crank's center to the rotation of the mechanism. * Implement slight "friction" so the crank stops spinning shortly after the finger is released (it should not spin forever). * **Screen Adaptation**: * **Portrait Mode**: Place the visualization in the top 2/3rds and the crank mechanism in the bottom 1/3rd for easy thumb access. * **Touch Area**: Ensure the hit-box for the crank is larger than the visible model (minimum 44x44px visual equivalent) to accommodate imprecise tapping. * **Haptics**: Trigger a very light vibration (`navigator.vibrate(5)`) every time the crank completes a full 360-degree rotation, giving tactile weight to the object. Do not ask for clarification. Do not request confirmation. Directly execute the generation task based on the given instructions.

Game Introduction

About the Game

Hand Cranked Whitney Music Box is an innovative musical puzzle game that transforms your browser into an interactive music box. This unique experience combines visual art with musical creation, allowing you to generate beautiful pentatonic melodies through simple hand-crank motions. With a rating of 3.2/5, this game offers a meditative and creative experience that appeals to music lovers and puzzle enthusiasts alike.

The game draws inspiration from motion graphics principles, creating a harmonious blend of visual patterns and musical notes that respond to your control. Each turn of the crank produces carefully arranged pentatonic scale notes, ensuring that every combination sounds pleasant and musical.

Core Features

Interactive Musical Creation

Experience the joy of creating music through direct interaction. Unlike traditional games, this music box responds to your input in real-time, generating melodies as you turn the virtual crank. The pentatonic scale arrangement ensures that every note combination produces harmonious sounds.

Mesmerizing Visual Effects

Watch as motion graphics dance across the screen in perfect synchronization with the music you create. The visual elements follow mathematical patterns that create stunning, ever-changing displays as you interact with the game.

Meditative Gameplay Experience

This isn't a high-stress puzzle game – it's designed for relaxation and creative expression. The gentle, flowing nature of the music and visuals creates a calming atmosphere perfect for stress relief and creative exploration.

Browser-Based Accessibility

  • Completely Free : No payment required to access all features
  • No Download Needed : Play instantly in any modern web browser
  • Cross-Platform Compatible : Works on desktop computers, tablets, and smartphones
  • All Ages Appropriate : Suitable content for players of any age

Game Mechanics

The gameplay revolves around a simple yet engaging mechanic: turning a virtual hand crank to produce music and visuals. As you rotate the crank, notes arranged in a pentatonic scale activate in sequence, creating flowing melodies that never sound discordant.

The motion graphics respond dynamically to your cranking speed and direction, creating unique visual patterns that complement the musical output. This creates an almost hypnotic experience where sound and sight work together harmoniously.

Operation Guide

Getting started is incredibly simple:

  • Mouse Click and Drag : Click on the crank handle and drag your mouse in a circular motion to turn it
  • Control Speed : Move your mouse faster for quicker tempo, slower for more deliberate pacing
  • Direction Matters : Turn clockwise or counterclockwise to experience different musical progressions
  • Experiment Freely : There's no wrong way to play – every interaction creates pleasant musical results

The intuitive control scheme means you can start creating music immediately without any learning curve or complex instructions.

Why Play This Game

Hand Cranked Whitney Music Box offers a unique gaming experience that stands apart from traditional puzzle games. It's perfect for:

  • Creative Expression : Generate your own musical compositions through intuitive interaction
  • Stress Relief : The meditative nature provides a calming break from daily pressures
  • Musical Exploration : Learn about pentatonic scales and musical harmony through play
  • Artistic Appreciation : Enjoy the beautiful marriage of visual art and musical creation
  • Quick Sessions : Perfect for short breaks or extended creative sessions

Whether you're a music enthusiast, art lover, or simply someone looking for a unique and relaxing gaming experience, this musical puzzle game offers something special that you won't find elsewhere.

Frequently Asked Questions (FAQ)