Once upon a time, it had everything to do with it, because “music” meant a lot more than it does today. The ancients knew of musica mundana, the music of the cosmos; musica humana, the music of the human entity; and musica instrumentalis, music as sung and played. This implies some resemblance or connection between the cosmic system, the human being, and those activities, and that “music” is a common factor that runs through all three. Such thinking rests on the doctrine of correspondences, epitomised by the Emerald Tablet's dictum concerning the likeness of things above to things below, and vice versa. In this essay we shall work our way up the hierarchy, beginning with the most familiar type of music.
Musica Instrumentalis comprises music as composed, improvised, sung, played, and heard: the only sort acknowledged today and ostensibly of merely human creation, though widespread traditions attribute its origin to some higher power such as the Muses, Gandharvas and Apsaras, angels, the Holy Spirit, or even the Devil. There is some justification for this, for the composer or improviser may feel inspired or possessed by an external intelligence and transported to altered states of consciousness. Poets have had similar experiences. Such cases resemble mediumistic and trance communications, not least in that they are no guarantee of the quality of the result.
The Western tradition is unique among the world's musics in developing polyphony and harmony, and consequently emphasising composition over improvisation. Polyphony sometimes occurs in folk musics, but was deliberately cultivated in the medieval church, hence by a literate minority well versed in classical theory and the arts of the Quadrivium: Arithmetic, Geometry, Music, and Astronomy. Composing with multiple voices depended as much on quasi-mathematical skill as on aesthetic judgment. During the fifteenth and sixteenth centuries, while philosophers were developing schemes of universal correspondence, composers such as John Dunstable, Johannes Ockeghem, and Jacob Obrecht incorporated arithmology and symbolic proportions in their sacred music. This was literally esoteric, in the sense that such encodings are only perceptible from the inside, by the rare singer or analyst able to detect them, if not a secret reserved for the composer alone.
Music that deliberately carries esoteric ideas is rare during the Baroque, Classic, and even Romantic periods. The arithmology used by Johann Sebastian Bach is a special case.