π¦ Yee Piano πΉ
By yee
11 viewsΒ·1mo agoΒ·Recreated 1 times
Yee Piano πΉ
A single-file playable piano in the same picture-book style as Jumping Yee, Watermelon Game, and Snake (warm brown outlines, pastel fills, rounded panels, Fredoka + Jua type). A big round Yee β the singing green-dinosaur meme β sits in the middle, and a keyboard runs along the bottom. Tap a key and Yee sings that note: the face replays and a pitch-shifted "Yee" sounds at the key's pitch.
It reuses the embedded WebM clip from Jumping Yee β the same base64 data:video/webm (VP9 video + Opus audio) β for both the animated face and the instrument's voice.
How to Play
- Tap any key β Yee's face replays and sings that note.
- White and black keys span one octave (C β C). Each key is "Yee" pitched to that note.
- β / βΆ shift the whole keyboard down/up an octave (Oct 2β6).
- Drag across the keys for a glissando; press several keys for chords (polyphonic).
- On a computer, play with A W S E D F T G Y H U J K and shift octaves with β / β.
How the sound works
- The clip's Opus audio is decoded once into a Web Audio buffer (~0.42 s, stereo, 48 kHz).
- Every key press spawns a fresh
AudioBufferSourceNodewhoseplaybackRatetransposes the sample: rate = 2^((midi β E4)/12), so E4 plays at the clip's natural pitch and other keys bend up or down. Higher notes are shorter and chirpier; lower notes are longer and deeper β classic sample-piano behavior. - Because each note is its own voice, the piano is polyphonic β chords and overlapping notes ring together.
- A short attack ramp keeps fast retriggers from clicking.
The face
A live WebM clip clipped to a circle, with a brown outline like the bird body in the sibling games:
- The face is muted β all sound comes from the pitched buffer β and replays from the start on every key press.
- The video's own playback rate follows the note's pitch (clamped 0.5β2.2Γ), so Yee visibly sings faster on high notes, slower on low ones.
- Each press pops the face (a squash-and-stretch bounce) and flashes the note's rainbow color as a glow + tint (hue mapped across the 12 semitones).
Design
- Portrait (9:16) β fits a phone with no scrolling.
- Sky-blue stage panel, dark-brown outlines on every shape, fully rounded corners.
- Yellow + orange pressable octave buttons; flat π / π mute and π home controls.
- π¦ Yee Piano πΉ title; Fredoka + Jua fonts.
Tech
- Single HTML file β no build, no external assets (one Google Fonts link).
- The clip is embedded inline as a base64
data:video/webmURI, shared by the<video>face and the audio decode. - Web Audio API for pitch-shifted, polyphonic playback; the AudioContext is created on the first gesture, with the clip bytes pre-fetched at load to minimize first-note latency.
- DOM keyboard with Pointer Events (touch + mouse, glissando via
elementFromPoint) plus a computer-keyboard mapping. No canvas needed.
Loading comments...
Other Codes
No other codes yet
