File size: 1,957 Bytes
e75ee4c
9ccc1e0
0f3e4c3
9ccc1e0
df756df
e75ee4c
fb2cdc2
e75ee4c
 
9ccc1e0
e75ee4c
 
9ccc1e0
5b51485
9ccc1e0
5b51485
f7e26a4
 
 
c427c8f
9ccc1e0
c427c8f
 
9ccc1e0
 
 
 
f7e26a4
9ccc1e0
 
c427c8f
9ccc1e0
 
 
 
c427c8f
 
9ccc1e0
5b51485
 
9ccc1e0
5b51485
9ccc1e0
 
5b51485
 
 
9ccc1e0
5b51485
f7e26a4
 
 
 
 
 
 
9ccc1e0
1e69b92
 
9ccc1e0
 
1e69b92
5b51485
fb2cdc2
 
9ccc1e0
5b51485
9ccc1e0
fb2cdc2
9ccc1e0
f7e26a4
5b51485
9ccc1e0
5b51485
9ccc1e0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
---
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

```bash
# 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

```bash
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.