Yep, it’s all ratios, and not just melody and harmony. You can express every common harmonic interval as a superposition of simple rhythms (for example, 3 beats per measure over 4 beats per measure is equivalent to a perfect fifth), which are sped up until the oscillations are within the range of human hearing.