DevTunes is an AI-powered terminal-based music creation tool written in Rust. Create music, play beats, and let AI generate melodies for you - all from your terminal!
-
🎹 Musical keyboard with multiple waveforms:
- 9 notes (A-L keys) mapped to standard frequencies
- Sine, Square, Triangle, and Saw waveforms
- Chord support for multiple key presses
-
🤖 AI-Powered Music Generation:
- Uses Google's Gemini AI to generate melodies
- Multiple mood options (Happy, Melancholic, Energetic, Calm)
- Real-time melody playback
-
🥁 Drum Machine:
- 5 different drum sounds (Kick, Snare, Hi-hat, Clap, Cymbal)
- Toggle between keyboard and drum modes
- Visual feedback for beats
-
🎼 Recording Features:
- Record and playback your compositions
- Save multiple patterns
- Real-time visualization
-
👾 Terminal UI:
- Beautiful, responsive interface using Ratatui
- Visual keyboard/drum pad feedback
- Status indicators and controls
- AI status display
- Rust toolchain (install from rustup.rs)
- Google Gemini API key for AI features
- Audio development files (Linux only)
Ubuntu/Debian:
sudo apt-get install libasound2-devFedora:
sudo dnf install alsa-lib-devel# Clone the repository
git clone https://github.com/tejas242/devtunes.git
# Enter directory
cd devtunes
# Set your Gemini API key (optional, for AI features)
export GEMINI_API_KEY=your_api_key_here
# Run the application
cargo runQ- Quit applicationTAB- Switch between keyboard and drum modesM- Toggle AI modeR- Start/stop recordingP- Play recorded sequence
1-4- Change waveform (when AI mode off):1- Sine wave2- Square wave3- Triangle wave4- Saw wave
1-4- Change melody mood:1- Happy2- Melancholic3- Energetic4- Calm
A - A4 (440.00 Hz)
S - B4 (493.88 Hz)
D - C4 (523.25 Hz)
F - D4 (587.33 Hz)
G - E4 (659.25 Hz)
H - F4 (698.46 Hz)
J - G4 (783.99 Hz)
K - A5 (880.00 Hz)
L - B5 (987.77 Hz)
Z- Kick drumX- SnareC- Hi-hatV- ClapB- Cymbal
# Run with debug logging
RUST_LOG=debug cargo run
# Build release version
cargo build --release- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
- Ratatui - Terminal interface
- rodio - Audio playback
- Google Generative AI - AI melody generation
- Tokio - Async runtime
- crossterm - Terminal manipulation
This project is licensed under the MIT License - see the LICENSE file for details.
Made with ❤️ using 🦀 Rust
