Slash Hack 2016


It is the second and the last hackathon in my SF trip. The /hack hackathon organized by HackerEarth gives me an enjoyable weekend.

Participants are supposed to team up before the day. I didn’t manage to find a team beforehand and end up meeting 2 wonderful teammates at the venue. One Singaporean, one Japanese. They want to work on Amazon Echo and luckily I bring one. Match made in heaven.


We don’t have a concrete idea before the start of the hackathon. After discussing for a while, we decide to work on the idea that my roommate in SF proposed (during the last GitHub Open Source Hack) - an Alexa music assistant which analyzes music scores and plays the audio at a tempo suitable for learning, part by part.

There are 2 main advantages:

  1. Suitable for learners:
    • Have a brief idea of how the piece sounds like before actually start playing it.
      • Practice it in different tempo (start slowly and progress to the original tempo as you practice)
      • Practice it in small parts (1 bar / 2 bars etc.)
  2. Voice commands means fewer distractions:
    • No music teacher or other people means the learner is not under stress (because you have to pay the teacher, and it is expensive, not to mention the teacher can be impatient)
    • No computer and no smartphones means you do not have to free your hands to control the “assistant”

Outcome (hopefully): Music learners get to learn at their own pace, efficiently and confidently. Happy music learners.

The work is divided into 2 main parts:

  1. Server
    • MusicXML parsing and time calculation
    • Audio processing using FFmpeg
  2. Alexa skill and Amazon Lambda


I have forgotten all the music theory stuff (but ironically I scored high in the theory exam) and take a little time to figure out the math of tempo, beats, and measures. We are in good progress until we realize we were not clear about what the Alexa skill interface and controls should be. At last, we still manage to produce a working demo before the deadline and squeeze into the top 11 teams.

I have been always thinking about why I join a hackathon. The first impression is of course about the food and prizes. However, my real hackathon goals are more like this:

  1. Have fun
  2. Meet interesting hackers
  3. Build cool stuff (out of comfort zone)
  4. Have fun

Well, I think at least we achieved them.

Repo of the project: