refactor of music lessons code using audio buffers