Skip to content
DaivikOPXPublic

About

Seamless A-B section looping inside the official Spotify player with sub-second precision.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Latest commit

Β 

History

94 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Spoti Loop Icon

πŸ” Spoti Loop

Precision A-B Audio Looper for Spotify

Master guitar riffs, complex drum fills, vocal harmonies, dance choreography, and language lessons with millisecond-accurate A-to-B repeat loops.


Web Studio Android Release Spicetify Extension Build Status License


⚑ Quick Access

Platform Access Link Description
🌐 Web Studio daivikopx.github.io/SpotiLoop Instant zero-install web app. Works in any browser on PC, Mac, iPad, or Chromebook.
πŸ“± Android App Download Spoti-Loop.apk (v1.0.0) Native Android build with background service and notification bar controls.
🎧 Spicetify Extension Spicetify Marketplace / Code Native Spotify desktop extension with timeline pins, 0ms latency, and hotkeys.

🌟 Why Spoti Loop?

Standard media players don't allow precision section looping. When practicing difficult guitar solos, transcribing songs, learning choreography, or analyzing audio waveforms, you need to hear the exact same 2 to 10-second segment repeatedly without manual rewinding.

Spoti Loop hooks directly into your Spotify account via Spotify Connect, allowing you to set instantaneous Point A and Point B markers with millisecond granularity while controlling playback on any connected Spotify device.

       [ POINT A: 01:14.2 ]                      [ POINT B: 01:22.8 ]
───────────────●──────────────────────────────────────────●──────────────────►
               β–²                                          β”‚
               └────────────── πŸ” Seamless Loop β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

πŸš€ Key Features

🎯 Sub-Second Granular Nudge Matrix

  • Precision Tuning: Fine-tune your loop boundaries in Β±0.1s (100ms) and Β±1.0s (1000ms) steps using an ergonomic 2x2 matrix.
  • Transient Accuracy: Catch the exact split-second pick attack of a guitar chord or downbeat of a drum kick.

πŸ›‘οΈ Autonomous Android Background Looper

  • Infinite Screen-Off Looping: Features a dedicated Android Foreground Service (FOREGROUND_SERVICE_MEDIA_PLAYBACK + DATA_SYNC) running in an isolated background thread.
  • Doze-Mode Immunity: Utilizes hardware PARTIAL_WAKE_LOCK and high-performance Wi-Fi locks to ensure loops run endlessly without stopping when your phone display is locked in your pocket.
  • Notification Drawer Controls: View current loop markers, live loop repetition counters (πŸ” 14x), and tap ⏹ Stop Loop directly from the notification tray.

πŸŽ›οΈ Interactive Waveform Timeline

  • Live Scrubbing: Drag the glowing playhead across the progress bar for real-time timestamp updates and instantaneous seek on release.
  • Direct Pin Dragging: Touch and drag the Green Point A or Red Point B pins directly along the timeline to visually resize your loop region.
  • Tap-to-Seek: Tap anywhere along the timeline bar to jump playback instantly.

🧹 Smart Song Transition Auto-Reset

  • When Spotify moves or skips to the next track, Spoti Loop automatically wipes all active markers and deactivates loop modeβ€”ensuring old loop settings never accidentally loop the beginning of new songs.

⚑ Clean Task Lifecycle (stopWithTask)

  • Runs in Background: Minimizing the app or using other apps (YouTube, Instagram, Tabs) keeps your loop running continuously.
  • Swipe to Stop: Swiping Spoti Loop away from your phone's Recents menu immediately terminates background processes and removes the notification cleanly.

πŸ”’ 100% Private & Secure PKCE Authentication

  • Connects directly to official Spotify Accounts using the industry-standard OAuth 2.0 PKCE flow.
  • Zero Backend Intermediaries: Your tokens remain strictly encrypted on your local device. No credentials or listening telemetry are ever collected.

πŸ•ΉοΈ User Guide: How to Use

 β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”      β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”      β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
 β”‚ 1. Play Song β”‚ ───► β”‚ 2. Connect Spoti Loop   β”‚ ───► β”‚ 3. Set Point A & B      β”‚
 β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜      β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜      β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
   (On Spotify App)      (Web Studio or Android)          (Tap 'Set Point A / B')
                                                                     β”‚
                                                                     β–Ό
                                                        β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
                                                        β”‚ 4. Tap 'πŸ” Enable Loop' β”‚
                                                        β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
  1. Start Playback: Open your regular Spotify app (on your Phone, Mac, PC, TV, or Speaker) and play any track.
  2. Launch Spoti Loop: Open the Web Studio or install the Android APK.
  3. Authorize: Tap Authorize with Spotify to link playback control.
  4. Set Boundaries:
    • Tap Set Point A when your desired section starts.
    • Tap Set Point B when your section ends.
  5. Start Looping: Tap the large πŸ” Enable Loop button.
  6. Fine-Tune:
    • Use [ -0.1s ] / [ +0.1s ] to micro-adjust transients.
    • Use [ Jump to A ] or [ Jump to B ] to audition your start/end points.

πŸ› οΈ Technology Stack

  • Framework: Flutter (Multi-platform Dart SDK)
  • Background Architecture: Native Android ForegroundService with Isolate communication via flutter_foreground_task
  • API Integration: Official Spotify Web API (v1/me/player, v1/me/player/seek)
  • Authentication: OAuth 2.0 PKCE (RFC 7636) with SHA-256 Code Challenge
  • CI/CD Pipeline: GitHub Actions automated builds & GitHub Pages deployment

πŸ’» Local Development & Build

Prerequisites

  • Flutter SDK (3.10.0 or later)
  • Android SDK (API 21+) & Java 17

1. Clone the Repository

git clone https://github.com/DaivikOPX/SpotiLoop.git
cd SpotiLoop

2. Install Dependencies

flutter pub get

3. Run Locally

Web:

flutter run -d chrome

Android Device / Emulator:

flutter run -d android

4. Build Production Artifacts

Build Android APK:

flutter build apk --release

Output artifact will be available at: build/app/outputs/flutter-apk/app-release.apk

Build Web App:

flutter build web --release --base-href "/SpotiLoop/"

πŸ›‘οΈ Android Permissions Explained

Permission Purpose
INTERNET Communicates with Spotify Web API to sync playback and issue seek commands.
FOREGROUND_SERVICE_MEDIA_PLAYBACK Grants Android OS priority for uninterrupted background loop execution.
WAKE_LOCK Prevents CPU sleep from pausing timing calculations while phone display is off.
POST_NOTIFICATIONS Displays the active loop status and interactive Stop button in notification tray.
REQUEST_IGNORE_BATTERY_OPTIMIZATIONS Exempts the app from OEM battery kill policies (Samsung OneUI, Xiaomi HyperOS, etc.).

πŸ“„ License

This project is open-source under the terms of the MIT License.


Built with ❀️ for musicians, dancers, transcribers, and music lovers worldwide.

About

Seamless A-B section looping inside the official Spotify player with sub-second precision.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages