Page  587 ï~~A CONSONANCE DISSONANCE ALGORITHM FOR INTERVALS Campbell D. Foster Horizon Acoustics and Design 4784 Castlemore Rd. RR9, Brampton Ontario, Canada L6T 3Z8 Tel: 905-794-0595 Abstract An algorithm is described which establishes an ordering of intervals from consonant to dissonant for music analysis and composition. While calculating and graphing the length of rhythmic phasings (unison) of note lengths 1 to 12 beats over a reference beat of 24 counts, I came to the realization that this analysis could be applied to frequencies. 2:1 (Octave) and 3:2 (Perfect Fifth) relationships became evident in the resulting graph that appeared to indicate a measure of dissonance and consonance of each of the intervals of the twelve tone scale. It was undertaken to discover a mathematical method of determining an intervals rated consonance or dissonance, and establish an ordering of the twelve intervals of the scale from consonance to increasing dissonance. One attempt to find the first unison zero crossing point of two simultaneously sounding fundamental tones used the Greatest Common Divisor algorithm applied to an array of scale frequencies. The resulting GCD numbers and sorting of the intervals revealed an incorrect sequence. "It is an established fact that the most pleasing combination of two tones is one in which the frequency ratio is expressible by two integers neither of which is large." (Olson, H.). The scale of just intonation contains frequency intervals represented by the ratios of the smaller integers of the harmonic series (2f, 3/2f, 4/3f,...). An attempt was made by multiplying the two whole numbers of the harmonic ratio (which exist in their lowest terms), closest to the equal temperament interval which produced the desired result. Thus for the interval r/r'f: C=rr' where C is the consonance-dissonance number, r and r' are the numbers in the harmonic ratio and f = frequency (in Hertz). The following is a graph of intervals from consonance to increasing dissonance ordered by their C numbers (Fig. 1). 250 S 200 "a 150 o so 0 Uni Oct P5 P4 M6 M3 m3 m6 m7 M2 M7 m2 TT 1/If 21lf 312f 413f 513f 5/4f 6/Sf 8/5f 9/5f 918f 15/8f 16/15f 45132f C C' G F A B D# G#/ A# D B C# F# Eb Ab Bb Db Gb 1 2 6 12 15 20 30 40 45 72 120 240 1440 Interval and Ratio Figure 1. Graph of Interval and Ratio vs Consonance-dissonance C Number IC M C PR O C EE D I N G S 199558 587

Page  588 ï~~Pitch deviation from just intonation in the equal temperament scale does not effect the ordering of interval by ratio (e.g.: just intonation perfect fourth = 4/3f, equal temperament perfect fourth = 4.00452/3f). This algorithm corrects previous graphs for order of merit of interval in consonance-dissonance series (Malmberg, C.) and order of rank [blending, tonal fusion (Seashore, C.)] which were agreed upon by mean sampling and ratings by ballot For intervals outside the range of the octave, multiply the ratio by 2 for every octave transposition for the interval. (C-A#) = (m7x2) = ((9x5)x2) = (45x2) = 90 To apply the algorithm to triads and other chords, find the C numbers for each interval in relation to the root of the chord, and multiply together these numbers. The result is the required C number. For example: C-G-C' = (PSxOct) = ((3x2)x2) = (6x2) = 12 C-E-C' = (M3xOct) = ((4x5)x2) = (20x2) = 40 C-E-G = (M3xP5) = ((4x5)x(3x2)) = (20x6) = 120 C-Eb-G = (m3xP5) = ((6x5)x(3x2)) = (30x6) = 180 C-G-C'-E' = (P5xOctx(M3x2)) = (6x2x20x2) = 480 For use in music analysis and composition, the algorithm described here creates a measure of pitch similarities or differences of two simultaneously (or successively) sounding tones. We perceive our environment through the difference of information arriving at our senses, information defined as any change of conditions of matter or space which are perceivable by any of our senses. This perception through difference can be extended into musical space. A perceptual Gestalt (Tenney, J.) or temporal instance of perception can be created or indicated using this mechanism of difference, applied to any musical parameter, from a physical level upwards to levels of perceptual constructs, concepts and forms. This algorithm does not address questions arising in the computer algorithmic generation of music or the application of boundaries to random choice selection of notes, or Meaning as created and applied to certain musical structures. Proof of this algorithm is greatly aided by hearing the interval order established. Further application of the algorithm to other sensory input, for example color frequencies of vibration, or timbral structures via their harmonic content could yield interesting results. Tenney, J., Hierarchical Temporal Gestalt Perception in Music: A "Metric Space" Model, York University, 1978. Seashore, C., Psychology of Music, Dover Publications, 1938. Olson, H., Music Physics and Engineering, Dover Publications, 1952. 588 8IC MC PROCEEDINGS 1995