The application would generate a random sequence of chords or notes. This would be conveyed to the user in their desired method(s); the notes represented as letters, the musical sheet representation and/or the sound being played for example. The user is then expected to play back the sequence, and using the device's microphone the application can verify if the user has done so correctly. Repetition of this exercise can help solidify a user's learning, and would help them learn to read sheet music and/or play by ear.
The application could also read sheet music using the device's camera and recognise the music and play it back to the user. The music could then be stored and used for practice.