As I'm at OSCON this week, I thought it would be fun to kick-start my blogging by blogging each day about some open source project I've worked on in the last year.
Today I want to introduce Czerny (github).
The idea came when I was doing Charles-Louis Hanon's Virtuoso Pianist exercises. My thought was that it would be nice if a program compared my performance with the score and indicated not only mistakes, but deviations in velocity and timing.
The basic idea is:
The first two items are at a very early prototype stage. The third has not yet been started on.
Czerny includes a pyrex wrapper around OS X's Core MIDI library and a Python script for outputting events coming in from a MIDI keyboard. At some point it could also just read MIDI files (SMF) but for now, it records MIDI input into its own simple file format.
Alignment is currently done via my implementation of the Needleman-Wunsch alignment algorithm. There's a lot more work I plan to do on the note difference function, but I need more data first.
I haven't yet started on actually interpreting the differences once an alignment has been made. The obvious feedback I can give is in notes added or dropped. But my goal is also to express variations in velocity and timing. If the "score" has fingering, I could also eventually give stats on the performance of each finger, perhaps indicating which need more work.
A long-term goal might also be studying the performance, not of piano exercises, but real pieces to identify and learn patterns in how scores are mapped to performances.