Harmonice Mundi Software

Instruction Manual

Prepared May, 2006 by Christopher A.




To summarize my involvement with this project, I would like to say a few words as to why I have spent so much time on it recently, with which different forms I have tried to express this project, and how this project has been beneficial to me or anyone else as far as I know.

As to why I have been spending so much time on this lately, I can start by saying that when the 2005 Bridges Conference evaluated a short paper on this project, they replied to me with two opposing yet valid opinions.  The negative opinion was that to try to make music this way is as arbitrary as throwing dice and for the sake of astronomy or science there is no obvious increase in merit.  The positive opinion was that arbitrary or not, this project is an attempt to derive music by way of mathematics and furthermore it is original in the choice of technology and science that assists it.   My own feeling is that an idea as beautiful as this one-even if it is so far just among the most ancient science fiction that the world has ever known-that such an idea is worth pursuing to the extent that anyone could know clearly what truth that the original hypothesis does or does not contain.   Only recently have developments in astronomy and computer science provided tools for a thorough analysis such as the one this project has become.   My belief is that interesting and suggestive results are in the near future.  

For the ways that I have tried to understand this idea, initially my interest was in the Book V translation as a piece of scientific history among many others to read or at least skim for the sake of at least being aware of big ideas that humanity seems to cherish.  In  one sense I read my way into a graduate program which from the start I had hoped to use to develop this one idea that eventually became my master's thesis.  The work of the thesis was mostly retracing through the proofs and arguments of the first two books, while unfortunately not having time to progress formally onto the later chapters.  Later on I took a crash course in Java programming and decided to make a computational solution.  Initially the goal was to hear the tones that would be determined by the ephemerides for any single moment.  Through this stage it eventually became apparent that there were more efficient ways, plus there was the difficulty of having to update the program often since the internet service providing the ephemerides has also been under frequent revision.  The most recent forms have made more practical the search for concordances conforming to an arbitrary musical system.  I have put work into formatting the results as simple textfiles, binary objects, musical staffs for reference,  and musical scores in a common electronic paradigm.  

For the usefulness of this project, I can say that the invitation to present at Bridges 2005 at the time seemed very rewarding and encouraging, even just as a way to meet others whose interest in mathematics connected to aesthetics and art.  My hopes with this project are in defense of music and art, as well as in the search for scientific value, although personally I have developed much intuition into the mathematical organization of musical harmony as well as considerable programming experience.  I have come to a deeper appreciation of science and philosophy in relation to cosmology and physics.  Whether or not a doctoral dissertation of any merit could come out of this for me remains to be seen, or whether any music worth hearing more than once will spring from this project is also not yet known.  In reality there is a risk associated with this project, that in the end it is all nothing but luxury and leisure.   If nothing else the project has served to propagate access to  meticulously-calculated ephemerides to hundreds of people who might not otherwise have known how available such resources truly are.  


Harmony runs in the Java 2 version 1.4.2, and has not been tested on the earlier versions of the virtual machine.   If a working Java Virtual Machine (JVM) is installed on the system, then Harmony should be ready to run after decompressing the archive.   The following simple test will determine if everything is working.  At the top level directory, type the following command.

java -cp harmony.jar:commons.jar:astrolib.jar org.carthur.Harmony -Nr

The result should be a textual report sent to standard output giving the ephemerides along with some harmonic results, from the current system time.

Examining ephemeris...
Moments tabulated:1
Elapsed Time:1.89 seconds
Ephemeris Report:
Date:5/12/2006 13:52:21
Julian Day: 2453868.2863541665
Linear Units:Astronomical Units
Angular Units:Radians

(some output skipped)

Velocity:(x,y,z)=(-0.004470735207579574,-0.003505649908425243,-0.001255515720535 624)
Angular Velocity(RAD):6.373158872395444E-4
Keplerian Frequency(Hz):121.68011066773305

Planetary Concordances: (within tolerance +/-0.1%):
Between Mercury and Earth, 2 octaves plus one Greater septimal tritone (7:10) with error less than any defined intervals

(skipping the rest of the output)

The above is a portion of the basic output showing, for example, some mechanical aspects of Saturn as well as some harmonic interpretation.   If the output is anything at all like this (and thus not a stack trace from a Java exception) then the software is installed properly.   If there are errors, then the problem is most likely with the installation of the virtual machine unless this program was somehow received incompletely.  In the latter case a complete distribution is available from http://harmony.sourceforge.net/

