Skip to content
Finalist

Beat Drop

## What It Does

Core trick

Crowd votes on phone-displayed music words every 16 beats, and the winning words update Lyria RealTime's live audio stream.

Tags

Description

## What It Does
shresthkapoor7/beat-drop★ 00 forksJavaScriptCreated Feb 28, 2026 · last push Feb 28, 2026

README excerpt

# Beat Drop

A multiplayer rhythm game built on **Lyria 3** — Google's latest real-time music generation model. Players hit beats on their phones while the crowd collectively votes to reshape the live AI-generated soundtrack, beat by beat.


![System Architecture](images/sys-arch.png)
![Game Screen](images/game-screen.png)
![Mobile Controller](images/mobile.jpg)
![Game End](images/game-end.png)

## What It Does

- **Rhythm gameplay** — arrows scroll on the host screen; players tap their phones to hit beats
- **Live music** — Lyria RealTime streams AI-generated music continuously to the host
- **Crowd voting** — every 16 beats, each phone shows 5 random music words; players vote; the winning words update the music immediately
- **3D word cloud** — a Three.js visualization on the host screen shows all 158 possible words, lighting up and glowing as votes come in
- **AI insults** — Gemini Flash generates a custom roast when a player misses a beat


## Vote → Music Flow

```
Phone taps word
  → server tallies panelVotes
  → host sidebar lights up (live)
  → 4-beat timer expires
  → applyVoteResult():
      top 5 words → weighted prompts (proportional to vote count)
      winner word → density / brightness / guidance preset
      → lyriaSession.setWeightedPrompts()
      → lyriaSession.setMusicGenerationConfig()
      → music shifts
```

## Stack

| Layer | Tech |
|---|---|
| Server | Node.js, Express, Socket.io |
| Game engine | Phaser 3 |
| 3D word cloud | Three.js + OrbitControl

Team