Foundations in music theory