virtual_keyboard / README.md
Karl ELHAJAL
Sync virtual_keyboard updates from duplicate Space
fb2cdc2
|
raw
history blame
1.96 kB
metadata
title: SYNTHIA
emoji: 🎹
colorFrom: purple
colorTo: blue
sdk: gradio
sdk_version: 5.49.1
app_file: app.py
pinned: false
short_description: Browser-based MIDI keyboard with recording and synthesis

SYNTHIA

A minimal, responsive browser-based MIDI keyboard. Play live, record performances, and export as MIDI files. 🎹

This build includes a Godzilla engine that can continue a short phrase using the Godzilla Piano Transformer.

πŸ—‚οΈ Project Structure

.
β”œβ”€β”€ app.py                  # Gradio server & API endpoints
β”œβ”€β”€ config.py               # Centralized configuration
β”œβ”€β”€ engines.py              # MIDI processing engines
β”œβ”€β”€ midi_model.py           # Godzilla model integration
β”œβ”€β”€ midi.py                 # MIDI file utilities
β”œβ”€β”€ keyboard.html           # HTML structure
β”œβ”€β”€ static/
β”‚   β”œβ”€β”€ keyboard.js         # Client-side audio (Tone.js)
β”‚   └── styles.css          # Styling & animations
β”œβ”€β”€ requirements.txt        # Python dependencies
└── README.md               # This file

πŸš€ Quick Start

# Install dependencies
uv pip install -r requirements.txt

# Run the app
uv run python app.py

Open http://127.0.0.1:7861

🎹 Godzilla Engine

Select Godzilla in the engine dropdown to generate a short continuation from your recorded phrase. The model is downloaded on first use and cached locally.

Note: the engine filters generated notes to your on-screen keyboard range.

🌐 Deploy to Hugging Face Spaces

git remote add hf git@hf.co:spaces/YOUR_USERNAME/synthia
git push hf main

Current configuration runs Godzilla generation on CPU for reliability.

πŸ”§ Technology

  • Frontend: Tone.js v6+ (Web Audio API)
  • Backend: Gradio 5.x + Python 3.10+
  • MIDI: mido library
  • Model: Godzilla Piano Transformer (via Hugging Face)

πŸ“ License

Open source - free to use and modify.