Skip to content

sweb/riff-gym

Repository files navigation

Riff Gym Logo

RiffGym

Anki for Musicians - A spaced repetition practice tool for guitarists.

RiffGym helps intermediate/advanced guitarists improve technique through progressive speed training. Unlike traditional SRS apps that test memory, RiffGym tests physical proficiency by automatically increasing target BPM when users demonstrate mastery.

Features

Implemented:

  • Deck Management: Create and organize riffs into decks (e.g., "Sweeping", "Legato").
  • Quick Capture: Fast audio recording to capture ideas or create practice cards.
  • Audio Player: Gapless looping, speed control (pitch-preserving), and seeking.
  • Metronome: Independent metronome that can run simultaneously with audio playback.
  • Practice Mode:
    • SM-2 spaced repetition algorithm for intelligent scheduling.
    • 4-button grading system (Again/Hard/Good/Easy).
    • Auto-Increment BPM based on performance rating.
    • Visual Speedometer with Goal vs Current BPM.
  • Smart Audio Tools:
    • Audio cropping (trim start/end).
    • Audio muting (play along with just metronome).
  • Rich Media: Add images (tabs/charts) to cards.

Planned:

  • BPM History Charts.
  • Hands-Free Practice Mode.
  • Backup/Export.

Tech Stack

  • Flutter (via FVM)
  • Dart
  • Riverpod - State management
  • Drift - Type-safe SQLite database
  • just_audio - Advanced audio playback
  • record - Cross-platform audio recording

Getting Started

Prerequisites

  • FVM (Flutter Version Management)
  • Android Studio, Xcode, or VS Code with Flutter extensions

Installation

# Install dependencies
just deps

# Generate code (Riverpod providers, Drift database)
just gen

# Run the app
just run

Development

Available Commands

Command Description
just run Launch app on connected device
just test Run all tests (Unit & Widget)
just test-integration Run integration tests
just test-coverage Run tests with coverage
just analyze Static code analysis
just gen Generate code (build_runner)
just gen-watch Watch mode for code generation
just fmt Format code
just clean Delete build artifacts
just rebuild Full rebuild (clean + deps + gen)

Project Structure

lib/
├── main.dart
└── src/
    ├── app.dart                 # App entry point
    ├── core/
    │   ├── database/            # Drift SQLite layer
    │   ├── srs/                 # SM-2 algorithm
    │   └── theme/               # App theme & UI styles
    └── features/
        ├── audio/               # Audio player & metronome logic
        ├── capture/             # Audio recording features
        ├── decks/               # Deck & Card management
        └── practice/            # Practice session UI & logic

Testing

just test

Tests cover:

  • SM-2 spaced repetition algorithm
  • Audio player & Metronome services
  • Widget rendering & UI interactions
  • Database migrations & queries

Integration Testing

To run integration tests, you need a connected device or a running simulator/emulator.

# Run all integration tests
just test-integration

# Run a specific integration test
fvm flutter test integration_test/app_test.dart

Integration tests are located in the integration_test/ directory.

How It Works

  1. Record a reference audio of a riff at your target tempo
  2. Practice along with looped playback
  3. Rate your performance (Fail/Hard/Good/Easy)
  4. Progress - the app schedules reviews using SM-2 and increases BPM when you're ready

The core innovation: combining spaced repetition scheduling with progressive overload (speed increases) for deliberate practice.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors