Mozi asked a Confucian, saying ‘What is the reason for music (樂)?’ The reply was: “Music is performed for the sake of joy (樂)” ((same word!)) Mozi said: ‘You have not answered me. Suppose I asked: Why build houses? And you answered: It is to keep off cold in winter, and the heat in summer, and to separate men from women. They you would have told me the reason for building houses. Now I am asking: Why perform music? And you answer: Music is performed for music’s sake. This is like saying : Why build houses? And answering Houses are built for houses’ sake.” Mozi 43
Thus, the tones of an orderly age are peaceful and joyous because its policies are stable. The tones of a chaotic age are resentful and angry because its policies are perverse. The tones of a doomed state are sad and mournful because its policies are dangerous. It is a general principle that music is influenced by government and affected by customs. When customs are fixed, music adjusts itself to them. Thus, in an age that possesses the Dao one has only to observe its music to know its customs, to observe its customs to know its government, and observe its government to know its ruler. The First Kings were, therefore, certain to rely on music as a means of professing their teachings. LSCQ 5/4.4B
When Yu ascended the throne he toiled and laboured on behalf of the world. He rested neither day nor night, opening up the great streams, cutting through obstructions and blockages, boring out the Dragon Gate, and circulating the flowing waters by guiding them to the Yellow River. He dredged the Three Rivers and the Five Lakes and made their waters flow to the Eastern Sea, to benefit the black-headed people. At this, Yu commanded Gaoyao to compose all nine movements of the “Xia Flute” in order to celebrate his achievement. LSCQ 5/5.10
In the past, at the inception of the Yinkang clan, the Yin had coagulated in great amounts and accumulated excessively. The watercourses were blocked and obstructed, and water could not flow out from springs. The ethers of the people became thick and clogged up, and their muscles and bones tight and constricted. They therefore invented a dance with which to spread and guide the Yin .LSCQ 5/ 5.4
In the past, when the ancient Zhuxiang clan ruled the world, there was an excess of wind that caused the Yang ether to gather and accumulate, the myriad things to disperse and scatter, and the fruits and nuts not to ripen. Knight Da therefore invented a five-string zither with which to attract the Yin ether and arrange the survival of the various living things. LSCQ 5/ 5.2
These two are a lot more magical. Music actually changes the world. In the first one we can see it changing people, which makes a bit of sense. Then in the second one it changes the universe. There are actually a bunch of passages in here about how inventing new instruments gave humans new ways to control the world. This is not our idea of music at all (unless you are a follower of the Church of Les Paul), but it does help a bit with Early China.