My apologies for the cryptic syntax of the program.  (If anyone  wants to help design a new, graphical front-end, that would be appreciated).  



The purpose of this program is to facilitate the investigation of the hypothesis that the planets exhibit harmonic qualities in their motion.  To determine whether a musical interpretation is appropriate given such harmonies is also of interest. In particular, the aim is to allow one to listen for music among the motions, operating under the assumption that mankind's appreciation for music is as fair a judge as any of whether a sensible order, especially a harmonic one, exists among the motions, and whether such an order seems remarkable in comparison to any otherwise random signal as a compositional determinant in music.

In view of this hypothesis the program is more optimistic, perhaps so to extremes that in reality do separate its function from the scientific community.  Not innovating in astronomy, nor in mathematics, nor in computer science, nor in music theory, the novelty lies only in the unusual attachment of the disciplines, but nonetheless the effort to craft this tool has been towards the production of music as an end product.  

Oddly, then might seem the fact that the latest version of the program does not produce any sound at all.  The decision to abandon this feature was in order to focus on tasks more relevant to the investigation in general, and also to provide a quick interface to an external synthesis system (CSOUND) far more capable of doing justice to anything from Harmony that would so merit it.   The other format of interest to the electronic musician with some Java knowledge would most likely be the serialized list which by way of the EphemerisReader.class object can be imported neatly into environments such as Mathematica with J/Link, or any other programmable format.  The remaining formats are less connectable and instead are intended for more general or documentary purposes.  They include a TeX output for compiling typeset lists of "astromusical" notation and a straightforward ephemerides listing in plain text with accompanying harmonic interpretations.

Supposing nothing more than a few vague paragraphs recovered from antiquity and medieval times, the  tools available here are encouraging from a scientific perspective, at the very least, in their exclusively "heliocentric" theory.  Unfortunately, there is little else in the way of astronomy that four hundred years of innovation has been known commonly to relate to anything musical.  

With all that having been said, Harmony can be used to examine a single ephemeral instance, but the present intention is to develop sequences over an interval of time and conforming to musical constraints.  For example, one could typeset a list of triads in an equal-temperament system occurring in a fifty-year period, or produce an album digitally, perhaps by scaling down a century of (A-440) concordances into ten-minute scores with orchestration by way of modern synthesis techniques.

Input Options

Simple Reports

In order to know what information Harmony can provide, a second look at the basic output would be helpful.  The following command

java -cp harmony.jar:commons.jar:astrolib.jar org.carthur.Harmony -Nr

should produce output similar to the following:

Examining ephemeris...
Moments tabulated:1
Elapsed Time:2.117 seconds
Ephemeris Report:
Date:5/13/2006 14:31:41
Julian Day: 2453869.3136689817
Linear Units:Astronomical Units
Angular Units:Radians

Angular Velocity(RAD):0.0988238263005979
Keplerian Frequency(Hz):18868.028181362202

Angular Velocity(RAD):0.027589072724549562
Keplerian Frequency(Hz):5267.468596905593

Angular Velocity(RAD):0.016838458291136553
Keplerian Frequency(Hz):3214.8978385178593

Angular Velocity(RAD):0.007705863128047706
Keplerian Frequency(Hz):1471.2488688655883

Angular Velocity(RAD):0.0013353178395670968
Keplerian Frequency(Hz):254.94676305480436

Angular Velocity(RAD):6.372886425151557E-4
Keplerian Frequency(Hz):121.6749089441528

Planetary Concordances: (within tolerance +/-0.1%):

The data contained in this planetary ephemeris is determined from the DE406 files available from NASA JPL Solar System Dynamics Group and interpreted for position and velocity via the Chebyshev polynomials according to the algorithm implemented by Jim Baer, with time conversions implemented by M.Huss, and finally harmonic interpretation according to the method proposed by Johannes Kepler in 'The Harmony of the World' and implemented by Christopher Arthur by following the APS 1997 translation into English.  Note:dates given prior to Oct 15,1583 AD are assumed to be Julian calendar dates.

The following line-by-line explanation should hopefully clear up some of the confusion about what it all means.  The reports vary in length and detail.  This particular one shows all the available technical (or standard) ephemeris data for the main planets and not much more.

Selecting a specific time

The ephemerides file provided with the distribution span the three hundred year period between 1800 and 2100, although additional files are available (see appendix).  To see a report for a specific time, it can be entered on the command line.  The following:

java -cp harmony.jar:astrolib.jar:commons.jar Harmony -rx 7/4/2006 15:23:12

gives the ephemeris for July 7, 2006, 3:23:12 p.m., in whatever time zone is default on the machine.   In fact the planetary movements are slow enough so that a few hours do not dramatically affect the results.

Using a range of dates

To get a report over a range of dates, the options -e <end date> and -i <step> can be used.
The first example generates a list of reports from July 4th to July 8th taken at 90-second intervals.  The second example is from July 4th 2006 and goes in two year intervals up to 2050.  Permissible units for the <step> are d-days, m-minutes, y-years and s-seconds.  

java -cp harmony.jar:astrolib.jar:commons.jar Harmony -rx 7/4/2006 12:00 -e 7/8/2006 -i90s
java -cp harmony.jar:astrolib.jar:commons.jar Harmony -rx 7/4/2006 12:00 -e 12/25/2050 -i2y

An input file for dates

Since the range options work only for uniformly-distributed time samples from start to finish, other orderings of times can be done collectively by way of selecting an input file with the -s <file> option.  The file format should have each date/time in the same format that would be given on the command line, and only one date/time per line.

Other basic options

Options for adjusting units

{{Option, Description}, {-d, Report in degrees instead of radians}, {-K, Report in kilometers instead of AUs}, {-E, Report in AU (default)}, {-R, Report in radians (default)}}

Options for selecting bodies and elements

Often the report may seem overloaded with information, so the following commands help to select what to include.

The elements option -O takes the following parameters

{{a, Angular velocity}, {v, Velocity}, {p, Position}, {f, Kepler frequency}, {F, Intervallic Data}}



This chapter discusses the options and operations for handling the main purpose of the program, which is to derive some information about harmonic relationships within the ephemeris data, in particular the Kepler frequencies.   The following example is the harmonic part of a report given in the previous chapter, on 7/4/2006.

java -cp harmony.jar:commons.jar:astrolib.jar org.carthur.Harmony -rx 7/4/2006 12:00 -dOF

The above command generates these observations within the report:

Planetary Concordances: (within tolerance +/-0.1%):
Between Mercury and Jupiter, 5 octaves plus one Equal-tempered major second (1:1.1224620) with error less than any defined intervals
Between Earth and Mars, one octave plus one Lesser undecimal neutral second (11:12) with error less than one Kleisma (15552:15625)
Between Earth and Saturn, 4 octaves plus one Undecimal neutral sixth (11:18) with error less than any defined intervals
Between Mars and Saturn, 3 octaves plus one Equal-tempered perfect fifth (1:1.4983071) with error less than any defined intervals
Between Jupiter and Saturn, one octave plus one Pythagorean limma (243:256) with error less than one Kleisma (15552:15625)


There are two sections, planetary concordances and chords.  What a planetary concordance means, exactly, is that the ratios of angular velocities of certain planets, as they are "real" numbers in the strict mathematical sense, are nearly or exactly equal to "real" numbers that are recognized as musical ratios or intervals.   (This is the essential link between the music and the planets that Kepler proposed, and it is admittedly abstract to the point that arguably almost anything quantifiable as a scalar might seem equally suited and equally arbitrary, but there are reasons which make the solar system particularly well-suited.  See the Appendix).

Given this abstraction, then a chord is defined to be what it is mathematically, which is a compounding of intervals, concordances or ratios.   In this case, among Earth, Mars and Saturn, the three intervals that form a (rather exotic) chord are 11:12, 11:18 and the equal-tempered fifth.

The determination of chords is less trivial that it might seem.  While it is true that in an equal-temperament system, exactly two intervals clearly define a chord, in less regular systems this is not true.  Even in the above example, from the perspective of functional harmony it isn't clear what single tuning system or scale could fit the intervals 11:12, 11:18 and ET P5.  Hence, the need arises to use a smaller set of intervals from the default one, since the default setting is to identify any interval on a large list that contains many (not necessarily compatible) systems.   (In fact, the default list was taken from the Wikipedia's entry on musical intervals).

Equal Temperament

The following example forces Harmony to identify only equal-temperament intervals and ignore all others, by way of the option -k dat/equtemp.txt:

java -cp harmony.jar:commons.jar:astrolib.jar org.carthur.Harmony -rx 7/4/2006 12:00 -OF -k daa/equtemp.txt

Produces the results (with respect to harmony):

Planetary Concordances: (within tolerance +/-0.1%):
Between Mercury and Jupiter, 5 octaves plus one Equal-tempered major second (1:1.122462048309373) with error less than any defined intervals
Between Mars and Saturn, 3 octaves plus one Equal-tempered perfect fifth (1:1.498307076876681) with error less than any defined intervals

Other Tuning Systems

Presently, Harmony supports automatic identification of intervals and chords within any temperament or tuning that meets the single criterion that it is divisible into octaves and furthermore that the pattern of intervals is the same throughout all octaves.  For example, if between middle-C and the higher E there is an interval of 4:5, then the same ratio must be used throughout all octaves above and below.   This will probably change very soon, since apparently some historical temperaments do not conform to this constraint (the tempering of some intervals becomes more pronounced as the pitches get farther away from the center).   

To define a custom tuning, for now it is just a matter of creating a text file that lists the intervals in the octave.  For example, the equal-temperament system is defined in the file equtemp.txt, listed below:

1:1.059463094359295,Equal-tempered minor second
1:1.122462048309373,Equal-tempered major second
1:1.189207115002721,Equal-tempered minor third
1:1.259921049894873,Equal-tempered major third
1:1.334839854170034,Equal-tempered perfect fourth
1:1.414213562373095,Equal-tempered tritone
1:1.498307076876681,Equal-tempered perfect fifth
1:1.587401051968199,Equal-tempered minor sixth
1:1.681792830507429,Equal-tempered major sixth
1:1.781797436280679,Equal-tempered minor seventh
1:1.887748625363387,Equal-tempered major seventh

The format is simply to list the ratio (using a colon) of the interval followed by a comma and the name of the interval.  The first and last intervals should be unison and the octave, but the others do not have to be in any particular order, as long as just one entry per line.  

System Root Specification

Occasionally Harmony will find two incompatible chords on the same day, or in the case of scanning intervals of time, it will find chords that although in tune with themselves are not in tune with each other.  For instance, it could be that on one day it reports a major triad that fits into equal temperament provided that A is set to 440 Hz, while on another day in the same scan it finds another triad that fits better with A set to 432 Hz.  This may be an unacceptable result for compositional purposes, so Harmony has the option to specify a system root such as A=440 and a percentage for error tolerance.  For example, to report only chords that fit into equal temperament with A within 5 Hz of 440, use the option

-k equtemp.txt -t 440,1.15

where the value 1.15 is chosen since 5 is roughly 1.15% of 440.  

Base Frequency

Traditionally the mapping onto pitch is set for the perihelion of Saturn as a "low G".  Without an extensive historical search, this was computed to be 99.0 Hz for Harmony's sake, by 440 (9/10) (2^-2), which can be interpreted as two octaves and one tone below A at 440 Hz.  The admittedly arbitrary selection of this value has given rise to the option of resetting it to another value with the option -f <frequency>.  Although for significantly higher values, the faster planets such as Mercury will be pushed up beyond the audible range.   

Summary of Tuning Options

Output Formats

The four different available output formats are text report, serialization, TeX and CSound.  Aside from the report, which can be sent to standard output, the other formats can select an output filename with the -o <filename> option.


The simplest output format is the report, which is used in every example in the documentation up to this point.   


With this output format, the file is created from java.io.ObjectOutputStream using for a record type the same type that is used internally by Harmony.   That type is org.carthur.harmony.data.HarmonicEphemeral.  For convenience there is also a java class org.carthur.harmony.data.EphemeralReader with methods for extracting any of the data as arrays of primitive types.  Note that when this output option is selected all data for all planets is stored and the element/body selection options have no effect.  Below is a summary of the EphemeralReader methods.


TEX is a powerful typesetting system designed to produce high-quality output for printing and document-making.  An example of the kind of output that this option can produce can be found on the project web page at http://harmony.sourceforge.net/20et.pdf.   This option presently has only limited implementation, and is tested to work only for executions on equal-temperament systems where the results are  to include only moments with chord occurrences (using the -HC3 option).   In this configuration each cell in the table displays a chord two ways on a staff.  The first chord shows the true relative arrangement of the planetary frequencies, and the second chord has the pitches transposed by octaves to fit into a single interval.  Other information included is the list of frequencies (with boxes around the ones included in the chords), the system root and the precise time given in UTC.   Next to each note head appears the symbol of the planet which is responsible for that note.  

In order to produce this output, the LATEX subsystem is used instead of the general TEX package.  (Chosen for the programmer's familiarity with it).  Configuring LATEX to compile the generated files properly requires several packages which are not necessarily in the standard distributions.  In addition to the standard AMS packages, the MusixTEX package by the late Daniel Taupin and the AstroSym font by Peter Schmitt are required, as well as the more common packages multirow, tabls, vmargin.  Setting up TEX systems is no simple task, but adding packages is more or less the same procedure for any package, so users wanting to pursue this option are encouraged to search the ample supply of TEX documentation available on the internet for understanding how to get full use from this option.   One final note about the MusixTEX  package, however, is that since Harmony outputs for LATEX , the musixtex.sty style is needed.  


Support for CSound is provided with the intention of producing an audio file from a list of ephemeral moments with appropriate constraints.  For example, a score could be generated from a list of all the planetary concordances that occurred between 1900 and 1945 such that those concordances formed chords of at least the order of a triad and fit into an equal temperament system with root at 440 Hz ±1%.   The following command could generate such a score file.

java -cp harmony.jar:commons.jar:astrolib.jar Harmony -x 1/1/1900 -e 1/1/1946 -i1d -k dat/equtemp.txt -HC3 -uo test.sco -t 440.0,1.0

CSound Command Line Options

{{Option, Description}, {-q, Set filename for score template .}, {-u, Enable CSound output format}}

Configuring most of the details of score file output is done not on the command line but instead via a score template.  The default template is dat/template.sco which is a CSound score file, with the following lines added.


Summary of CSound Score Template Options

Summary of Output Format Options

{{Option, Description}, {-r, Report in text format}, {-b, Serialization output for Ephemeral class}, {-M, TeX output}, {-u, CSound score output}, {-o, Output filename}}


Adding more ephemeris files

The ephemeris files used with Harmony are produced by JPL and are available freely from the website http://ssd.jpl.nasa.gov

The correct files are for the DE406 standard and not the DE405.  Each file spans 300 years and is about 10 MBytes in size.  To install them so that Harmony can use them, just place them in the directory /eph/DE406.  The next time that the program is executed, it should be able to read them automatically.

Argument for Harmony

As a compositional determinant, it may be argued that planetary motions are no more well-suited than countless other sources of random or periodic signals.   For example, the set of functions ω_i(t)=p_i(1+sin(tp_i^(1/2))) with p_i as the i-th prime is a much simpler model with properties similar to the motions.   Then from a mathematical perspective, the need for a well-developed link between planets and music is as nonsensical as many other conceivable links.   Clearly the appeal of Harmony lies more in fascination of the mystery than it does in arriving at knowledge proven useful.  
While this says nothing for the validity of Harmony as a serious musical tool or a serious scientific tool, in this way at least it is interesting to note that the pitch ranges of the planets as Kepler proposes does seem to make some musical sense, because together they more or less span the entire audio range.    Admittedly, there are some obscure arguments made by him at the end of the fifth book that seem to show that moments of harmony necessarily occur in the way that he has defined it, but what is not clear is how any of this somewhat unconventional thinking could serve as a foundation for continued scientific thinking.  That is to say, supposing that all of this harmonic theory in the sky has merit, then what next?  
One generalization that comes to mind is the use of music, pitch or harmony, as a means for understanding relationships in quantity.  For example, to teach someone that 3/5 × 5/4=3/4 and other simple rational arithmetic, the results could be heard eventually as easily as they could be imagined .  The limitation to this is that the multiplicands in such products have to be of reasonably similar order and not to extremes like millions plus thousandths.  Also, in some cases, the simple becomes far too complicated, like the addition operation.  Suppose we wanted to add   (2200+463) and arrive an answer harmonically or sonically.   The natural solution would be that we should start by listening to the two frequencies together:


However, from looking at the graphs alone it seems unlikely that frequency carries the linearity, f(a+b)=f(a)+f(b), that we would need.  We would have to be content with harmonic ratios forming an algebraic group under multiplication but not a ring.  Furthermore, by developing our ear for relative pitch we could develop an intuition with this group, but to what end?  A student of mathematics could argue that a theory built on harmonics is somewhat incompatible with mechanical physics, including planetary motion, because it doesn't give a suitable equivalent concept of a continuous variable in the way of being backbone of calculus-based mathematics.  
In conclusion, I would say that as I am presently a graduate student in mathematics who knows very little about such generalizations of harmonics, I would be happy to hear about past works that develop this kind of theory, if any do exist.

Created by Mathematica  (May 19, 2006) Valid XHTML 1.1!