The ancient Chinese musical system depends on very ancient mathematics used to determine sound frequencies. The easiest way to explain it is to work through a real example.
Suppose that somebody wanted to make a musical instrument that could play any song in the ancient Chinese system. Here are the instructions: