Home screen buttons.
Preparing to load your music.
Tap to record the bpm of a new audio file.
Finish message for computing bpms.
Tap to start working out.
With a team comprised of a triathlete and several couch potatoes, we agreed on one thing: the perfect workout isn't easy to achieve. Shuffling through your music is time consuming and distracting. Music that is too slow or too fast cause our footsteps to be out of sync with the beat of our tunes, leaving us with a feeling of uneasiness, which all too often discourages exercising altogether. The right work out song matches your pace, because your feet have a beats per minute measure when you move. We created Pacer to keep your workout in perfect rhythm, listening to the music you love.
What it does
Our app synchronizes your music to match your work out. To begin, Pacer loads and analyzes your music files from your phone and organizes them by tempo. When you start moving, Pacer analyzes the accelerometer data gathered from your phone, identifies your steps and motions, and determines your pace. Throughout your workout, whether it be a run, walk, jumping jacks, or sit ups, Pacer keeps you motivated by playing music that meets or slightly pushes your pace, depending on your preference settings.
How we built it
We used Android Studio and coded in Java to create an application for Android phones.
Challenges we ran into
The two main functionalities that make up Pacer - analyzing sound files for beats and analyzing motion data for footsteps - are non-trivial topics being studied in research programs today. We quickly discovered that these problems could not be adequately solved by different importable libraries, causing us to make some tough choices. We decided that we most highly valued the accuracy and sensitivity of pace detection. One team member with a heavy math background worked with Gaussian curves and the peaks in motion data graphs to solve the problem in MatLab, meanwhile collaborating with another team member to translate this piece of code into Java for the Android application.
An even more challenging task was finding the beats-per-minute of an audio file. After trying several libraries and reading about audio analysis algorithms from research papers, nothing came close to the accuracy needed to pair music with exercise. We decided to embrace the tradeoff and utilize the very human ability to identify beats. For each new song without a bpm measure recorded, Pacer plays the song and asks the user to tap along with the beat. We take this data and record it such that songs need not be analyzed more than once. Interestingly, this method of manually determining bpm is often faster than methods using beat-recognition programs.
Partway through the hackathon, we learned that Spotify had a Running feature that offered very similar functionality to Pacer. After testing the Spotify feature, we learned that our painstaking choices for pace determination accuracy indeed pay off. By using our own analysis on accelerometer motion data, Pacer more generally detects jerking motions, allowing your workout to consist of any repetitive trackable motion - rather than only running. Pacer allows users to use their own music that they know and love - rather than a predetermined playlist - and dynamically changes songs to match a change of pace. While Spotify's Running tracks only paces within the 140-160 bpm range, Pacer accommodates a larger audience by widening detectable ranges significantly.
What we're proud of
Working through the challenges proved to us that Pacer is in fact a worthwhile endeavor.
What's next for Pacer
There are many great extended functionalities that can be added to Pacer. Customizing workouts, recording progress over time, and helping users set and reach goals are next on the docket.