Musical Tension Curves and its Applications

Min-Joon Yoo and In-Kwon Lee Department of Computer Science, Yonsei University [email protected], [email protected]

Abstract Madson and Fredrickson 1993; Krumhansl 1996). In these attempts, the tension at each part of music has been mea- We suggest a graphical representation of the musical tension sured by manual inputs of the participants in the experiments. flow in tonal music using a piecewise parametric curve, which In our work, we developed several methods to automatically is a function of time illustrating the changing degree of ten- compute the tension of a chord by combining known experi- sion in a corresponding chord progression. The tension curve mental results. Then the series of tension values correspond- can be edited by using conventional curve editing techniques ing to the given chord progression in the input music are in- to reharmonize the original music with reflecting the user’s terpolated to construct a smooth piecewise parametric curve. demand to control the tension of music. We introduce three We exploit the B-spline curve representation that is one of the different methods to measure the tension of a chord in terms most suitable method to model a complex shape such as ten- of a specific key, which can be used to represent the tension sion flow. Once the tension curve is constructed, we can edit of the chord numerically. Then, by interpolating the series of the tension flow of the original music by geometrically edit- numerical tension values, a tension curve is constructed. In ing the tension curve, where the tension curve editing also this paper, we show the tension curve editing method can be generates the new reharmonization of the original chord pro- effectively used in several interesting applications: enhanc- gression. ing or weakening the overall feeling of tension in a whole In this paper, we show our tension curve editing method song, the local control of tension in a specific region of music, can be effectively used in several interesting applications: en- the progressive transition of tension flow from source to tar- hancing or weakening the overall feeling of tension in a whole get chord progressions, and natural connection of two songs song, the local control of tension in a specific region of music, with maintaining the smoothness of the tension flow. the progressive transition of tension flow from source to tar- get chord progressions, and natural connection of two songs with maintaining the smoothness of the tension flow. All of 1 Introduction these application results are achieved by appropriate geomet- rical curve editing methods such as curve translation, local Musical tension or dissonance is an important term in music curve shape control with space-time constraints, curve mor- analysis. In most music analysis books (Schoenberg 1954; phing, and shape blending. Piston 1987), musical tension is analyzed by an examination Consequently, our work shows the possibility of control- of the intervals, the harmonic context, and the tonal motion. ling the perceptual factor (tension) in music by using numer- We divide musical tension in three categories: melodic ten- ical methods. Note that most of the computations used in sion (melody versus chord), harmonic tension (chord versus this paper are not expensive so they can be executed in real- key), and chord tension (simultaneous tones) and we focus on time. Thus, the real-time modifications of the tenseness in harmonic tension and chord tension in this paper. background music could be possible according to the user’s we suggest a new method to represent the tension flow emotion or current scenario in the interactive environments using a smooth piecewise parametric curve. The resulting such as games. tension curve, a numerical model, can be used to control the degree of tension in music. By applying various conventional curve editing techniques to the tension curve, we can con- struct a flexible model for locally or globally controlling the tension of music. The attempts to illustrate the tension in music has been executed mainly in the area of psychology (Nielson 1983;

482 2 Computing Tension of Chords Shepard 1979). She suggested a numeral rating assigned by human subjects to certain pitches, that is, the rating of the 2.1 Using Lerdahl’s Tonal tonal stability of certain pitches with respect to a given scale. We thought that this stability rating can also be applied In Lerdahl’s theory of tonal pitch space (Lerdahl 1988), he to calculate the amount of the tension of chord because each suggested a model to calculate the psychological distance of chord consists of several pitches and the tension is made from any pitch, chord, or region (key) from a given reference point. them. Table 1 shows normalized instability values. Let us consider the two chords x = {p1, p2, · · ·} in key kx and y = {q1, q2, · · ·} in key ky, where {pi} and {qi} (i = C C# D D# E F F# G G# A A# B 1, 2, ···) are the sets of pitch classes in the chord x and y, re- Major 0 100 70 97 48 55 94 27 97 67 100 85 spectively. Lerdahl defined the distance between two chords Minor 0 96 73 27 96 73 100 42 62 96 77 85 x and y by: d(x → y) = a + b + c, (1) Table 1: The normalized instability values of each pitch in the C key. where a is the number of steps from the key kx to ky on the circle of fifths, b is the number of steps from the chord x to y on the circle of fifths, and c is a specially weighted Hamming Although we got a good rating of each chord by the probe distance between the two sets of pitch classes x and y. If any tone, this was not enough because the tension is made by not of both chords has a seventh and/or a tension note, an addi- only the pitches but also the intervals among the pitches in tional value is added to the distance by Lerdahl’s suggestion the chord. So we also considered the rating of intervals using for calculating the surface dissonance (Lerdahl 1996). the traditional ranking of harmonic consonance. We assigned In our work, we consider a tension of an arbitrary chord linearly increased tension values to the pitch intervals in the x in terms of a specific key k by assuming that the higher order: Unison, Perfect 5th, , Perfect 4th, Major 3rd, Major the distance between a chord x and a tonic triad chord kt of 6th, minor 3rd, minor 6th, Major 2nd, Minor 7th, Major 7th, the key k, the more tense the chord x. Thus, the tension of minor 2nd, and tritone (see Table 2). the chord x in the key k is defined by d(kt → x) computed by the Equation (1). We calculated the distance from C triad Interval P1 m2 M2 m3 M3 P4 TRI P5 m6 M7 m7 M7 value 0 91 64 46 37 18 100 9 55 36 73 82 to twenty-four selected chords in the C key including triads, seventh, sixth, substitute chords, and etc., according to this Table 2: The normalized instability values of each interval rule. (P:perfect, m:minor, M:major, and TRI:tritone)

2.2 Using Chew’s Spiral Array Model In this model, the degree of tension of a chord is calcu- Chew (Chew 2000) suggested a 3D spiral array model of the lated as follows: circle of fifth that represents a hierarchical musical factors X X such as pitch, chord, and key in a geometric point of view. d(x) = w1 s + w2 r, (3) In this model, the distance between two musical factors can be measured by Euclidean distance between two points cor- where s is the instability value of the pitches in the chord x responding to the factors. Let x = {p1, p2, · · ·} be a chord (Table 1), r is the rank of intervals in the chord x (Table 2), in a key k. According to the Chew’s work, the pitch classes and w1 and w2 are weight constants for the two terms, respec- p1, p2, ··· and the key k can be represented as corresponding tively. In our implementation, we set w1 = w2 in order that 3D points v1, v2, ··· and w in the spiral array model, respec- two factors have influence on tension of the chord x equally. tively. In our work, we define the tension of the chord x in the key k as the sum of all Euclidean distances between the 2.4 Comparison of Three Methods each pitch point and key point: Table 3 shows the ranking of the 24 selected chords in C X d(x) = kvi − wk. (2) key according to the tension values computed from the three i methods. The amount of tension are normalized to the range [0, 1] for easy relative comparison. 2.3 Using Pitch-Interval Method Lerdahl’s method focus on harmonic tension and Chew’s method is related to chord tension (remember the definitions Psychologist Krumhansl introduced the probe tone technique of harmonic and chord tension in Section 1). Pitch-Interval to quantify the hierarchy of tonal stability (Krumhansl and method, however, can consider both tensions.

483 Lerdahl’s Chew’s Pitch-Interval chords tension chords tension chords tension 3 Constructing Tension Curves C 0.00 C 0.00 C 0.00 CM7 0.07 Am 0.06 Am 0.08 The tension value of each chord in an original song is com- C6 0.21 Em 0.50 Em 0.17 puted using one of the methods in the previous section. In Am 0.50 C6 0.26 C6 0.35 our work, we enforce that any chord in the tonic family has Am7 0.57 Am7 0.26 Am7 0.37 Em 0.57 CM7 0.32 CM7 0.38 less tension value than any chord in the subdominant family. Em7 0.64 Em7 0.37 Em7 0.55 Similarly, all subdominant family chords are treated to have F]m7-5 0.86 F]m7-5 0.48 F]m7-5 0.67 less tension than any dominant family chord. In each chord F 0.36 F 0.13 F 0.09 family, the order of chords are determined by the rank shown FM7 0.43 Dm 0.18 Dm 0.24 F6 0.57 FM7 0.37 FM7 0.41 in Table 3. So, for example, the order of chords in terms of Dm 0.57 F6 0.39 F6 0.45 the ascending tension value using Lerdahl’s method is: C - Fm6 0.64 Dm7 0.39 Dm7 0.47 CM7 - C6 - Am - Am7 - Em - Em7 - F]m7[5 - F - FM7 - Dm7 0.64 B[M7 0.56 B[M7 0.66 F6 - ··· - Bm7[5 - Bdim7 - D[7. This strict classification of B[M7 0.71 Fm6 0.59 Fm6 0.66 G 0.36 G 0.13 G 0.22 chord family is reflecting the traditional tension-and-release G7 0.43 Bm-5 0.24 G7sus4 0.42 concept. G7sus4 0.57 G7sus4 0.33 Bm-5 0.47 After computing the all tension values in a song, we can Bm-5 0.79 G7 0.44 G7 0.73 construct a smooth piecewise parametric curve by the curve G7-5 0.79 Bm7-5 0.50 Bm7-5 0.81 G7+5 0.79 G7+5 0.58 G7+5 0.86 interpolation algorithm. We exploit the famous B-spline in- Bm7-5 0.86 Bdim7 0.70 D[7 0.94 terpolation technique (Cohen et al. 2001) to construct a 1D Bdim7 0.86 G7-5 0.74 G7-5 0.95 cubic B-spline curve T (t). Figure 1 shows an example of the D[7 1.00 D[7 1.00 Bdim7 1.00 tension curves. Note that the horizontal axis represents the time parameter t, while the vertical axis represents the ten- Table 3: The ranking of the selected 24 chords in C key according sion value T . to the tension values calculated by three methods. The chords are grouped into tonic, subdominant, and dominant.

We compare these methods on a simple criterion. Gen- erally the three chord families are known to have different degrees of tension: tonic < subdominant < dominant. We sorted the twenty-four chords according to the tension values calculated by each method and counted the number of chords that are out of sequence. There are subdominant chords and dominant chords with lower tension values than tonic chords, Figure 1: An example tension curve with a chord sequence: C - C and dominant chords with lower tension values than subdom- - C - Am - Am - F - G - Am - Am - C - C - Am -Am - F - G - C. inant chords. Table 4 shows the number of chords that are out of sequence in each case.

Counter sequence Lerdahl’s Chew’s Pitch-Interval T-S 19 17 13 4 Editing Tension Curves T-D 9 15 13 S-D 12 14 21 Total 40 46 47 4.1 Enhancing the Tension The overall tension in original music can be enhanced by Table 4: The number of chords that are placed out of sequence by T (t) T (t) = each method. T-S is the number of subdominant chords (S) with shifting the tension curve of the music up to ∗ lower tension values than tonic chords(T); T-D and S-D have similar T (t) + (0, ∆T ) with positive ∆T or weakened using nega- meanings, where D indicates the dominant. tive ∆T . The newly computed T∗(t) represents the tension curve of the new chord progression for the original song. We can compute the new reharmonization of the song by sam- These results suggest that the pitch-interval method pro- pling T∗(t) at appropriate time instances. (see Figure 2). duces the most accurate ordering. But the difference between the methods is quite small, and all three methods represent valid ways to measure the tension of chords.

484 contrast with just moving the constraint point and then re- computing the spline.

Figure 3: Editing a tension curve using the space-time editing tech- Figure 2: An example of tension enhancing: (a): original chord nique. The bold curve (a) is an original curve and the thin curve (b) sequence, and (b)-(f): chord sequences generated by enhanced ten- is the edited curve that satisfies the constraint indicated by the star sion curves. The tension rank of the chords is computed using the mark. pitch-interval method.

4.2 Local Editing of Tension Curves 4.3 Morphing/Blending Two Chord Sequences Although the tension curves can be easily edited using well- We can compute the continuous steps to smoothly change a known control-point based methods (Cohen et al. 2001), we given source chord sequence into a target one using the curve use another method called “space-time constraints method” morphing technique (Surazhsky and Elber 2002). A simple (Witkin and Kass 1988) to control the local shapes of the ten- implementation is defined by: sion curves. The idea of the space-time editing is using the optimization method to minimize the squared difference be- S(t) = s · T1(t) + (1 − s) · T2(t), 0 ≤ s ≤ 1, (5) tween the original curve and the new curve generated by edit- where S(t) represents an intermediate curve in the process of ing. In this optimization problem, the editing constraints can morphing from the source curve T1(t) into the target curve be added to reflect the user’s demands. T2(t). We can compute the series of intermediate curves us- Let T (t) be an existing tension curve. An editing con- ing several steps of corresponding s values in [0..1]. This straint can be represented as T (t∗) = v, which means we operation is useful for generating the smooth (tension) transi- need that the tension curve has a specific tension value v at a tion between two different chord sequences. Figure 4 shows specific time t∗. Then, the optimization problem of the space- an example of a tension curve morphing. time editing that can be used to find a newly computed curve S(t) is defined by:

2 minimize(T (t) − S(t)) subject to T (t∗) = v. (4)

The above problem means that we want to keep the tension curve as original as possible while satisfying a local editing Bm-5 BbM7 CM7 Am Am F Bm-5 Am BbM7 FM7 Am7 Am C6 F G C6 constraint. Using this technique, we can maintain the overall F F#m-5 C6 C Am7 F Dm7 C6 Am7 C6 Am C Em7 F FM7 Em7 tension flow of the original music with editing the music to C C C C F F F F have some specific tension degree at a specific time. In this paper, the curves T (t) and S(t) are represented with the B- Figure 4: Tension curve morphing: (a) is the original curve and (e) spline curves, thus, the unknown variables of the above prob- is the target curve. (b)–(d) are intermediate curves. lem are the control points of the newly computed S(t) curve. Figure 3 shows a resulting tension curve computed by space-time editing method. In figure 3 chord change occurs Two different chord segments also can be smoothly con- not only in target constraint chord but also in neighborhood nected using the curve blending technique. In our implemen- of constraint chord. It makes much stronger local change of tation, we used the Hermite interpolation technique (Cohen tension. This is the advantage of the space-time method in et al. 2001) to compute the blending curve to connect the two tension curves (see Figure 5).

485 (a) References (c) Chew, E. (2000). Towards a Mathematical Model of . Doctoral dissertation, Cambridge: MIT. Cohen, E., R.F.Riesenfeld, and G.Elber (2001). Geometric Modeling with (b) Splines: An Introduction. Natick, Massachusetts: A K Peters. Felts, R. (2002). Reharmonization Techniques. Berklee Press. (a) G G G7 G7 G G G7 G7 G Krumhansl, C. (1996). A perceptual analysis of mozart’s piano sonata (b) CM7 CM7 C C CM7 CM7 CC k.282: Segmentation, tension, and musical ideas. Music Percep- (c) G G G7 G7 G Dm7 Dm Am7 CM7 CM7 CC tion 13(3), 401–432. Krumhansl, C. L. and R. N. Shepard (1979). Quantification of the hier- Figure 5: Blending tension curve. (a) and (b) are original curves archy of tonal functions within the diatonic context. Journal of Ex- and (c) is a blending curve between (a) and (b). perimental Psychology: Human Perception and Performance 5(1), 579–594. Lerdahl, F. (1988). Tonal pitch space. Music Perception 5(1), 315–350. Lerdahl, F. (1996). Calculating tonal tension. Music Perception 13(1), 5 Conclusions and Future work 319–363. Madson, C. and W. Fredrickson (1993). The experience of musical ten- In this paper, we suggested a method for numerical modeling sion: A replication of nielsen’s research using the continuous re- of tension in music with some interesting operations which sponse digital interface. Journal of Music Therapy 30(1), 46–63. can be used to edit the tension flow using various curve ma- Mazzola, G. (2002). The Topos of Music. Basel: Birkhauser. nipulation techniques. Nielson, F. V. (1983). Oplevelse of musikalsk spæding(The experience of Because we only focus on the numerical representation musical tension. Copenhagen: Akademisk Forlag. of tension in a music, the resulting chord sequences some- Piston, W. (1987). Harmony. New York: W.W.Norton & Company, Inc. Schoenberg, A. (1954). Structural Functions of Harmony. New York: times may not match human intuition. Nevertheless, the re- Norton. sulting chord sequences can be a good start point to produce Sethares, W. (2004). Tuning, Timbre, Spectrum, Scale. London: Springer. more interesting music. For better tension curve construc- Surazhsky, T. and G. Elber (2002). Metamorphosis of planar paramet- tion and editing, we may consider many musical rules such as ric curves via curvature interpolation. The international Journal of chord progression or substitution rules in jazz harmony (Felts Shape Modeling 8(2), 201–216. 2002). Witkin, A. and M. Kass (1988). Spacetime constraints. In ACM Proceed- In this paper, we don’t consider on melodic tension, that ings of SIGGRAPH 1988, pp. 159–168. ACM. is, relation between melody and chord, so some resampled chords may not match with a given melody. We hope that our system is extended to the general system including all kind of tension more concretely, especially in the perspectives of mathematical and computational music theory such as the HarmoRubette of the software RUBATO(Mazzola 2002). In another point of view, there are some attempts of calcu- lating the tension, or (more concretely) ‘dissonance’ of audio signal numerically(Sethares 2004). Although our paper deals with manipulating tension based on a score, it is interesting to manipulate tension of audio signal in the similar manner.

Acknowledgements

The Authors would like to thank the anonymous reviewers for their helpful comments. This research is accomplished as the result of the promotion project for culture contents technol- ogy research center supported by Korea Culture & Content Agency(KOCCA).

486