Music Technology & Wellness (Consumer Mobile) Full-Stack Mobile App Development

Feel Every Beat: AnyMusic Brings Haptic-Synchronized Music to iOS & Android

Flutter iOS & Android app for Musica Medica that syncs AI-generated haptic vibrations to music in real-time — now live on the App Store.

"From concept to a live app that lets people physically feel their music — on iPhone, iPad, Mac, and Android."
FlutterDartFirebaseFirestoreFirebase AuthFirebase StorageFirebase AnalyticsFirebase Cloud FunctionsRevenueCatjust_audioPythonlibrosascipyGoogle Sign-InApple Sign-IniOSAndroidmacOSIn-App PurchasesHaptics
Frontend
Flutter (iOS, Android, macOS)Dart SDK ^3.8.1just_audioCustom HapticEngine (MethodChannel)RevenueCat Paywall UI
Backend
Firebase Cloud Functions (Python)Cloud FirestoreFirebase StorageFirebase Analytics
AI Models
librosa (audio analysis)scipy (signal processing)numpy (spectral math)
Infrastructure
Firebase (Google Cloud)RevenueCat (subscription management)Apple App StoreGoogle Play Store
16ms
Haptic Sync Precision
Custom polling engine fires vibration events within a ±20ms window of the audio position
4
Audio Intelligence Modes
Auto-detects music, purring, vocal, or lullaby and generates mode-specific haptic patterns
3
Platforms Shipped
iPhone, iPad, and macOS (Apple Silicon) — plus Android — from a single Flutter codebase
50MB
Max User Upload
Users can upload their own MP3, WAV, M4A, FLAC, OGG, or AAC files for haptic processing

Problem Statement

Yair Schiftan had a compelling vision: let people physically feel music through their phone's haptics, not just hear it. No existing app did this with real precision. The core problem was technically hard — audio and haptic systems operate on completely different timelines, and generating meaningful vibration patterns for any piece of music (from Mozart to cat purring) required a custom audio intelligence pipeline. He needed a team that could build both the mobile app and the cloud processing backend from scratch.

Our Approach

HadidizFlow built AnyMusic end-to-end: a Flutter app for iOS and Android with a custom HapticEngine that polls audio position every 16ms and fires pre-computed vibration events within a ±20ms window. A Python-based Firebase Cloud Function automatically analyzes uploaded audio — detecting onset density, spectral centroid, and low-frequency energy ratios to classify the track as music, purring, vocal, or lullaby — then generates a tailored haptic pattern JSON. The app ships with a RevenueCat-powered freemium model (30 seconds free, then Pro at $8.99/month) and supports Google and Apple Sign-In.

Cloud AI Haptic Pattern Generator

Technical Details
A Python Cloud Function triggers on audio upload to Firebase Storage. It uses librosa to compute onset frames, spectral centroid, low-frequency energy ratio, and zero-crossing rate. Based on these signals it classifies the track into one of four modes: music (onset-based note triggers), purring (continuous low-frequency energy tracking), vocal (MFCC envelope following), or lullaby (smoothed onset + melody). Each mode generates a distinct haptic event JSON — arrays of {timeMs, durationMs, amplitude} — stored back in Firebase Storage and linked in Firestore.
Business Value
Users get a unique physical experience tuned to their audio type. Therapeutic content (purring, chants, lullabies) generates smooth continuous haptics ideal for relaxation, while music generates discrete per-beat impacts. This differentiation makes AnyMusic genuinely distinct from any other music app on the market.

Challenges We Solved

Millisecond-Accurate Audio-Haptic Synchronization

Audio players expose position at irregular intervals, and native haptic APIs have their own latency. Naive trigger approaches caused vibrations that felt noticeably off from the music — ruining the core experience.

Built a custom HapticEngine that runs a 16ms polling loop against the just_audio position stream. It maintains a sorted event queue and fires any events within a ±20ms window of the current playback position. Seek detection (>500ms position jumps) triggers an automatic queue resync. Events missed by more than 30ms are silently skipped to avoid late jarring vibrations.

Flutterjust_audioMethodChannel (iOS/Android native)Dart isolates

Free-Tier Enforcement with Cross-Session Firestore Tracking

Limiting free users to 30 cumulative seconds — across all songs and across app sessions — required a reliable counter that couldn't be gamed by force-quitting the app.

PlaytimeService maintains a local delta counter during playback and flushes to Firestore (atomic increment on users/{uid}.totalPlayedSeconds) every 10 seconds, on pause, and on dispose. On app launch, the remaining free seconds are loaded from Firestore before any audio starts. If quota reaches zero, the player pauses immediately and the RevenueCat paywall is presented.

Cloud FirestoreRevenueCatFlutter ProviderDart timers

Auto-Detection Audio Classification Pipeline

Different audio types — classical music, cat purring, chants, lullabies — require completely different haptic strategies. A one-size-fits-all approach produced unsatisfying results across the content library.

The Python Cloud Function computes four acoustic features per uploaded track: onsets-per-second (attack density), spectral centroid (frequency balance), low-frequency energy ratio (bass heaviness), and zero-crossing rate (texture). Decision tree logic maps these to four haptic modes, each with its own event generation algorithm — onset-triggered for music, energy-envelope for continuous sounds.

PythonlibrosascipynumpyFirebase Cloud FunctionsFirebase Storage

Project Timeline

1

Discovery

Worked with Yair to map the core experience: what does it feel like to physically sense music? Defined the haptic event format, chose Flutter for cross-platform reach, and scoped the cloud processing pipeline. Selected RevenueCat early to avoid IAP compliance headaches.

2

Build

Built in two parallel tracks: the Flutter mobile app (HapticEngine, player UI, auth, library, paywall) and the Python Cloud Function pipeline (audio analysis, haptic JSON generation, Firestore integration). Integrated just_audio with a custom 16ms sync loop and wired RevenueCat for the freemium model with a 30-second cumulative free tier.

3

Launch

Shipped to both the Apple App Store and Google Play Store. Supported iPhone, iPad, macOS (Apple Silicon), and Apple Vision. The app launched with bundled tracks (Mozart, cat purring, chants, lullabies) plus full user-upload support — allowing anyone to upload their own audio and have haptic patterns auto-generated by the cloud pipeline.

Ready to Build Something Similar?

Let's discuss how we can help transform your business with AI.

Start Your Project