Real-time Flutter application that captures microphone audio, runs multiple BPM detection algorithms (energy onset, autocorrelation, FFT spectrum, Haar-wavelet aggregation), and streams both individual and consensus tempo estimates. The architecture follows the layered approach defined in docs/PLAN-01.md and is tracked via the long-lived agents in AGENTS.md.
- ✅ Core DSP: Four complementary detectors wired up (see
docs/algorithms.mdfor full descriptions and references). - ✅ Real-time UI: Consensus card + delta indicator + sparkline history are live, now with an elapsed run timer and PLP panel derived from the tempogram.
- ✅ Tempogram/PLP integration: Preprocessing publishes tempogram snapshots and PLP readings that feed both consensus weighting and the UI for transparency.
- ✅ Platform plumbing:
record6.x handles microphone streaming across mobile & desktop targets. - 🚧 Next Up: Accuracy stabilization + regression harness work tracked in
docs/PLAN-03.md, tactical items indocs/next-steps.md, and milestone updates indocs/PROGRESS.md.
- Install Flutter 3.13+ and enable iOS/Android tooling.
- From the repo root, run
flutter pub get. - Launch the app with
flutter run(enable microphone permissions).
The repository now includes the standard Flutter scaffolding for Android, iOS, web, macOS, Windows, and Linux (generated via flutter create .). Use flutter config --enable-<platform>-desktop as needed before running on those targets.
Key docs:
AGENTS.md– ownership map / long-lived agents.docs/PLAN-01.md– master implementation plan & architecture layers.docs/PLAN-03.md– accuracy stabilization roadmap (interval histograms, consensus weighting, validation).docs/architecture.md– layered architecture context + current accuracy refinements.docs/algorithms.md– signal-processing approaches & citations.docs/TEMPOGRAM-UI-SCOPE.md– plan for replacing the oscilloscope with a tempogram/PLP visualiser.docs/linux-wav-test-rig.md– WAV fixture harness + validation instructions.docs/next-steps.md– near-term engineering focus.docs/PROGRESS.md– milestone log (append every major update).
- Prep tooling
- Install Android Studio (or standalone Android SDK + platform-tools) and ensure at least one API 33+ platform + build-tools are present.
- Accept SDK licenses via
flutter doctor --android-licensesand confirmflutter doctorshows no red errors.
- Enable your device
- On the phone, enable Developer options → USB debugging (or Wireless debugging if using Wi-Fi pairing) and unplug/replug USB so ADB trusts the host.
- Verify Flutter sees the device:
flutter devicesshould list e.g.Pixel_7 (android-arm64).
- Install a debug/dev build directly
- From the repo root run
flutter pub getif you haven’t already. - Start the app on the phone with
flutter run -d <deviceId>(use--releasefor production-like perf). Grant microphone permission when prompted.
- From the repo root run
- Produce an installable APK
- Run
flutter build apk --release. The artifact lands atbuild/app/outputs/flutter-apk/app-release.apk. - Install it with
adb install -r build/app/outputs/flutter-apk/app-release.apk(enable “Install unknown apps” on the device if needed). - For Play Store delivery, create a signing keystore and configure
android/key.properties, then preferflutter build appbundlefor an.aab.
- Run
- Post-install checks
- Open the app, allow microphone access, and verify real-time BPM readings appear under both the consensus card and algorithm breakdown list.
- If algorithms run but audio is silent, confirm the phone’s input gain isn’t muted and the session uses the device’s sample rate (see
AudioStreamConfigin code for tuning).