Skip to content

CalLeeLQY/Action2Music

Repository files navigation

Action2Music Frontend

A real-time music generation web application using pose detection and computer vision to turn body movements into musical expressions.

🚀 Project Status: Stage 1 Complete

Project Foundation Setup Complete

📋 What's Implemented

✅ Core Infrastructure

  • Vite + React 18 + TypeScript - Modern development stack
  • Tailwind CSS + Headless UI - Responsive UI framework
  • ESLint + Prettier + Husky - Code quality and formatting
  • Vitest + Testing Library - Comprehensive testing setup
  • Zustand - State management
  • React Query - Data fetching and caching

✅ Dependencies Installed

  • MediaPipe (@mediapipe/holistic, @mediapipe/camera_utils, @mediapipe/drawing_utils)
  • Tone.js - Web audio synthesis
  • Development Tools - Complete toolchain for modern React development

✅ Project Structure

src/
├── components/          # React UI components
│   ├── common/         # Reusable UI components (Button, LoadingSpinner)
│   ├── camera/         # Camera-related components
│   ├── audio/          # Audio-related components
│   └── dashboard/      # Main control panel components
├── core/               # Core functionality modules
│   ├── vision/         # Computer vision (MediaPipe integration)
│   ├── audio/          # Audio processing (Tone.js integration)
│   ├── mapping/        # Action-to-music mapping engine
│   └── performance/    # Performance monitoring
├── hooks/              # React hooks
├── stores/             # Zustand state management
├── types/              # TypeScript type definitions
├── utils/              # Utility functions and constants
└── styles/             # CSS and styling

✅ Configuration Files

  • TypeScript - Strict configuration with path aliases
  • Tailwind CSS - Custom theme with dark mode support
  • Vite - Optimized build configuration
  • ESLint/Prettier - Consistent code formatting
  • Husky + lint-staged - Pre-commit hooks for code quality
  • Vitest - Testing configuration with jsdom environment
  • VS Code - Workspace settings and extension recommendations

✅ Type System

Complete TypeScript definitions for:

  • Common types - Base interfaces and utilities
  • Pose detection - MediaPipe integration types
  • Action recognition - Gesture and movement types
  • Audio synthesis - Tone.js and Web Audio API types
  • Mapping system - Action-to-music mapping types
  • Performance monitoring - Metrics and optimization types

✅ State Management

Zustand stores for:

  • App Store - Global application state
  • Camera Store - Camera device management
  • Audio Store - Audio engine and synthesis state

🛠 Development Setup

Prerequisites

  • Node.js 16+
  • Modern browser with WebRTC and Web Audio API support

Installation

npm install

Development

npm run dev          # Start development server
npm run build        # Build for production
npm run test         # Run tests
npm run lint         # Lint code
npm run format       # Format code

Testing

npm run test         # Run tests
npm run test:ui      # Run tests with UI
npm run test:coverage # Run tests with coverage

🏗 Next Steps (Stage 2: Core Vision System)

The foundation is complete. Next phase will implement:

  1. MediaPipe Integration (45 minutes)

    • Core engine initialization
    • Camera permission handling
    • Holistic model loading
    • Real-time video processing
  2. Pose Detection System (60 minutes)

    • Basic pose detection
    • Landmark data processing
    • Hand and face keypoint extraction
    • Data smoothing and filtering
  3. Action Recognition (45 minutes)

    • Finger snap detection
    • Fist gesture recognition
    • Mouth movement detection
    • Action debouncing and validation

📖 Development Documentation

For detailed technical specifications and implementation guidelines, see DEVELOPMENT.md.

🧪 Testing

The project includes comprehensive testing setup:

  • Unit tests for components and utilities
  • Integration tests for component interactions
  • Mock setup for MediaPipe and Web Audio APIs
  • Test coverage reporting

🔧 Environment Configuration

Environment variables are configured in .env:

  • MediaPipe model paths and settings
  • Audio engine configuration
  • Performance monitoring settings
  • Debug and development options

📁 Project Standards

  • TypeScript strict mode for type safety
  • ESLint + Prettier for code consistency
  • Conventional commits for clear git history
  • Pre-commit hooks for code quality assurance
  • Component-first architecture for maintainability

Status: ✅ Stage 1 Complete - Ready for Stage 2 Development Next: Core Vision System Implementation

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors