In Western classical music, the melodic harmonious scale discovered by the Pythagoreans, called the diapason, which is a musical scale or octave, corresponds with the essential harmony inherent in the Soul of mankind.
Every note struck by a musical instrument touches its correspondence in the emotions of the soul, and when this is in harmony, it evokes a feeling of delight and pleasurable contentment. Each musical instrument sounds a different voice in this magnificent symphony. This is why classical music is healing and therapeutic. If there is too much dissonance it becomes disturbing.
One day while meditating upon the problem of harmony, Pythagoras chanced to pass a brazier's shop where workmen were pounding out a piece of metal upon an anvil. By noting the variances in pitch between the sounds made by large hammers and those made by smaller implements, and carefully estimating the harmonies and discords resulting from combinations of these sounds, he gained his first clue to the musical intervals of the diatonic scale.
He entered the shop, and after carefully examining the tools and making mental note of their weights, returned to his own house and constructed an arm of wood so that it extended out from the wall of his room. At regular intervals along this arm he attached four cords, all of like composition, size, and weight. To the first of these he attached a twelve-pound weight, to the second a nine-pound weight, to the third an eight-pound weight, and to the fourth a six-pound weight. These different weights corresponded to the sizes of the braziers' hammers.
P.D.Ouspensky notes in his book, The Search For The Miraculous, that if you divide 7 into 10 you arrive at the ratios of the musical scale which coincide with the construction of the Sufi Enneagram. (See Wikipedia for notes on the Enneagram.)
To a degree, music is rooted in Nature, that is in bird song, the babbling brook, waves breaking on the sea shore, the rustle of leaves in trees, and certain animal sounds. In man, as part of Nature, there is the desire to dance and sing when happy.
The ancients believed that the movement of planets created a music of the spheres. Mystics like Kabir heard the 'unstruck music' deep in the spiritual heart; and heaven is often envisaged as a region where angels play musical instruments and sing.
Probably the most conspicuous ancient thought about music is the doctrine of Ethos, which describes the effects of sound on human behaviour and therefore its moral influence. Aristotle, in his Politics, explains how the different kinds of music, imitating specific feelings (anger, kindness, love), can affect a human being with the same kind of feelings. Therefore, says Aristotle, someone who listens to the wrong kind of music will grow up to be a bad person, and vice-versa. Consequently, Aristotle (and also Plato) recommended the right kind of music in the education of young citizens. The doctrine of Ethos describes the effects of music on the human soul.
Sacred music lies in the holy melodies of plainsong and polyphony and today we have church music and the great symphonic masses, oratorios and requiems. Atonality and excessive discordance without melody and harmony are disturbing to the Soul and are listened to with difficulty.
Lawrence Ball has wriiten that any form of music can be used for meditation. The important thing is that it not disturb one's attention from becoming aware of itself. It establishes an "energy discussion" with the deep unarticulated realm of experience. If music can assist in taking a large percentage of attention off itself into the interior of the Self, then it can be particularly useful.
Schopenhauer, one of the few philosophers who have written about the metaphysics of music, says that melody is the soul of music. So melody pleases us greatly as it is soul speaking to soul.