Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
105 changes: 48 additions & 57 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ A minimalist terminal-based MP3 music player built with Rust.
- **Keyboard-Driven**: Lightning-fast keyboard-only interface
- **Fuzzy Search**: Real-time search with `/` key - find songs instantly
- **Vim-Style Navigation**: Full vim keybinding support (hjkl, gg/G, n/N, q)
- **Pitch-Preserving Speed Control**: Speed up or slow down playback without chipmunk/horror voice effects (custom WSOLA algorithm)

## Quick Start

Expand All @@ -31,7 +32,7 @@ A minimalist terminal-based MP3 music player built with Rust.

```bash
# Clone the repository
git clone git@github.com:coolcode/musix.git
git clone git@github.com:isa/musix.git
cd musix

# Build and run
Expand All @@ -43,44 +44,38 @@ cargo build --release
```

### Quick Usage
1. **Start the player**: `cargo run`
1. **Start the player**: `cargo run -- /path/to/music` or just `cargo run` to use current directory
2. **Navigate**: Use `j/k` or arrow keys to browse songs
3. **Search**: Press `/` and type to find songs instantly
4. **Play**: Press `Enter` or `Space` to play selected song
5. **Jump**: Use `gg` (first song) or `G` (last song)
6. **Help**: Press `x` to see all controls
7. **Quit**: Press `q` or `Esc` to exit
5. **Speed up**: Press `+`/`-` to adjust playback speed, `0` to reset
6. **Jump**: Use `gg` (first song) or `G` (last song)
7. **Help**: Press `?` to see all controls
8. **Quit**: Press `q` or `Esc` to exit

### Setup Music Files
### Music Files

MUSIX automatically searches for MP3 files in these directories:

1. **`~/Music`** - Your system's Music directory
2. **`./data`** - Local data folder
MUSIX scans for MP3 files recursively:

```bash
# Option 1: Use local data folder
mkdir -p ./data
cp /path/to/your/music/*.mp3 ./data/

# Option 2: Use system Music directory
cp /path/to/your/music/*.mp3 ~/Music/
# Play from a specific folder
musix /path/to/music

# Option 3: Create symbolic link
ln -s /path/to/your/music ./data
# Play from current directory (default)
musix
```

## Controls

> **Tip**: Press **x** anytime to view the interactive controls popup!
> **Tip**: Press **?** anytime to view the interactive controls popup!

### Essential Keys

| Key | Action |
|-----|--------|
| **`Space/↵`** | **Smart Play** - Play selected song or pause current |
| **`/`** | **Search Mode** - Enter fuzzy search |
| **`x`** | **Show/Hide help popup** |
| **`?`** | **Show/Hide help popup** |
| **`q/Esc`** | **Exit** |

### Navigation & Playback
Expand All @@ -93,6 +88,10 @@ ln -s /path/to/your/music ./data
| `gg` / `G` | Jump to first/last song |
| `,` / `.` | Seek backward/forward 5 seconds |
| `<` / `>` | Same as above |
| `+` or `=` | Increase playback speed (+0.1x) |
| `-` | Decrease playback speed (-0.1x) |
| `0` | Reset speed to 1.0x |
| `1`-`9` | Jump to 10%-90% of song |
| `r` | Toggle Random mode |

### Search Mode
Expand Down Expand Up @@ -127,23 +126,27 @@ MUSIX features a clean, 4-panel interface that maximizes space for your music:
└─────────────────────────────────┘
```

### Interactive Controls Popup (Press **x**)
### Interactive Controls Popup (Press **?**)

```
┌─────────────────────────────────┐
│ CONTROLS │
│ │
┌─────────────────────────────────
│ CONTROLS
│ ↑/↓ or j/k - Navigate songs │
│ Space/↵ - Play/Pause │
│ Space/↵ - Play/Pause
│ ←/→ or h/l - Play prev/next song│
│ gg/G - Jump to first/last │
│ / - Enter search mode │
│ n/N - Next/prev search │
│ ,/. - Seek ±5 seconds │
│ r - Toggle random mode │
│ q/Esc - Exit application │
│ x - Close this popup │
└─────────────────────────────────┘
│ gg/G - Jump to first/last │
│ / - Enter search mode │
│ n/N - Next/prev search │
│ ,/. - Seek ±5 seconds │
│ R - Toggle random mode │
│ +/= - Increase speed │
│ - - Decrease speed │
│ 0 - Reset speed (1.0x) │
│ 1-9 - Jump to 10%-90% │
│ q/Esc - Exit application │
│ ? - Toggle this help │
└──────────────────────────────────┘
```

## Smart Features
Expand All @@ -158,6 +161,12 @@ MUSIX features a clean, 4-panel interface that maximizes space for your music:

**Example**: Searching "btl" will match "Battle Song", "Beautiful", "Subtitle"

### Playback Speed Control
- **Pitch-Preserving**: Speed changes use a custom WSOLA algorithm — voice sounds natural at any speed
- **Range**: 0.25x to 4.0x in 0.1x increments
- **Quick Reset**: Press `0` to instantly return to normal speed
- **Status Display**: Current speed shown in the status bar (e.g., "Speed: 1.50x")

### Visual Indicators
- **`→`** Currently selected song in the list
- **`♪`** Currently playing song indicator
Expand Down Expand Up @@ -192,7 +201,6 @@ MUSIX features a clean, 4-panel interface that maximizes space for your music:
- **`rodio`** - Professional audio playback and MP3 decoding
- **`ratatui`** - Modern terminal user interface framework
- **`crossterm`** - Cross-platform terminal control
- **`rand`** - Cryptographically secure random shuffle

## Development

Expand All @@ -201,8 +209,7 @@ MUSIX features a clean, 4-panel interface that maximizes space for your music:
```
musix/
├── src/
│ └── main.rs # Complete application (~700 lines)
├── data/ # MP3 files (optional)
│ └── main.rs # Complete application (~1600 lines)
├── .github/workflows/ # CI/CD automation
├── Cargo.toml # Dependencies and metadata
├── rustfmt.toml # Code formatting rules
Expand Down Expand Up @@ -230,33 +237,17 @@ cargo fmt --all -- --check

### No Music Files Found

**Issue**: `No MP3 files found in any accessible directory`
**Issue**: `No MP3 files found`

**Solutions**:
```bash
# Option 1: Copy files to data folder
mkdir -p ./data
cp /path/to/your/music/*.mp3 ./data/
# Specify a directory containing MP3 files
musix /path/to/your/music

# Option 2: Create symbolic link
ln -s /path/to/your/music ./data

# Option 3: Check permissions
ls -la ~/Music
# Or run from a directory that has MP3 files
cd /path/to/your/music && musix
```

### macOS Music Access

**Issue**: Cannot access ~/Music directory on macOS

**Solution**: Enable Full Disk Access for your terminal:

1. **System Settings** → **Privacy & Security** → **Full Disk Access**
2. Click lock icon to unlock settings
3. Click **+** and add your terminal app (Terminal/iTerm2)
4. Enable the checkbox
5. **Restart your terminal**

### Linux Audio Issues

**Issue**: No audio output or initialization errors
Expand Down
Loading