Some Useful Computer Programs
Here are some computer programs useful in understanding and implementing dissonancebased tunings and timbres. Since I usually program in the language MATLAB, most of these are MATLAB programs, although the dissonance calculating program is also available in Microsoft's version of BASIC. Morgan Thunder has also translated the dissonance measuring program into C, and updated by Prof. Frink while Mauricio Rodriguez has translated it into LISP and endolith has translated it into python  thanks Morgan, Prof. Frink, Mauricio, and endolith!
To calculate the dissonance of a sound with a given spectrum, use the following program, which should be placed in your MATLAB folder and called dissmeasure.m
The logical structure and the meaning of the variables are discussed in the section How to Calculate Dissonance Curves of the paper Relating Tuning and Timbre, which is available online for your browsing pleasure.

Dissonance curves are made by calling the above function repeatedly. For instance, the following code calculates and plots the dissonance curve for a harmonic spectrum with 7 partials of equal amplitude, as shown in figure 3 of the paper "Relating Tuning and Timbre"

A pair of useful MATLAB programs converts from musical ratios into cents, and back again. These are


which should be named rat2cent.m and cent2rat.m and placed in your MATLAB folder. As usual in MATLAB, the input variables cents and ratios can be scalars or vectors.
For those without access to MATLAB, here is a version of the dissonance measuring program written in BASIC

To get to my homepage, click here.