Monday, July 10, 2017

Melodic Math: Harnessing Memorability in Pop Melodies

When asked about his approach to songwriting, eminent pop producer Max Martin often speaks of something called “melodic math.” As Martin owes much of his success to the catchiness of his melodies, this paper examines the psychological principles behind catchiness––what makes a melody memorable. A cursory look at various scientific studies linking memory and aspects of melody provides insight into several principles of melodic catchiness: repetition and motivic variation across phrases and sections, implication and realization within pitch contours, cognitive limits of recall in regards to rhythm span, and textual integration. Examination of Katy Perry’s “Roar”––a quintessential example of Martin’s songwriting––reveals that Martin does, in fact, adhere to these principles. Whether this is by study or instinct is less certain, but it suggests that “melodic math” may a viable discipline that other writers can emulate.


Karl Martin Sandberg, more widely known by the pseudonym Max Martin, is one of the most successful songwriters of the past generation. With twenty No. 1 Billboard hits as of 2015, (in a cool third place behind John Lennon and Paul McCartney, he falls into the upper echelons of pop heavyweights, reliably producing smash hit after smash hit. He fills various roles in the process of production, but he’s most often celebrated for his “gift for melody, which is timeless, and owes as much to Edvard Grieg…as to any contemporary influence.” (Seabrook, 2015, p. 75, 97) According to Savan Kotecha, a successful producer and songwriter in his own right, Martin “has the best ear for catchy melodies––maybe the best in pop history… He can write great melodies, [and] he understands what’s wrong with other people’s melodies.” (Thompson, 2017, p. 76) Famously elusive and tight-lipped, Martin has given the public precious few insights into his creative process. However, when asked about the secret to his success, he has several times mentioned something called “melodic math,” (Seabrook, 2015, p. 40) hinting at a repeatable, algorithmic approach to the construction of his vocal hooks.

Martin may be exaggerating or misnaming his process, but he raises an interesting question: Are there quantifiable principles behind successful melodies and if so what are they? Is a hit melody the output of some mathematical formula that dictates ideal combinations of intervals and rhythms? 

To answer this, we must determine what constitutes a successful melody in the first place. For our purposes, we will be focusing specifically on the vocal melodies with lyrics attached that constitute the primary salient feature of top 40 pop. Rather than attempt to evaluate these melodies on the basis of pure quality (which would demand consideration of the aesthetics of western music, harmonic tension and release, counterpoint, etc.), we will confine our investigation to memorability or “catchiness”––that quality which enables a melody to successfully infiltrate the brain’s systems of recall and embed itself there as an earworm. "I will sacrifice everything,” Victorian songwriter Felix McGlennon famously said, “rhyme, reason, sense, and sentiment, to catchiness.” (Hamilton, 1998) To determine the viability of Max Martin’s supposed “melodic math” as it relates to memorability, we will delve into the science of catchiness, breaking melody down into its component parts––phrasing, pitch contour, rhythm, timbre, and text––and discussing some of the relevant psychological research into how the human brain responds to each. 

Along the way, we’ll be looking at Katy Perry’s “Roar,” one of Martin’s #1 smashes (penned by Martin in collaboration with Perry as well as Lukasz Gottwald, Bonnie McKee, and Henry Walter) as an example of his “melodic math” at work.

1. Structure

“Repetition,” in addition to being the mother of all learning, “is the god particle of music,” according to author Derek Thompson. And its power “is fractal, appearing at every level. Repetition of rhythm is necessary to build a musical hook. The repetition of hooks is necessary for choruses. Choruses repeat several times in each song, and people often honor their favorite songs by putting them on repeat.” (2017, p. 79) Repetition is the obvious catalyst for memorability––the key ingredient when brewing an earworm. (Stafford, 2012)

Anyone who has had the experience of getting a song “stuck in his/her head,” however, can tell you that pure repetition is not necessarily a positive thing. Neurologist Oliver Sacks speaks of earworms in almost pathological terms: “These repetitions…are apt to go on for hours or days, circling in the mind, before fading away. This endless repetition and the fact that the music in question may be irrelevant or trivial, not to one’s taste, or even hateful, suggest a coercive process, that the music has entered and subverted a part of the brain, forcing it to fire repetitively and autonomously (as may happen with a tic or seizure).” (2012, p.44)

So, while the human brain responds positively to repetition, there is a negative side to it as well.  A listener could easily become annoyed by an overabundance of motivic recurrence. Or, alternatively, he/she may become habituated to it to the extent that the music loses his/her attention altogether. “Catchiness,” however, has more of a positive connotation, describing something that is not only memorable but memorable in an agreeable way. (Catchy, n.d.) Industrial designer Raymond Loewy sought a balance in his own work between familiarity and novelty as is reflected in his MAYA principle: Most Advanced Yet Acceptable. Loewy felt that people had an innate preference for the familiar––the comfortable and recognizable––mixed with a penchant for seeking out the novel and it was necessary for a designer to cater to both. (Thompson, 2017, p. 56) Musically speaking, Loewy’s MAYA principle could be expressed as a balance of motivic restatement and development. According to BBC resident psychologist Tom Stafford, “tunes that become earworms have a little twist or peculiarity.” (2012) When pursuing catchiness, repetition must be tempered with variation.

One example of this balance can be seen in the score below. Figure 1.1 demarcates (via color coding) the melodic phrases within the first verse and chorus of Katy Perr’s “Roar.” The repetition is obvious: the first melodic phrase (labeled A) repeats exactly three times within the verse. This repetition is tempered by simple alternation with phrase B and subsequent abandonment. This is possibly the first clue as to Martin’s “melodic math” approach. “If you’ve got a verse [that has] a lot of rhythm,” he once told an interviewer, “you want to pair it with something that doesn’t. Longer notes. Something that might not start at the same beat… You need a balance, at all times. If the verse is a bit messy, you need it to be less messy right after. It needs to vary.” (Gradvall, 2016) Far from being messy, the phrasing in this example is meticulously exact. The repeated phrases, in every aspect except text, are carbon copies of one another. According to songwriter Bonnie McKee, Martin is “really stubborn about syllables... If you add a syllable, or take it away, it’s a completely different melody to him.” (Seabrook, 2015, p. 263) This motivic symmetry is encouraged by songwriting instructor and author Jason Blume who promotes the use of “lines that have the same number of notes, with stresses and emphases in the same places.” (Blume, 2004, p. 111) “Roar” is a pristine example of this. Nearly every note in the verse and chorus belongs to a phrase that is repeatedly exactly at least once.

The overall structure of the song reflects this balance of repetition and variation as well. “Anything repeated (straight or varied),” writes Richard Middleton, “is defined as a unit, and this is true on all levels, from sections through phrases.” (1990) Thus, it is repetition that gives pop its modular structure. Figure 1.2 shows the overarching songform of “Roar.” This form––Verse-Chorus-Verse-Chorus-Bridge-Chorus or ABABCB––is “the most common pattern in the last fifty years of pop music.” (Thompson, 2017, p. 84) And while there are probably myriad reasons for this, David Huron, a musicologist at Ohio State University, has an idea about how songforms like this one may be rooted in a biological response to habituation and surprise. Huron performed a study in which mice were startled with a loud noise and then habituated to that noise through repetition. After a certain threshold of exposure, the noise ceased to elicit a surprised response from the mice. In the next phase of the study, other noises were introduced in various sequences with the first. “To scare a mouse for the longest period of time with the fewest notes, scientists…found success with variations on the following sequence: BBBBC–BBBC–BBC–BC–D.” (ibid.) The tail end of that sequence (BBC–BC–D) resembles the songform of “Roar” and other songs like it. Obviously, the similarity is not exact, mice are not people, and startling noises are not melodies. As T.W. Adorno believed, this structure may have simply gained its ubiquity within pop music by conforming to societal norms. (Middleton, 1990) However, there may be a biological/neurological connection between songform and habituation that researchers could further explore.

Figure 1.1  

Figure 1.2  

2. Pitch Contours

We’ve examined motivic symmetry and structure of melodic phrases, but can a phrase be catchy in and of itself? Are some figures or intervals more objectively memorable than others? One clue can be found in the concept of expectancy––how listeners anticipate a melody will continue once begun. A study by psychologist Mark Schmuckler suggested that “melodies in which endings fit with listeners’ expectancies [are] better remembered than melodies that did not fit listeners’ expectancies.” In other words, if a melody continues the way we think it will, there is a better chance we’ll remember it.

In the early 90s Eugene Narmour wanted to find out if listeners universally anticipated melodic motion in a certain way. His research led him to develop the Implication-Realization (I-R) model of melodic expectation, a set of principles that describes the way listeners expect melodies to continue. Research conducted by Schellenberg (1996) reveals that the model holds true across cultures and varying degrees of musical training. In his experiments, researchers played fragments of melodies to three sets of two dozen students at Cornell University and asked the subjects to rate various tones for perceived continuity. As a result, Schellenberg was able to further simplify the I-R model into the following principles:

  • Registral Direction: An interval of 6 semitones or less implies the melody will continue in the same direction, whereas intervals greater than 6 semitones imply the direction of the melody will reverse.

  • Registral Return: When a pitch contour reverses direction, large intervals will be followed by smaller ones.

  • Proximity: Listeners have a tendency to predict smaller intervals overall.

Taken together, these principles describe a melody that hovers in a narrow register, moving mostly in a series of small steps, occasionally punctuated by large intervals that quickly return to the register from which they leapt. Schellenberg’s sample size is small, but it suggests that, for whatever reason, people tend to expect melodies to continue this way. “The predominance of small intervals (proximate tones) in melodies across musical cultures,” he posits, “could…stem, in part, from vocal production limitations, because small intervals are easier than large intervals to sing.” (1996)

“Roar,” as shown in Figure 2.1, seems to follow the principles of the revised I-R model to some extent. The chart shows the incidence of intervals within the first verse and chorus of Katy Perry’s “Roar.” Minor thirds and major seconds together account for over 80% of intervals used. The largest interval used, the perfect fifth, is the only interval over six semitones used in the song and when it is used, the melody reverses direction as per the principle of Registral Return.

Keeping melodies proximate and easy for non-musicians to sing along with is another idea promoted by songwriter and author Jason Blume as expressed in his acronym K.I.S.S.: Keep It Simple and Singable. “Many developing songwriters,” he writes, “…make the mistake of composing complicated melodic lines that are too intricate for a nonsinger to retain.” (2004, p. 104) With “Roar,” Martin and his collaborators have written a melody that largely conforms to the revised I-R model, making it (in theory) easier to sing along with and easier to remember.

One could argue, however, that some of pop’s most memorable melodies are near impossible for non-musicians to replicate. Consider, for example, Queen’s “Bohemian Rhapsody” or the virtuosic prowess of divas like Mariah Carey. Research by Kubovy demonstrates that “people experience pleasure from displays of extraordinary musical skill or virtuosity.” (Hallam and others, 2009, p. 155) Perhaps the pleasure derived from a simple, singable tune and the pleasure derived from hearing a virtuosic melisma stem from different but connected parts of the brain. Celebrated songwriter and One Republic frontman Ryan Tedder spoke to The Times about the importance of repetitive, tightly structured phrasing with an important caveat: “…Unless you’re Beyonce.” (Potton, 2016) Elizabeth Margulis, a musicologist at the University of Arkansas Music Cognition Lab puts it this way: “People like new and surprising melodies. But when we feel like we can accurately make tiny predictions about how a song is going to go, it feels really good.” (Thompson, 2017, p. 80)

Figure 2.1 

3. Rhythm

Melodies are not simply sequences of notes. They owe their identities to rhythm, duration, and rests as much as pitch. What makes a rhythm easily memorable? In one study conducted by Schaal, Banissy, and Lange, participants including musicians and non-musicians were challenged with a rhythm span memory task evaluating their capacity to memorize rhythmic sequences of varying lengths. Their results indicate that memorizing longer rhythmic patterns is a task that favors listeners with “many years of formal musical training.” (2015, p. 3) Likewise psychomusicologist Judy Edworthy “demonstrated that contour information becomes less precise in memory as melody length increases.” (Hallam and others, 2009, p. 102) If the goal is memorability, then, it is best to deploy brief patterns of durations and rests.

Referring back to our example in Figure 1.1, the longest phrase in “Roar” is the first instance of phrase E which, including its pickup note, measures only six beats in length. Most of the phrases in Figure 1.1 fit within one bar. In Schaal’s rhythm span task, most non-musician participants’ capacity for rhythmic retention capped at around four seconds. (See Figure 3.1) At 90 beats per minute, four seconds is the exact time that “Roar’s” longest phrase takes to sing. Whether this is a coincidence or knowledge of research like this informs Martin’s “melodic math” is unclear, but the example cooperates with the data.
Figure 3.1 

(Schaal and others, 2015, p. 6)

4. Timbre

Pitch contour and rhythm are the most obvious components of melody, but there are other aspects to consider, including surface features such as key, tempo, and timbre. Research by Schellenberg and others suggests that while features like key and tempo are encoded in long-term memory after abundant exposure, first-time or second-time listeners do not retain this information as integral to a melodic identity. (2014, p. 84) In other words, you might notice a difference when you hear your favorite song played in a new key, but you’re not likely to perceive the key of a freshly-heard tune. Timbre, however, is different. 

In a study conducted in Brasilia and São Paulo, a selection of both musicians and non-musicians heard forty-eight British and Irish folk melodies in four different timbres (voice, piano, banjo, and marimba). Participants “showed a…memory advantage for vocal melodies. Moreover, pianists [remembered] melodies played on piano [no better] than on other instruments.”  (Weiss and others, 2015) These findings suggest the human brain more easily retains musical information that is sung rather than played on an instrument. A separate study by Lim and Goh explored the effect of differences in articulation on memorability and found that differences in articulation interfere with listeners’ ability to retain melodies. (2013) Marrying a melody to a particular voice ensures a certain degree of consistency of articulation and, therefore, may further enhance recall.

It is no wonder, then, that pop songs are almost universally “a composite of melody, lyrics, voice, and instrumental arrangement [not to] be confused with the way we think of music in the strict sense.” (Hesmondhalgh & Negus, 2002, p. 33) The catchiest hooks are delivered on the instrument we all possess and use on a daily basis––the human voice.

5. Text

Obviously not all melodies have lyrics attached to them, but in pop music text is a ubiquitous and apparently essential ingredient to success. Between 2005 and 2015 only one instrumental track (“Harlem Shake”) entered Billboard’s Top 10 (Nawrocki, 2015) and it is worth noting that even that song has a spoken vocal sample for a hook. Why this preference for words in pop music? Studies by Serafine, Davidson, Crowder, and Repp have identified a phenomenon known as the integration effect––“the tendency for a melody to be better recognized when the text was the one with which the melody was originally heard than when the text was different.” (1986, p. 123) 

In short, melodies are more easily remembered when attached to text. In fact, one could say that lyrics function as a mnemonic device for melody. According to Serafine et al., this holds true even for nonsense words, ruling out the idea that semantic connotation is the driving factor behind the integration effect. “This does not imply, however, that semantic integration of melody and text never occurs. Indeed, especially in those cases where the melody directly symbolizes textual meaning (e.g., repeated eighth notes on ‘tapping’), integration on the semantic level seems likely.” (1986, p. 129) Jason Blume encourages aspiring songwriters to make use of semantic integration or prosody. “Ideally the final version of your song should sound as though the words and music fit together so perfectly that the listener cannot imagine another melody accompanying that lyric, or another lyric working with that melody.” (2004, p. 106)

There is one component of song text that makes special use of the integration effect: the hook. The hook is the fulcrum of pop song structure. Author John Seabrook describes it as “a short, sung line that grips the rhythm with melodic talons and soars skyward.” (2015b, p.7) A less flowery definition furnished by Blume (2004, p. 7) describes it as simply the most addictive of the song’s various motifs. Textually, it is most often the point at which the title is sung, thereby serving to “summarize the idea and emotion of the song in a general way and to hammer home [the] title.” (ibid.) Songwriters employ various musical devices to make the hook stand out, including altering the melodic range, varying the rhythm, or inserting carefully timed pauses. (ibid., p. 105) 

Songwriters often ensure maximum integration with the hook by repeating the lyrics of choruses, though not those of verses. Thus, verses develop lyrical themes while the chorus repeats and summarizes them. In Figure 5.1, the hook of “Roar” is shown in red text along with repetition of lyrics within the verse and chorus (shown in blue, green, and yellow). The repetition of the phrase “I am a champion” sets up the following hook: “You’re gonna hear me roar.” The hook is further emphasized melodically as the highest note of the song’s tessitura (circled in red) falls squarely within it.

Figure 5.1


Max Martin’s catchphrase “melodic math” alliterates nicely and hints tantalizingly at the prospect of a foolproof mechanism of hit-composition. However, without more evidence of his actual working processes, it’s impossible to know how methodical or “mathematical” his personal approach actually is. What we can conclude from examining the relevant literature is that there are several psychological factors behind the phenomenon of catchiness: a human proclivity for repetition both in terms of musical phrasing and text, a connection between expectancy and memory, a comfort found in small, singable intervals, and limitations on the length of phrases that listeners can remember. The example we have studied, “Roar,” seems to apply these principles. Martin’s melodies are tightly structured and highly symmetrical. The pitch contours are predictable according to the I-R model. He knows how to place a hook and make it stand out. Regardless of whether his approach is studied or instinctual, the data supports the techniques he and his colleagues implement in their songwriting, suggesting that “melodic math”  (though perhaps, in the absence of a discussion of ratios and formulas, “method” may be a better word) may a viable discipline that other writers can emulate..

This is not to say, of course, that the data supports a one-size-fits-all approach. There are fundamental principles at work here but songwriters are free to conform to or subvert these norms as they wish. And, as Raymond Loewy believed, people need a healthy dose of novelty to balance out familiarity and convention. They are caught in a “tug-of-war between the opposing principles of neophilia versus neophobia.” (Thompson, 2017, p. 56) If hit melodies were nothing but math, every song would resemble a sort of Platonic ideal––the mean of all  other songs. Rather, it is the X factor––variation––that gives music its life. 

Martin knows this. When elaborating on his “melodic math” in an interview, he once said, “I’m afraid it might sound like I’ve got a whole concept figured out…But it’s not like that. The most crucial thing is always how it feels.” The feel he’s talking about might be “the instinct that develops from being around music, musicians and studios your whole life…the reason that DJ’s with no musical or technical ability can still become excellent producers. They have listened to many, many records, logged the way people responded to the music and subconsciously programmed their instinct to be able to reproduce those excitement factors in their own records.” (McIntyre, 2007, p. 3) The knack for writing great melodies must be learned whether by study or by sheer cultural osmosis. It is a subtle art of finding just the right amount of variation in a world of repetition, just the right leap among the melodic steps––just the right surprise among the familiarity. Perhaps Ron Simpson, professor of Media Music at Brigham Young University said it best: "We build our musical walls with familiar bricks but there has to be a golden brick in there.” (Sheahan, 2009)


Blume, J. (2004) Six Steps to Songwriting Success: The Comprehensive Guide to Writing and Marketing Hit Songs. New York: Billboard Books.

Catchy. (n.d.). Unabridged [Online]. Available from: <> [Accessed May 9, 2017].

Gradvall, J. (2016) Max Martin, #1 Hitmaker. DI Weekend [Online], February. Available from: <> [Accessed 18 November 2016].

Hallam, S, Cross, I, & Thaut, M. (2009) The Oxford Handbook of Music Psychology. Oxford University Press: Oxford, Great Britain.

Hamilton, S. (1998) Musicology as propaganda in Victorian theory and practice. Mosaic, 31 (2) pp. 35-56.

Hesmondhalgh, D. & Negus, K. (2002) Popular Music Studies. Arnold, London, Great Britain.

Leroi, A. (2017) The Secret Science of Pop. London: BBC4, 28 February, 21:00.
Lim, S. & Goh, W. (2013) Articulation effects in melody recognition memory. The Quarterly Journal Of Experimental Psychology, 66 (9) February, pp. 1774-1792.

McIntyre, P. (2007) Rethinking Creativity: Record Production and the Systems Model. Brisbane: Queensland University of Technology. 

Middleton, R. (1990) Studying Popular Music. Open University Press, Buckingham, Great Britain.

Nawrocki, T. (2015) Rewind The Biggest Instrumental Hits of the Past 50 Years. Cuepoint [Online] April. Available from: <> [Accessed 13 March, 2017].

Potton, E. (2016) How to write the perfect pop song, by Adele's hitmaker; Ryan Tedder is the composer-producer the biggest stars turn to for a No 1 hit -- and he's given them lots. Ed Potton scribbles down his top ten tips for a sure-fire chart smash. The Times (London, England), 30 September, p. 6.

Sacks, O. (2012) Musicophilia: Tales of Music and the Brain. Picador, London, Great Britain.

Schaal, N, Banissy, M, & Lange, K. (2015) The Rhythm Span Task: Comparing Memory Capacity for Musical Rhythms in Musicians and Non-Musicians. Journal Of New Music Research, 44 (1) pp. 3-10.

Schellenberg, E. (1996) Expectancy in melody: tests of the implication-realization model. Cognition, 58 (1) January, pp. 75-125.

Schellenberg, E, Stalinski, S, & Marks, B. (2014) Memory for surface features of unfamiliar melodies: independent effects of changes in pitch and tempo. Psychological Research, 78 (1) pp. 84-95.

Schmuckler, M. (1997) Expectancy effects in memory for melodies. Canadian Journal Of Experimental Psychology, 51 (4) pp. 292-306.

Seabrook, J. (2015a) Blank Space: What Kind of Genius is Max Martin?. The New Yorker [Online], September. Available from: <> [Accessed 18 November 2016]. 

Seabrook, J. (2015b) The Song Machine: Inside the Hit Factory. Jonathan Cape Publishing, London, Great Britain. 

Serafine, M, Davidson, J, Crowder, R, & Repp, B. (1986) On the nature of melody-text integration in memory for songs. Journal of Memory and Language, 25 (2) April, pp. 123-135.

Sheahan, N. (2009) Inside Mormon Music: CDs celebrate 25 years of songwriting at BYU. Deseret News [Online], September. Available from: <http://> [Accessed 11 March 2017].

Stafford, T. (2012) Earworms: Why catchy tunes get trapped in our heads. BBC Future [Online], April. Available from: <http://> [Accessed 09 May 2017].

Thompson, D. (2017) Hit Makers: How Things Become Popular. Allen Lane, Great Britain.

Weiss, M, Vanzella, E, Schellenberg, E, & Trehub, S. (2015) Pianists exhibit enhanced memory for vocal melodies but not piano melodies. The Quarterly Journal Of Experimental Psychology, 68 (5) April, pp. 866-877.

No comments:

Post a Comment