Harmonic Visualizations of Tonal Music

Harmonic Visualizations of Tonal Music

Harmonic Visualizations of Tonal Music Craig Stuart Sapp Center for Computer Assisted Research in the Humanities Center for Computer Research in Music and Acoustics Stanford University email: [email protected] Abstract KS algorithm analyses BWV notated key prelude fugue Multi-timescale visualization techniques for displaying the 846 1. C major C major C major output from key-finding algorithms are presented in this pa- 847 2. C minor C minor C minor ] ] per. The horizontal axis of the key graphs represents time in 848 3. C] major C major G major ] ] the score, while the vertical axis represents the duration of 849 4. C] minor C minor C minor an analysis window used to select music for the key-finding 850 5. D major D major D major algorithm. Each analysis window result is shaded according 851 6. D minor D minor D minor [ [ to the output key’s tonic pitch. The resulting diagrams can be 852 7. E[ major E major E major ] [ ] used to compare differences between key-finding algorithms 853 8. E[/D min. E minor D minor at different time scales and to view the harmonic structure 854 9. E major E major E major and relationships between key regions in a musical composi- 855 10. E minor E minor E minor tion. 856 11. F major D minor Fmajor 857 12. F minor F minor F minor 1 Motivation Table 1: KS algorithm results when applied to entire WTC book 1 compositions compared to actual tonic keys of the A tonal composition is usually described as being in a par- music. Identification errors are underlined. ticular key, such as Brahms’ Symphony No. 4 in E minor, or Beethoven’s Piano Sonata in F minor, Op. 57; however, rarely does a piece of music maintain a single key center through- gorithm based on probe-tone ratings generated from experi- out its entirety. The key of a piece typically starts and ends mental results (Krumhansl 1990). The KS algorithm is im- the piece, but other key centers are used somewhere in the plemented in the key program contained in the Humdrum middle of a piece to give form to the music. A simple stereo- Toolkit for musical analysis (Huron). Applying the KS algo- typical tonal piece might start in the tonic key, modulate to rithm to an entire piece, table 1 lists the analyzed keys for the dominant, and then return to the tonic key by the end of the first half of the first book of J.S. Bach’s Well-Tempered the piece. Clavier using the key program. The Well-Tempered Clavier Currently available key-finding algorithms are not very is an excellent source of test material for testing key-finding sensitive to identifying modulations, and if given a selection algorithms, because each set of prelude and fugue in the col- of music which contains several modulations, the algorithms lection are in a different key, starting in C major and then pro- can only identify what the most likely key is for the entire gressing chromatically through all 24 major and minor keys. selection. If there are two key areas in a selection of mu- Table 1 points out two common errors generated by key- sic, then the algorithm hopefully assigns the stronger key the finding algorithms in general. The first error is in fugue no. 3 best score while the other key area hopefully is assigned the where the KS algorithm identifies the dominant rather than second best score. A key identification error may occur if the correct tonic key of C] major. The second error occurs an entire piece of music is presented to a key-finding algo- in the eleventh prelude where the relative minor is identified rithm, since the secondary key areas may overpower the start- rather than the key of F major. ing/ending key or bias the primary key towards a closely re- These two errors are primarily due to more than one key- lated key, such as the dominant or relative minor key areas. area being present in the analyzed music, causing slight off- One of the best algorithms for determining the key in a sets in the tonic key weightings such that a closely related key region of music is the Krumhansl-Schmuckler key-finding al- becomes more likely for the algorithm than the actual key. A fifth-relation error can occur if the secondary key areas are 2 Diagram Types predominantly all above or below the tonic key in the circle of fifths. The second error is a modality error. The correct 2.1 Key-To-Color Mappings key signature was identified, but the distribution of notes in the music was such that the tonic was incorrectly identified. To display data from key-finding algorithms in a compact Of course, the key identification errors in the two com- visual manner, each key is mapped to a different color. The positions from the Well-Tempered Clavier could be fixed by principle key-to-color mapping being used is shown in ta- only applying the algorithm to the first and last parts of the ble 2. The colors of the rainbow are mapped onto the circle music, since these sections are more likely to contain the tonic of fifths collapsed to the seven diatonic pitches. For example, key. However, side-stepping the issue in this manner creates the key C is assigned the color green. Ascending the circle other problems: (1) How much of the beginning and ending of fifths yields G (blue), D (indigo blue), A(purple), E (red). of the piece should be examined? and (2) What if the compo- Going the opposite direction in the circle of fifths takes you sition starts in one key and ends in another? The true problem through the rainbow colors in the opposite direction: F (yel- [ to solve is how to identify correctly regions of stable key cen- low), B[ (orange), E (red). ters and regions of modulation in a piece of music. diatonic diatonic If a more detailed view of a pieces’s key structure is de- pitch class color pitch class color G sired beyond the “key” of the piece, then a moment-by-moment E red blue D view of the key centers in the piece will give a much more de- B orange indigo A tailed description of the piece. Krumhansl proposes applying F yellow violet a sliding analysis window to the notes in a piece to generate C green localized key measurements. This gives a good overview of the key relationships in the music, but results can be sensitive root (R, G, B) root (R, G, B) to the analysis window size. A problem with this sliding win- [ C[ ( 36, 255, 0) G ( 54, 200, 218) dow technique is that the global importance of a local key is C ( 0, 255, 0) G ( 63, 191, 255) not apparent in the local context. A music theorists would as- ] C] ( 9, 246, 36) G ( 63, 177, 255) sign a sequence of key centers to a piece of music using both [ D[ ( 63, 109, 255) A (118, 41, 255) the global and local characteristics of the music. If a region D ( 63, 95, 255) A (127, 31, 255) is difficult to assign a key label, then music outside the local ] D] ( 73, 86, 255) A (145, 27, 219) region will be considered. It is very difficult to have a com- [ E [ (237, 4, 36) B (255, 109, 0) puter generate a reasonably accurate sequence of musically E (255, 0, 0) B (255, 127, 0) relevant key centers. ] E ] (255, 18, 0) B (255, 145, 0) Key visualization techniques described in the following ] F[ (255, 237, 0) F (218, 255, 0) section avoid the problem of choosing a fixed analysis win- F (255, 255, 0) dow duration by instead using all possible analysis window Table 2: Sample RGB color mappings for key tonics. durations. The interpretation of the local key problem is par- tially solved with these display methods because the height to which a key region survives in a diagram demonstrates the This color mapping is designed to be intuitively easy to relative strength of that key region. Strong modulations are navigate, since closely related keys map into closely related represented by large vertical structures, while tonicizations colors. The only drawback of this mapping is that there are are represented by smaller vertical structures. only 7 colors while there are 12 (or more) pitch classes— It is also possible to view the behavior between various notice that E and E[ have the same red color. Since enhar- key-finding algorithms at different analysis window sizes and monic keys are located far apart in key space, this mapping to see how they interact around regions of modulation. Key- is unambiguous for most tonal music and should only cause algorithms can then be compared using the diagram methods confusion in rare cases. A monochromatic color mapping has below to see how the different algorithms handle the same been used in this paper for printing in black-and-white, but music at various time scales. Numerous computational algo- it is possible to view example figures from this paper on the rithms for identifying keys using computers have been pro- World Wide Web (Sapp). posed since the 1960’s. See recent work and surveys on key- Of course, the choice of a color mapping from key to color finding algorithms by Temperley (1997), Chew (2000) and is arbitrary, and different color mappings may be suitable for Shmulevich and Yli-Harja (2000).

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    8 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us