Inspiration

We recently had our first kid, and I had the opportunity to take paternity leave. Parenting is challenging, and finding adult activities that you and your baby can enjoy together is sometimes even more difficult. I decided to learn guitar - I had played a tiny bit in college, but never been anything more than a campfire strummer.

What I realized in parenting is every second matters.

As I practice, I need to keep an eye on my daughter. Using Alexa as a metronome for practice was almost a no-brainer - it's a simple function that allows me to practice. What I realized is that changing tempos to practice licks over and over again was laborious.

Why wasn't there an ability to play a beat for a certain amount of time, and progressively get faster? That's how most musicians practice, and the idea for Metronome Pro was born.

What it does

Metronome Pro does everything a normal metronome does, and then allows you to create custom sequences for practicing specific practices as an In-Skill Purchase.

Basic functionality includes:

  • Playing a beat at a certain tempo (it will understand common musical tempo markings)
  • Playing a beat for a certain period of time
  • Speeding up and Slowing Down while a beat is playing

The In-Skill Purchase enables "Custom Sequences." In custom sequences, you can create increasing speeds (or decreasing, if you'd like) to enable you to practice a passage slowly, then more quickly, then perhaps at normal speed.

For example, perhaps I want to learn the bass line to Muse's Hysteria. With custom sequences, I can:

  • First practice it at 60 bpm (slow) for 45 seconds
  • Immediately change it to 80 bpm (a bit faster) for 30 seconds
  • Then a bit faster at 120 BPM (getting close) for 20 seconds
  • Then 150 BPM for 20 seconds
  • Then 180 BPM for 20 seconds (the actual speed)

I can then practice this over and over again by naming it 'Hysteria Bass Line" and then any time I want to practice this configuration, I can say "Ask Metronome Pro to Play the Custom Sequence 'Hysteria Bass Line'".

That's a lot of power for a simple metronome.

How I built it

First, I took a look at the complaints and highlights of current metronome apps on the Alexa Skills store to find out core functionality. One thing often missing was the ability to play for a certain period of time.

A basic metronome is a pretty simple app:

  • Take a sound effect that could serve as a beat
  • Create a clip
  • Create logic to loop that clip at a certain tempo for a certain length of time.

We then added simple functionality:

  • Speed up
  • Slow down
  • Stop
  • Help

The hardest part was the custom sequences. We'll talk about that in challenges below.

Challenges I ran into

The core challenge with a metronome, and especially for Alexa, is loading sound clips. The current metronome only supports increments of 10 seconds, this is because the back-end has to generate the sound file and preload it for streaming and make the call over and over again to play it indefinitely. There are workarounds to make this more robust but it would have required a lot more work.

The end result is that still now the skill faces challenges and lags at the 10 second mark if there are issues with WiFi, the Lambda function, or processing the commands. This makes Alexa a reluctant metronome at best.

In addition, the end of a custom sequence (or an audio stream) cannot return you back to the main menu. You can only issue, effectively, a "Stop" command. This is a frustrating user experience because the user then has to reinvoke the app to start playing a metronome beat again.

We still haven't figured out how to address these challenges. There may be solutions, but for the amount of time we had to design, develop and submit this, we were unable to figure it out.

Accomplishments that I'm proud of

This is my first 'premium' experience, and I feel it works well - serving casual musicians for free while providing real value for a one time purchase for folks like new parents, serious musicians, and others who may use an Alexa for a metronome.

Additionally, we were able to deploy a lot of this using the ASK cli, which is nice.

What I learned

Alexa is robust, but still a new platform. Voice as a whole is evolving. You have to learn to work inside those constraints. Many things that you would consider basic for interacting with voice (e.g. enabling you to play a song, and then ask you what you'd like to play next) are strictly not allowed on the Alexa platform. Others, like streaming 1 second at a time, create challenges when you have a thin client (the Echo) that can't execute code on the device to even make something like playing a beat a certain tempo more challenging than expected.

What's next for Metronome Pro

Given the time constraints of parental leave and the contest, we'd like to make the skill more reliable and dig into the challenges above. For the moment, we're happy to have released the skill and have it certified.

Share this project:
×

Updates