The musica universalis (literally universal music), also called music of the spheres or harmony of the spheres, is a philosophical concept that regards proportions in the movements of celestial bodies – the Sun, Moon, and planets – as a form of music. The theory, originating in ancient Greece, was a tenet of Pythagoreanism, and was later developed by 16th-century astronomer Johannes Kepler. Kepler did not believe this "music" to be audible, but felt that it could nevertheless be heard by the soul. The idea continued to appeal to scholars until the end of the Renaissance, influencing many schools of thought, including humanism.
The concept of the "music of the spheres" incorporates the metaphysical principle that mathematical relationships express qualities or "tones" of energy which manifest in numbers, visual angles, shapes and sounds – all connected within a pattern of proportion. Pythagoras first identified that the pitch of a musical note is in inverse proportion to the length of the string that produces it, and that intervals between harmonious sound frequencies form simple numerical ratios.  Pythagoras proposed that the Sun, Moon and planets all emit their own unique hum based on their orbital revolution,  and that the quality of life on Earth reflects the tenor of celestial sounds which are physically imperceptible to the human ear.  Subsequently, Plato described astronomy and music as "twinned" studies of sensual recognition: astronomy for the eyes, music for the ears, and both requiring knowledge of numerical proportions. 
Aristotle characterised the theory as follows: 
Some thinkers suppose that the motion of bodies of that size must produce a noise, since on our earth the motion of bodies far inferior in size and in speed of movement has that effect. Also, when the sun and the moon, they say, and all the stars, so great in number and in size, are moving with so rapid a motion, how should they not produce a sound immensely great? Starting from this argument and from the observation that their speeds, as measured by their distances, are in the same ratios as musical concordances, they assert that the sound given forth by the circular movement of the stars is a harmony. Since, however, it appears unaccountable that we should not hear this music, they explain this by saying that the sound is in our ears from the very moment of birth and is thus indistinguishable from its contrary silence, since sound and silence are discriminated by mutual contrast. What happens to men, then, is just what happens to coppersmiths, who are so accustomed to the noise of the smithy that it makes no difference to them.
Aristotle rejected the idea, however, as incompatible with his own cosmological model, and on the grounds that "excessive noises ... shatter the solid bodies even of inanimate things", and therefore any sounds made by the planets would necessarily exert a tremendous physical force upon the body. 
Boethius, in his influential work De Musica, described three categories of music: 
Boethius believed that musica mundana could only be discovered through the intellect, but that the order found within it was the same as that found in audible music, and that both reflect the beauty of God. 
Musica universalis — which had existed as a metaphysical concept since the time of the Greeks — was often taught in quadrivium,  and this intriguing connection between music and astronomy stimulated the imagination of Johannes Kepler as he devoted much of his time after publishing the Mysterium Cosmographicum (Mystery of the Cosmos), looking over tables and trying to fit the data to what he believed to be the true nature of the cosmos as it relates to musical sound.   In 1619, Kepler published Harmonices Mundi (literally Harmony of the Worlds), expanding on the concepts he introduced in Mysterium and positing that musical intervals and harmonies describe the motions of the six known planets of the time.  He believed that this harmony — while inaudible — could be heard by the soul, and that it gave a "very agreeable feeling of bliss, afforded him by this music in the imitation of God." In Harmonices, Kepler — who took issue with Pythagorean observations — laid out an argument for a Christian-centric creator who had made an explicit connection between geometry, astronomy, and music, and that the planets were arranged intelligently. 
Harmonices is split into five books, or chapters. The first and second books give a brief discussion on regular polyhedron and their congruences, reiterating the idea he introduced in Mysterium that the five regular solids known about since antiquity define the orbits of the planets and their distances from the sun. Book three focuses on defining musical harmonies, including consonance and dissonance, intervals (including the problems of just tuning), their relations to string length which was a discovery made by Pythagoras, and what makes music pleasurable to listen to in his opinion. In the fourth book, Kepler presents a metaphysical basis for this system, along with arguments as to why the harmony of the worlds appeals to the intellectual soul in the same manner that the harmony of music appeals to the human soul. Here, he also uses the naturalness of this harmony as an argument for heliocentrism. In book five, Kepler describes in detail the orbital motion of the planets and how this motion nearly perfectly matches musical harmonies. Finally, after a discussion on astrology in book five, Kepler ends Harmonices by describing his third law, which states that — for any planet — the cube of the semi-major axis of its elliptical orbit is proportional to the square of its orbital period. 
In the final book of Harmonices, Kepler explains how the ratio of the maximum and minimum angular speeds of each planet (i.e., its speeds at the perihelion and aphelion) is very nearly equivalent to a consonant musical interval. Furthermore, the ratios between these extreme speeds of the planets compared against each other create even more mathematical harmonies.  These speeds explain the eccentricity of the orbits of the planets in a natural way that appealed to Kepler's religious beliefs in a heavenly creator. 
While Kepler did believe that the harmony of the worlds was inaudible, he related the motions of the planets to musical concepts in book four of Harmonices. He makes an analogy between comparing the extreme speeds of one planet and the extreme speeds of multiple planets with the difference between monophonic and polyphonic music. Because planets with larger eccentricities have a greater variation in speed they produce more "notes." Earth's maximum and minimum speeds, for example, are in a ratio of roughly 16 to 15, or that of a semitone, whereas Venus' orbit is nearly circular, and therefore only produces a singular note. Mercury, which has the largest eccentricity, has the largest interval, a minor tenth, or a ratio of 12 to 5. This range, as well as the relative speeds between the planets, led Kepler to conclude that the Solar System was composed of two basses ( Saturn and Jupiter), a tenor ( Mars), two altos ( Venus and Earth), and a soprano ( Mercury), which had sung in "perfect concord," at the beginning of time, and could potentially arrange themselves to do so again.  He was certain of the link between musical harmonies and the harmonies of the heavens and believed that "man, the imitator of the Creator," had emulated the polyphony of the heavens so as to enjoy "the continuous duration of the time of the world in a fraction of an hour." 
Kepler was so convinced of a creator that he was convinced of the existence of this harmony despite a number of inaccuracies present in Harmonices. Many of the ratios differed by an error greater than simple measurement error from the true value for the interval, and the ratio between Mars' and Jupiter's angular velocities does not create a consonant interval, though every other combination of planets does. Kepler brushed aside this problem by making the argument, with the math to support it, that because these elliptical paths had to fit into the regular solids described in Mysterium the values for both the dimensions of the solids and the angular speeds would have to differ from the ideal values to compensate. This change also had the benefit of helping Kepler retroactively explain why the regular solids encompassing each planet were slightly imperfect.  Philosophers posited that the Creator liked variation in the celestial music. 
Kepler's books are well-represented in the Library of Sir Thomas Browne, who also expressed a belief in the music of the spheres: 
"For there is a musicke where-ever there is a harmony, order or proportion; and thus farre we may maintain the musick of the spheres; for those well ordered motions, and regular paces, though they give no sound unto the eare, yet to the understanding they strike a note most full of harmony. Whatsoever is harmonically composed, delights in harmony."
This section needs expansion. You can help by adding to it. (March 2023)
In celestial mechanics, orbital resonance occurs when orbiting bodies exert regular, periodic gravitational influence on each other, usually because their orbital periods are related by a ratio of small integers. This has been referred to as a "modern take" on the theory of musica universalis.  This idea has been further explored in a musical animation, created by an artist at the European Southern Observatory, of the planetary system TOI-178, which has five planets locked in a chain of orbital resonances.  
This section needs expansion. You can help by adding to it. (December 2021)
William Shakespeare makes reference to the music of the spheres in The Merchant of Venice: 
Sit, Jessica. Look how the floor of heaven
Is thick inlaid with patines of bright gold:
There's not the smallest orb which thou behold'st
But in his motion like an angel sings,
Still quiring to the young-eyed cherubins;
Such harmony is in immortal souls;
But whilst this muddy vesture of decay
Doth grossly close it in, we cannot hear it.
In the 1910s, Danish composer Rued Langgaard composed a pioneering orchestral work titled Music of the Spheres.
Paul Hindemith also made use of the concept in his 1957 opera, Die Harmonie der Welt ("The Harmony of the World"), based upon the life of Johannes Kepler.
A number of other modern compositions have been inspired by the concept of musica universalis. Among these are Harmony of the Spheres by Neil Ardley, Music of the Spheres by Mike Oldfield, The Earth Sings Mi Fa Mi by The Receiving End of Sirens, Music of the Spheres by Ian Brown, " Cosmogony" by Björk, and the Coldplay album Music of the Spheres.
Music of the Spheres was also the title of a companion piece to the video game Destiny, composed by Martin O'Donnell, Michael Salvatori, and Paul McCartney.