Skip to content

spenceryang/melodic-aviator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Melodic Aviator 🎵✈️

A musical interactive game where obstacles generate melodies and hand gestures trigger percussion. Features progressive polyphonic composition through accumulated ostinatos.

🎮 Game Concept

Melodic Aviator is a Flappy Bird-inspired musical experience where:

  • Obstacles generate melodies - Each pipe plays a note based on its vertical position
  • Hand gestures trigger percussion - Upward hand flicks make the bird jump with percussive sounds
  • Scores become ostinatos - Each game session creates a repeating musical pattern that layers into the next
  • Progressive composition - The more you play, the richer the polyphonic texture becomes

🎼 Musical Features

Modes & Scales

The game cycles through 7 different musical modes every 10 measures:

  • Major Pentatonic
  • Natural Minor
  • Major
  • Dorian
  • Phrygian
  • Whole Tone
  • Japanese Pentatonic

Dynamic Harmony

  • Measures 0-3: Monophonic melody
  • Measures 4-7: Diatonic thirds added
  • Measures 8+: Full triadic harmony with sustained pads

Persistent Ostinatos

  • Each completed game generates a unique melodic motif based on your score
  • Motifs are stored and play as looping ostinatos in subsequent games
  • Creates evolving polyphonic textures across multiple play sessions
  • Use "Clear Composition" to reset all accumulated layers

🎮 Controls

Standard Controls

  • Click / Spacebar - Jump / Start game
  • SHIFT + R - Clear all accumulated ostinatos

Hand Tracking (Optional)

  1. Click "📷 Enable Hand Tracking" button
  2. Allow camera permissions
  3. Make upward flicking gestures with your hand to jump

🚀 Getting Started

Prerequisites

  • Node.js (v16 or higher)
  • npm or yarn

Installation

# Clone the repository
git clone https://github.com/yourusername/melodic-aviator.git
cd melodic-aviator

# Install dependencies
npm install

# Start development server
npm run dev

The game will open at http://localhost:3000

Build for Production

npm run build
npm run preview

🛠️ Technologies

  • React - UI framework
  • Tone.js - Web Audio synthesis and scheduling
  • MediaPipe Hands - Hand tracking via webcam
  • Vite - Build tool and dev server

🎨 Design Philosophy

The game features a retro-futuristic synthwave aesthetic with:

  • Deep purple/blue gradient backgrounds
  • Neon glows and animated grids
  • Rainbow spectrum obstacles mapped to musical frequencies
  • Space Mono monospace font for digital feel

📝 Musical Terminology

  • Ostinato - A repeating musical phrase
  • Polyphonic texture - Multiple independent melodic lines
  • Modal center - The tonal framework (scale/mode)
  • Voice leading - Smooth harmonic progression between chords
  • Diatonic thirds - Harmony notes from within the scale

🎯 Game Tips

  1. Start simple - master the basic controls first
  2. Each game adds musical complexity
  3. Higher scores create longer, more complex ostinatos
  4. Listen to how the modes shift every 10 measures
  5. Use the hand tracking for a more expressive experience
  6. Clear the composition when it gets too dense

🤝 Contributing

This is a personal project, but feel free to fork and experiment!

📄 License

MIT License - feel free to use this for educational purposes or personal projects.

🙏 Acknowledgments

  • Inspired by classic Flappy Bird mechanics
  • Musical concepts from minimalist composition and game music design
  • Built with the amazing Tone.js library
  • Hand tracking powered by MediaPipe

Enjoy creating your own musical compositions through gameplay! 🎵

About

Musical game with hand tracking - obstacles generate melodies, gestures trigger percussion

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors