Constructing a tone calculator to help me understand music theory better