Skip to content

keynertyc/chords-ai-generator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🎸 Chords AI Generator

CLI application that generates beautiful guitar chord progressions using AI (OpenAI). It shows tablature, strumming patterns, capo suggestions, and harmonic degrees.

Prerequisites

  • Rust (1.70+)
  • OpenAI API Key

Setup

cp .env.example .env

Edit .env and add your API key:

OPENAI_API_KEY=sk-your-key-here

Run (development)

cargo run

Build for production

macOS

# Native (your architecture)
cargo build --release

# Apple Silicon (M1/M2/M3)
rustup target add aarch64-apple-darwin
cargo build --release --target aarch64-apple-darwin

# Intel Mac
rustup target add x86_64-apple-darwin
cargo build --release --target x86_64-apple-darwin

Binary output: target/release/chords-generator or target/<target>/release/chords-generator

Linux

# Native
cargo build --release

# Cross-compile from macOS (requires cross-linker)
rustup target add x86_64-unknown-linux-gnu

# Option A: using cross (recommended)
cargo install cross
cross build --release --target x86_64-unknown-linux-gnu

# Option B: using musl for static binary (no dependencies)
rustup target add x86_64-unknown-linux-musl
cargo build --release --target x86_64-unknown-linux-musl

Binary output: target/release/chords-generator or target/<target>/release/chords-generator

Windows

# From Windows
cargo build --release

# Cross-compile from macOS/Linux
rustup target add x86_64-pc-windows-msvc

# Using cross (recommended for cross-compilation)
cargo install cross
cross build --release --target x86_64-pc-windows-gnu

Binary output: target/release/chords-generator.exe or target/<target>/release/chords-generator.exe

Usage

$ ./chords-generator

🎸 Chords Generator
Generate beautiful chord progressions with AI

🎵 Genre/Rhythm: bossa nova jazz
🎹 Key: A Minor
💫 Mood: Romántico (Romantic)
🔢 Number of chords: 4

⏳ Generating chord progression...

🎸 Romantic Bossa Nova in Am

   Am7 (i)     Dm7 (iv)    G7 (VII)    Cmaj7 (III)
e |---0---     ---1---     ---1---     ---0---
B |---1---     ---1---     ---0---     ---0---
G |---0---     ---2---     ---0---     ---0---
D |---2---     ---0---     ---0---     ---2---
A |---0---     ---x---     ---2---     ---3---
E |---x---     ---x---     ---3---     ---x---

Progresión:  i → iv → VII → III
Rasgueo:     ↓  ↓↑  ↑↓↑ (130 BPM)
Capo:        No capo needed

💡 Let each chord ring out, use your thumb for bass notes on beats 1 and 3.

💾 Save to file? (y/n)
🔄 Generate another progression with the same preferences? (y/n)

Project Structure

src/
├── main.rs                        # Entry point + CLI flow
├── config.rs                      # Loads OPENAI_API_KEY from .env
├── models/
│   ├── chord.rs                   # Chord, ChordProgression
│   └── prompt.rs                  # UserPreferences
├── services/
│   ├── openai_service.rs          # OpenAI API client
│   ├── prompt_service.rs          # System/user prompt builder
│   └── display_service.rs         # Terminal rendering + save to file
└── repository/
    └── chord_repository.rs        # JSON response parser

License

MIT

About

CLI application that generates beautiful guitar chord progressions using AI (OpenAI). It shows tablature, strumming patterns, capo suggestions, and harmonic degrees.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages