Mostly revised addChordEvent-related code.  Recording still does not work, but the general framework is better.