Music analysis in theory and practice