Band Note Learner is an app I designed for iPhone, iPod Touch, and iPad. There are a lot of flash card style note learning apps on the App Store, but this one is different. It uses the physics built in to the iOS device and has sequential levels designed for each instrument. My wife, Sarah Owen, wanted these features for her middle school band kids to use. The first version was done during the late spring of 2015 over the course of 14 weeks.
My brother Gary Owen, a full time software CEO, worked as my advisor during the project. We settled on weekly scrum-style meetings from the very outset. These were invaluable in keeping the focus on only the most important activities.
The first task was to prototype. Build the simplest, easiest to use test of the idea possible. Then get it in front of your target audience. I had a private trumpet student who made the perfect test subject. So, within the first week I threw together a single view app with notes that float across the screen and a few buttons that match. I asked him to play it during his weekly lesson, and it was an immediate hit. He asked how to get it on his phone right away.
Our next challenge was to design the levels. I had quickly thrown all the code into the view controller file, which would never work in the long term. So the first task was to separate concerns into appropriate class files and figure out the level design.
Most of the game rules are in a class called GameManager. When the game starts, a copy of GameManager is instantiated with the appropriate instrument and level. GameManager calls another class called Instrument. Instrument is tasked with creating an array of NoteImage items that correspond with the notes necessary for each level. With all this in place we could now generate a series of levels for each instrument.
This is where the really interesting work happened. The level design is based on the sequence taught in Essential Elements 2000. Notes are introduced in a specific order for each instrument. Level one grabs the first three notes. Level two grabs the first five, and so forth. The levels for different instruments match the pages in their band books, so a class will always be able to play the same levels as they progress together. This makes the app much more useful in a classroom.
The DRY (Don’t Repeat Yourself) principle is very important. To make it easy to QA the contents of each level, I used a recursive design when creating the array of NoteImage objects. Instead of making a brand new list for each level, it instead adds only the new NoteImage objects, and then recursively traces back through each level, adding those notes.
Another tricky part of the design was working with Autolayout. The row of seven notes at the bottom was giving me all sorts of placement issues. It would look good on a small iPhone, then the placements would be off on a larger iPhone. I got a copy of Erica Sadun’s iOS Autolayout Demystified which really clarified my thinking. I redesigned it using NSLayoutConstraint.constraintsWithVisualFormat and after that I had no trouble. It’s a great book for understanding layout using code.
I was hoping to use NSUserDefaults to store the data for each accomplished level, but it quickly became clear that more storage options were needed. Band Note Learner uses a very simple Core Data database to store all of the content for each High Score. Each object contains strings for the Level and Instrument, and a reference to the number of stars, as well as a jpg image of the finished level screen.
The simplest reporting tool is email, so I built in email to the high scores UITableView. It sends the score, level, and instrument as a string, but also includes a jpg representation of the finished score screen. The reason for the jpg is that it’s a simple way to prove that student did the work without needing a user login system, which we reasoned was too complicated for the initial release.
We finished with about 2 weeks of testing on all devices. This app is written entirely in Swift, which I hadn’t used at all before starting. It’s currently receiving 5 stars in the App Store, and sales are picking up gradually. If you’d like to pick up a copy, click on the link below.