Library for performing calculations on musical elements