A comprehensive guide to how each room works, including all the mechanics, tricks, and techniques for creating engaging demos.
A 10×4 grid that mirrors the keyboard layout:
Row 0: 1 2 3 4 5 6 7 8 9 0
Row 1: Q W E R T Y U I O P
Row 2: A S D F G H J K L ;
Row 3: Z X C V B N M , . /
Each cell displays its key character and can be colored.
Every key press cycles through 4 states:
| Press # | Color | Hex | Index |
|---|---|---|---|
| Start | Off | (default) | -1 |
| 1st | Purple | #da77f2 | 0 |
| 2nd | Blue | #4dabf7 | 1 |
| 3rd | Red | #ff6b6b | 2 |
| 4th | Off | (default) | -1 |
| 5th | Purple | (repeats) | 0 |
Key insight: Colors PERSIST. Press a key once = purple. Press again = blue. Press again = red. Press again = off.
To draw a picture: Press each key exactly ONCE to make it purple. Avoid pressing the same key twice unless you want a different color.
To make multi-colored patterns:
- Press some keys once (purple)
- Press other keys twice (blue)
- Press other keys three times (red)
Pitch by row (frequency increases left to right within each row):
| Row | Keys | Frequency Range | Character |
|---|---|---|---|
| QWERTY | Q W E R T Y U I O P | 392-988 Hz | Bright, high |
| ASDF | A S D F G H J K L | 196-494 Hz | Warm, middle |
| ZXCV | Z X C V B N M | 98-247 Hz | Rich, low |
Within each row, left keys are lower pitch, right keys are higher:
A= 196 Hz (lowest on row)L= 494 Hz (highest on row)
Sound character: Full marimba with resonator tube harmonics, soft mallet attack.
| Key | Sound | Character |
|---|---|---|
| 0 | Gong | Deep, sustained |
| 1 | Kick drum | Punchy, low |
| 2 | Snare | Crispy, mid |
| 3 | Hi-hat | Bright, short |
| 4 | Clap | Hand-like |
| 5 | Cowbell | Metallic, fun |
| 6 | Woodblock | Hollow tick |
| 7 | Triangle | Ding, sustain |
| 8 | Tambourine | Jingly |
| 9 | Bongo | Mid-range drum |
Important: The grid is only 10 wide × 4 tall. For a proper smile (curving UP), the mouth's ENDS must be HIGHER (lower row number) than the CENTER.
To draw a smiley face (smile curves UP):
Col: 0 1 2 3 4 5 6 7 8 9
. . . 4 . 6 . . . . ← Row 0: Eyes (4 and 6)
. . . . T . . . . . ← Row 1: Nose (T)
. . D . . . J . . . ← Row 2: Smile CORNERS (UP)
. . C V B N M . . . ← Row 3: Smile BOTTOM (DOWN)
Keys to press: 4, 6 (eyes), T (nose), D, J (smile corners), then C, V, B, N, M (smile bottom)
This creates an upward-curving smile because the corners (D, J) are ABOVE the bottom (CVBNM)!
To draw a simple house:
Col: 0 1 2 3 4 5 6 7 8 9
. . . 4 5 6 . . . . ← Row 0: Roof peak
. . . R . Y . . . . ← Row 1: Roof sides
. . . F G H . . . . ← Row 2: Upper walls
. . . V B N . . . . ← Row 3: Lower walls + door (B)
Keys: 4, 5, 6, R, Y, F, G, H, V, B, N
Then press B twice more to make the door blue!
To make alternating colors:
- Press row 1 keys once (purple eyes)
- Press row 3 keys twice each (blue smile)
Ascending scale (sounds good): Z, X, C, V, B, N, M
Descending scale: M, N, B, V, C, X, Z
Chord (multiple keys at once): Any keys pressed rapidly together blend into a chord.
Melodic patterns:
- Arpeggios:
A,D,G,K(skipping keys) - Octave jumps:
AthenQ(same column, different row)
Switch away from the Music room and back, or use ClearAll() in demo script to reset all colors to off.
- Cursor: Purple vertical bar
▌ - Typing: Characters appear at cursor, cursor moves right
- Auto-wrap: At right edge, wraps to next line
- Background: Subtle tint based on keyboard row (15% strength)
- Cursor: 3×3 blinking ring of box-drawing characters
- Typing: Stamps colored blocks and advances cursor
- Drawing: Hold Space + arrows to draw lines
- Toggle: Press Tab to switch between modes
| Row | Keys | Color Family | Tint (text mode) | Paint colors |
|---|---|---|---|---|
| Numbers | 1 2 3 4 5 6 7 8 9 0 | Grayscale | None | White → Black |
| QWERTY | Q W E R T Y U I O P | Red | Dark red | Light red → Dark red |
| ASDF | A S D F G H J K L | Yellow | Gold/mustard | Light gold → Dark gold |
| ZXCV | Z X C V B N M | Blue | Dark blue | Light blue → Dark blue |
Left keys = lighter, right keys = darker:
QWERTY (Red family):
Q= #BF6C6C (light salmon)T= #A32C2C (medium red)P= #801C1C (dark burgundy)
ASDF (Yellow family):
A= #BFAF40 (light gold)F= #AA7F40 (medium gold)L= #875F40 (dark brown-gold)
ZXCV (Blue family):
Z= #6C8CBF (light periwinkle)V= #3C5CAA (medium blue)M= #1C3495 (dark navy)
Number row (Grayscale):
1: #FFFFFF (white) 6: #606060
2: #E0E0E0 7: #404040
3: #C0C0C0 8: #202020
4: #A0A0A0 9: #101010
5: #808080 (gray) 0: #000000 (black)
When you paint OVER an existing painted cell, the colors MIX using realistic paint physics (Kubelka-Munk spectral mixing):
| First Color | Second Color | Result |
|---|---|---|
| Yellow (F) | Blue (C) | Green |
| Red (R) | Blue (C) | Purple |
| Red (R) | Yellow (F) | Orange |
| Any color | Same color | Same color |
To mix colors in a demo:
- Draw with first color (e.g., yellow
F) - Draw OVER the same cells with second color (e.g., blue
C) - The overlapping cells become green!
In text mode, backgrounds get subtle tints (15%) but don't mix. Typing over an existing cell replaces the tint.
- Up/Down/Left/Right: Move cursor one cell
- Diagonal: Hold two arrows simultaneously
- Edge behavior: Cursor stops at edges (no wrapping)
To get to the center of the canvas:
# Assuming ~80 wide × ~24 tall canvas
# Move right ~40 times and down ~12 times
for _ in range(40):
PressKey("right")
for _ in range(12):
PressKey("down")Or use a helper in the demo script to estimate center based on typical terminal size.
Moves down one row, keeps column position. Useful for vertical typing/drawing.
- Single press: Erase character, fade background 50%
- Hold 1+ second: Clear entire canvas
- Enter paint mode (Tab)
- Select a color (press a letter key with Shift to select without stamping)
- Press and hold Space
- While holding Space, press arrow keys to paint in that direction
- Release Space to stop drawing
Each arrow press while Space is held:
- Moves cursor in that direction
- Paints the cell you moved INTO
Hold an arrow key while typing to advance in that direction instead of right:
- Hold Left + type → text goes leftward
- Hold Down + type → text goes downward
In paint mode:
G= Select gold color AND stamp at cursorShift+G= Select gold color, DON'T stamp
Use this to "load your brush" before drawing a line.
The 3×3 blinking ring shows:
- Your current brush color (in the box-drawing characters)
- What's under the cursor (the center "hole")
- Paint a colorful background
- Press Tab to switch to text mode
- Type text over the painted area
- Text appears with readable foreground on colored background
2 + 2 → 4 (with dots: ••••)
3 * 4 → 12 (×4 displays as multiplication)
10 / 2 → 5 (÷2 displays as division)
(2 + 3) * 4 → 20 (parentheses work)
cat → 🐱
3 cats → 🐱🐱🐱
cats → 🐱🐱 (bare plural = 2)
cat + dog → 🐱 🐶
3 * 4 cats → 12 🐱 (with label + 12 cats displayed)
red + blue → Purple swatch (Kubelka-Munk mixing)
red + yellow → Orange swatch
blue + yellow → Green swatch
3 red + 1 blue → Weighted mix (more red)
2 + 3 cats → 5 🐱 (math attaches to emoji)
red + 3 cats → Red swatch + 3 🐱
what is 2 + 3 → "what is 5" (text preserved)
| Input | Effect |
|---|---|
cat! |
Shows 🐱, speaks "cat" |
!cat |
Same (! anywhere works) |
say cat |
Speaks "cat" |
2 + 3! |
Shows 5, speaks "2 plus 3 equals 5" |
| Enter (empty) | Repeats last result aloud |
- Simple word: Just the word ("cat")
- Math: "input equals result" ("2 plus 3 equals 5")
- Emoji math: "3 times 4 cats equals 12 cats"
- Colors: The resulting color name ("purple")
Same Kubelka-Munk algorithm as the Art room:
| Mix | Result |
|---|---|
| red + blue | Purple |
| red + yellow | Orange |
| blue + yellow | Green |
| red + blue + yellow | Brown-ish |
Weighted mixing: 3 red + 1 blue leans more red than 1 red + 1 blue.
- Appears after typing 2+ characters
- Shows matching emojis and colors
- Press Space to accept suggestion
- Shows both emoji icon and color swatch for words like "orange" (both 🍊 and color)
hello! → Shows greeting, speaks it
red + blue → Purple swatch (magic!)
3 + 2 cats → 5 🐱🐱🐱🐱🐱
blue + yellow → Green swatch
what is 5 * 5 → "what is 25" with 25 dots
red + blue → Purple
blue + yellow → Green (realistic paint mixing!)
red + yellow → Orange
3 cats + 2 dogs → 🐱🐱🐱 🐶🐶
5 * 2 bananas → 10 🍌 (with visualization)
(2 + 3) apples → 5 🍎 (parentheses trigger label)
TypeText("hello!", delay_per_char=0.08)Types characters one at a time. Works in any mode.
PressKey("enter", pause_after=0.5)
PressKey("space", count=2) # Toggle paint mode in Art
PressKey("space") # Accept autocomplete or type space
PressKey("up") # Navigate/scrollPlayKeys(
sequence=['e', 'i', 'a', 'l', 'c', 'v', 'b', 'n'],
seconds_between=0.5,
pause_after=0.5,
)Special sequence items:
'a'= single key['a', 's']= chord (simultaneous)None= rest (silence)
DrawPath(
directions=['right', 'right', 'down', 'down', 'left'],
color_key='f', # Yellow (ASDF row)
delay_per_step=0.1,
)Automatically enters paint mode if needed.
SwitchMode("music") # F2
SwitchMode("play") # F1
SwitchMode("art") # F3Pause(1.5) # Wait 1.5 secondsClearAll() # Reset all modes to clean statePlan your key sequence on paper first:
Grid planning:
1 2 3 4 5 6 7 8 9 0
Q W E R T Y U I O P
A S D F G H J K L ;
Z X C V B N M , . /
Mark which keys to press for your shape.
Assign colors by press count.
- Position first: Use multiple PressKey("down")/("right") to get to starting position
- Draw shapes: Use DrawPath with directions
- Mix colors: Draw overlapping paths with different color_keys
- Add text: Press Tab to exit paint mode, then TypeText
The most impressive demos:
- Color mixing (
red + blue→ purple) - Emoji math with visualization (
5 * 3 cats) - Speech (
hello!with sound)
seconds_between controls the gap between each key press:
seconds_between=0.5= half a second per noteseconds_between=0.33= fastseconds_between=0.67= slow, dramatic
To get different colors on different keys:
# First set of keys: press once (purple)
PlayKeys(sequence=['e', 'i'], seconds_between=0.6)
# Second set: press twice (blue)
PlayKeys(sequence=['a', 'a', 'l', 'l'], seconds_between=0.4)
# Third set: press three times (red)
PlayKeys(sequence=['c', 'c', 'c', 'n', 'n', 'n'], seconds_between=0.3)# Draw yellow square
DrawPath(directions=['right', 'right', 'right'], color_key='f')
PressKey("down")
PressKey("left")
PressKey("left")
PressKey("left")
DrawPath(directions=['right', 'right', 'right'], color_key='f')
# Draw blue stripe through it (creates green where they overlap!)
PressKey("up")
PressKey("left")
DrawPath(directions=['right', 'right', 'right', 'right'], color_key='c')1 2 3 4 5 6 7 8 9 0 ← Percussion sounds
Q W E R T Y U I O P ← High marimba (392-988 Hz)
A S D F G H J K L ; ← Mid marimba (196-494 Hz)
Z X C V B N M , . / ← Low marimba (98-247 Hz)
1-0: Grayscale (white to black)
QWERTY: Red family (light to dark)
ASDF: Yellow family (light to dark)
ZXCV: Blue family (light to dark)
Red + Blue = Purple
Red + Yellow = Orange
Blue + Yellow = Green
Esc (tap): Open room picker (Play, Music, Art)
Esc (hold 1s): Parent mode
F1: Play room
F2: Music room
F3: Art room
Tab (in Art): Toggle text/paint mode