Thursday, December 22, 2016

Pitch Class Set Calculator

Made a pitch class set calculator. It includes a list of all set classes with cardinalities three through nine represented with a RecyclerView, one of Android's most powerful components.

You can get it right here:

Source code!

Saturday, January 9, 2016

Composing T and I operations

Almost four years ago to this day I submitted a simple assignment to a Transformational Theory course I was attending at college. The task was to compose different combinations of two of the so-called Twelve-Tone Operators (T and I) into just one operation. The Tn operation is transposition by the value of n, whereas the In operation is inversion followed by a transposition by the value of n. Note that this is all done within a given modulo universe; in music, we operate within mod 12.

Back to the task at hand: If you apply, for example, T4 and then I7 to a set of pitch-classes, is there an alternate way to reach the same state the set is in but with just one operation? Undoubtedly there is. The previous example can be more simply done with just one stroke of an I3 operation. But how can one confidently generate that singular operation given any two operators T and I in any order? The following set of rules is exactly how:

Tm · Tn = Tm+n
Im · Tn = Im+n
Tm · In = In-m
Im · In = Tn-m

NB All resulting values from the above operations on n and m must be mod 12, e.g. I9 · I1 = T-8 mod12 = T4

My assignment was to generate all possible combinations, which results in a 24x24 sized matrix. At the time I wasn't quite the computer wizard I am now, so I painstakingly plugged in more or less each value into an Excel file. This was slow and also harboured the ominous risk of inputting an inaccuracy by mistake. It also wasn't very flexible in the event that I want to compose T and I operators in a universe of a different size (as unlikely as that may be); I'd have to rewrite a ton of it!

Looking back now on the assignment from the perspective of a programmer made me rethink how I would've done it at the time. Any programmer knows that solving repetitive tasks and programming are happily married. Below I complete the assignment with some C# code. The (admittedly crude in format, but complete) output follows it. 

namespace TransformationalTheory.Assignment1 {
    class Program {
        // Music is in modulo 12
        public const int ModUniverse = 12;
        // Two twelve-tone operators: T and I
        public const int NumTTOperators = 2;
        // Set dimensions of the matrix based on the above values
        public const int Rows = ModUniverse * NumTTOperators;
        public const int Columns = Rows;
        public const int Halfway = Rows / 2;

        public enum Operator {
            T, I

        static void Main(string[] args) {
            // Create and set the matrix
            string[,] matrix = new string[Rows, Columns];

            for (int m = 0; m < Rows; m++) {
                for (int n = 0; n < Columns; n++) {
                    if (m < Halfway) {
                        if (n < Halfway) {
                            matrix[m, n] = TmTn(m, n);
                        } else {
                            matrix[m, n] = TmIn(m, n);
                    } else {
                        if (n < Halfway) {
                            matrix[m, n] = ImTn(m, n);
                        } else {
                            matrix[m, n] = ImIn(m, n);

            // Write to a file
            using (System.IO.StreamWriter file =
                    new System.IO.StreamWriter(@"C:\Users\Nick\Desktop\Assignment1.html")) {
                for (int m = 0; m < Rows; m++) {
                    for (int n = 0; n < Columns; n++) {
                        file.Write("<td>" + matrix[m, n] + "</td>");

        public static string TmTn(int m, int n) {
            return Compose(Operator.T, AddMod(m, n));

        public static string ImTn(int m, int n) {
            return Compose(Operator.I, AddMod(m, n));

        public static string TmIn(int m, int n) {
            return Compose(Operator.I, SubtractMod(n, m));

        public static string ImIn(int m, int n) {
            return Compose(Operator.T, SubtractMod(n, m));

        public static string Compose(Operator a, int b) {
            return string.Format("{0}<sub>{1}</sub>", a, b);

        public static int AddMod(int m, int n) {
            return (m + n) % ModUniverse;

        public static int SubtractMod(int n, int m) {
            return ((n - m) + ModUniverse) % ModUniverse;

File output
To navigate the matrix, firstly take any one value from the leftmost column and secondly any one value from the top rowWhere they meet in the matrix is the value of their composition with respect to the aforementioned chosen order, e.g. T2 on row 3 (leftmost column) can be composed with I4 on column 17 (top row) to make I2 (which is therefore living in cell 3, 17). I've bolded these rows for clarity. NB that the matrix logic only works with these directions; if you choose to start with values from the rightmost column or bottom row, or pick the top row first then the leftmost column second, you'll likely end up with an incorrect composition.

You might also be wondering why it isn't possible to compose any operation with T0 in this matrix. T0 is the identity operation; i.e. T0 composed with x will always result in x. It's inclusion would therefore be quite trivial!


Tuesday, July 7, 2015

Music Theory Roman Numeral Analysis app

Do you find a lack of block-chords to analyze with the tools of music theory keeps you up at night? Is your one purpose in life to attribute Roman and Arabic numerals to music as rigidly and literally possible? I would venture a guess that 99.8% of my readership fall into this demographic. Guaranteed. To sate your insatiable quest to better your musicotheoretical chops I've developed a simple app for Android phones and tablets.  

You can find it and install it here; it's free and has no ads forever!:

Here's what it looks like screenshotted from an emulator and then photoshopped onto a fake phone and then Blogger added a gross black background:

Tuesday, December 30, 2014

Idioms of popular music (from the perspective of a classical musician)

I'm going to start writing a series of posts which examine aspects of popular music. These will be aspects which I find frequently in popular music's many genres but very rarely or not at all in common practice era music, and which can be described adequately with the tools of music theory. I don't intend this list to be a comprehensive study by any means; it's just a selection of things I've noticed from many years of listening to both popular and classical music. I'm not trying to come to any definition of what popular music is either, but I'd imagine that if one were to incorporate the list of things I plan to write about into their own tonal compositions, one would likely then be able to characterize their work as popular music.

I won't include songs in this series that are explicitly jazz or blues pieces because those genres contain a ton of unique elements to distinguish them from classical music. Instead, I focus on popular, radio-friendly, mass-consumed, mainstream works from roughly 1960 onward. I'll try to make each item interesting to read about by avoiding obvious differences from classical music like syncopation and orchestration. Below is the first part of this series.

Part 1.  Scale degrees 5-6-1 over a tonic chord

The title of this section refers to a simple musical idea -- three successive pitches in a melodic line. This idea is ubiquitous in pop music, and I've provided handful of excerpts of it occurring below. I like to understand this 5-6-1 melodic idea as an inverted cambiata figure, with the last gap-fill note omitted, moving through scale degrees 5, 6, and 1. All of this is done over a tonic chord. The main point of interest here is scale degree 6. From a classical musician's perspective, this scale degree on top of a tonic chord is considered a dissonance, since the tonic triad consists of scale degrees 1, 3, and 5. In the musical examples below it acts like a passing tone between 5 and 1, but rather than passing to the next scale degree in a diatonic scale, scale degree 7, it instead skips upward by a third to scale degree 1. This avoids any instance of the melodic line creating or alluding to semitonal movement (here, between scale degrees 7 and 1), which is the characteristic feature of a typical pentatonic scale (a scale comprising solely of major-second and minor-third intervals). My understanding of this phenomenon is that since so much popular music has a hard-on for pentatonicism, this is likely then a pentatonic-derived idea shoved into a diatonic context. Examples below show this with horizontal brackets identifying the exact location of the figure in each score.

Hall & Oates - You Make My Dreams
This song's opening line consists exclusively of scale degrees 5, 6, and 1. The pseudo-cambiata figure described above is used four times (twice in retrograde, with one instance of overlap) and scale degree 6 is freely skipped to and away from the tonic note, all over a tonic chord. 

Travis - Sing
Another instance of a song using the 5-6-1 figure.

Michael Jackson - Man In The Mirror
The first 5-6-1 figure is actually over an extended dominant chord (i.e. not a tonic chord), but I felt was still worth identifying. The second bracket shows it sounding over a first-inversion tonic chord.

Black Eyed Peas - Where Is The Love
This song uses solely a retrograde of the 5-6-1 figure: 1-6-5.

The Beatles - All You Need Is Love
This song opens with a quotation of the French national anthem, La Marseillaise, but with a few interesting edits. 

The pickup measure in the top voice moves along D-E-G, the familiar 5-6-1 figure I've been addressing in this section. This wasn't originally in the national anthem, however. In the opening of the original score, pictured below, the pickup is a simple 5-1 without any intermediary pitch E (scale degree 6). To me, this is an indication of how salient the 5-6-1 figure is in popular music. It's as if the Beatles decided a literal quotation of the anthem wouldn't have sat comfortably in the context of a popular music work, and thus edited it into the more idiomatic 5-6-1 figure.

Besides this addition, the Beatles's version also includes some fun parallel fifths, which La Marseillaise would've surely avoided.

The Four Tops - I Can't Help Myself
This last example is so saturated with the 5-6-1 figure that there really isn't a need for a score.

The 5-6-1 figure can be found in late classical impressionist works like that of Debussy's, who was no stranger to pentatonic collections. The majority of classical works, however, e.g. that of Bach's, Mozart's, and Beethoven's, are decidedly without its presence. 

Regarding copyright:
Edited mp3 files are available on this web site to illustrate particular analytical points as well as for ear training purposes. Many of these mp3s are copyrighted material, but I believe my use of them here constitutes “fair use” since the mp3s are short excerpts only and used for an academic purpose. Please do not hesitate to contact me if you disagree with my definition of “fair use” and wish to have any musical examples removed from this web site.

Tuesday, April 30, 2013

Brahmsfo(u)rmations or: Transformations within Brahms 4

You're probably familiar with the opening theme of Brahms's fourth symphony. It's the one that descends by thirds and then ascends by thirds. No, not that one. It's this one. Big deal, right? Well I had the audacity to look a little closer at it and let me tell you, the results are quite illuminating. Take a gander at them, won't you?

Let me preface my so-called analysis of the piece by saying that this is but a part of a greater study of mine on this work. It's also heavily inspired by Steven Rings's book Tonality and Transformation, which was a pretty decent read. I use a lot of its terminology, but I won't cite the pages I used because I can't be bothered. 

Somewhere in that book of his he mentions the concept of "tonal intention." This more or less describes the phenomenon of our attention being directed to the tonic when encountering some subordinate tonal element. A basic example would be the momentum created by the dominant sonority; it generates a strong pull towards the tonic within the context of a tonal work. I think that's what it means anyway. I will refer to this concept again in a minute, so don't forget it.

Let's get down to brass tacks. Take a look at the score. Here's the first page of a piano reduction for the work:

Figure 0 Johannes Brahms, Symphony No. 4 in E minor, Op. 98, i

Notice there are brackets labelled X and Y. They demarcate the aforementioned chains of descending and ascending thirds, respectively. That's all there is to it, right? Wrong. See below:

Figure 1 Network of the Main Theme in the first violins, mm. 1-9

Now to explain this. X and Y, the labels that bracketed a part of the theme within Figure 0, are modeled by Figure 1, the transformational network above. In it, nodes contain pitches accompanied by the number of their octave (e.g. middle C = C4); they are arranged approximately in pitch-space, where the highest node represents the highest registral pitch, and vice versa. Solid arrows connect the majority of nodes, and these are accompanied by an ordered pair consisting of scale-degree intervals and pitch intervals. Henceforth I'm going to refer to scale-degree intervals and pitch intervals as sdints and pints, respectively, so don't get confused. Each sdint represents an interval between sds; for example, the interval from sd 1 to sd 3 is a 3rd (or its inverse, a 6th-1). When an octave or unison is encountered, that is, when there is no change in sd, the symbol e, for identity, is used. The pints conform to pitch-space, where negative and positive integers represent intervals. The solid arrows trace the literal path of the theme's melody found in the score.

Take a deep breath and continue to persevere through this molasses-like prose.

The other two types of arrows are dotted and dashed. Dotted arrows trace the top layer of the theme; a path determined by the network's upper registral notes. This path does not happen as explicitly as the one traced by the solid arrows due to the many intermediary pitches within the score of the work. The sole dashed arrow is essentially a combination of the dotted and solid arrows; it literally appears in the score where B5 moves to E6 (in m. 4), but it also traces that upper line based on register. The rightmost node of Figure 1 has a B5 enclosed by a dotted circle. This special type of node implies that the pitch contained inside of it has not been realized within the measures pertaining to this network (i.e. mm. 1-9).

Before the significance of the dotted arrows can be explained, I'm going to talk about the significance of the arrival and emphasis of pc C on the downbeat to m. 9 until m. 13. Note that most of these measures are not included in Figure 1 (read: go look at the score to see them). Within them, C, as a pitch, alternates repeatedly between C5 and C6. Although three eighth-notes are found at the end of each measure which include pcs other than C, these deviations, don't disrupt the emphasis of pc C found on the downbeat of each of those measures. This area marks a point of contrast to the preceding measures.

So Brahms has decided to play around on this emphasis of pc C. I'd like to ask why he has decided to do so, but he's dead. Therefore, speculating on composer intention is little bit futile. Instead, I'd like to take a closer look at what the consequences of the prolonged C might be.

Looking to the score shows that before C5 arrives on the downbeat of m. 9, each of the first eight measures of the movement has two thematic notes (i.e. melodic notes within the theme) per full measure. These unfold supported by basic triadic harmonies built on diatonic scale degrees. There is a tonic pedal within mm. 1-4, but afterwards until m. 8 the theme is supported by root-position harmony. In contrast, the chordal harmonies within mm. 9-13 are far more dissonant; they include fully-diminished-seventh applied chords based on chromatic scale degrees (mm. 9, 12), as well as a second-inversion chord (m. 10). Therefore, in addition to emphasizing primarily the melodic pc C, as was discussed in the above paragraph, these measures also feature prominent harmonic instability.

As a pitch, chord, and key, C is an element that binds the symphony together. As a chord it plays an important role in the recapitulation of the first movement. As a pitch and key area it is prominent in the second movement as an inflection within the key of E-major. The third movement is fully in the key of C-major, and in the fourth movement C-major emerges as a key area despite this movement being in E-minor.

Returning to Figure 1; the dotted arrows trace the paths of the line formed by the highest registral notes. Within X, the pitches B5-C6-B5 are highlighted by these arrows. This idea, reminiscent of a neighbour-tone, sets up an expectation: a departure from B5 is followed by a return to it. In this sense, the motion away from B5 is intentionally directed back towards it. Another departure from the B5 initiates Y. This motion is a leap to E6, which then descends stepwise to D6, and C6, again demonstrated by the dotted arrows in this bracketed area. It appears that this is fulfilling a similar idea to what X worked out; a departure from B5 begins to return to its origin through stepwise motion, which is anticipated in Y because of the expectation introduced by X. By the time the C6 in Y is reached, however, the path to B5 is heavily delayed. As was mentioned before, there is an emphasis on pc C within mm. 9-13 which is supported by dissonant harmonies. Based on the intentionally directed dotted arrows of Figure 1, that emphasis on C builds up energy in its anticipation towards the B5 in the dotted circle node; a pitch that remains unrealized within the measures that this transformational network models. This B5 in the dotted node is eventually encountered in the score, but not until the anacrusis to m. 18. Here the expected B5 dramatically returns with the leaping of first violins and oboes through two of its lower octaves in m. 17. At this moment there also appears to be an allusion to the B5-C6-B5 traced by X within the top voice of mm. 17-18. This more literally outlines the neighbour-tone dotted arrow motion X first introduced. 

Figure 2 models a similar kind of reading of the theme but from a different perspective. This network uses a pitch-class space. Beginning with the upper-left node and then following the path directed by the arrows will trace the theme, not unlike to the solid/dashed arrows of Figure 1. Although the bottom row is labelled Y, it is slightly different from the Y in Figure 1: here in Figure 2, any repetitions of pitch-classes are omitted. The purpose of this network is to articulate that, unlike X, which begins and ends on pc B through a chain of descending thirds, Y begins on pc E and stops prematurely at pc C. This is one ascending third away from returning to pc E and the completion of a chain that returns to its origin. This missing pc E is articulated in the network by the dotted node, which implies that it is not realized in these measures, similar to the dotted node within Figure 1. Beyond the measures Figure 2 represents, however, are no immediately discernible candidates to satisfy this unrealized node. One might speculate that the pc E in the dotted node is in fact realized in m. 13, immediately following pc C. But because pc E here is merely a lone eighth note, supported by a dissonant harmony, and in a formal area where the theme becomes fragmented, it is quite alien to the material from mm. 1-9. Therefore, in my hearing, it does not grant a convincing relationship to the way each pc contained within the other nodes of this figure are presented in the score. The potential chain of thirds beginning and ending on pc E within Y remains incomplete.

Figure 2 Another network modeling mm. 1-9.

The horizontal dotted arrow in Figure 2 traces the unrealized path leading from pcs C to E; it is also consistent intervallically with the solid arrows preceding it on the bottom row, as was discussed above. The relevance of the dotted arrow leading vertically from pcs E to B, however, is a little more interpretive. Its addition unifies the entire network and enables it to be closed in a logical manner; but the music itself does not follow this path literally, nor does it convincingly imply an intentionally directed motion from pc E to B as strongly as the preceding pc C to E does. X and Y, however, are essentially repeated in the transition following the main theme (see Figure 0). This action restarts the network, but only after having skipped over that pc E in the dotted node. The two dotted arrows and dotted node of Figure 2 therefore represent the portion of the network that the music itself had ignored, and provide what I consider to be a more predictable and logical way for the network to return to the beginning of X and initiate the transition. In addition, this vertical dotted arrow creates a kind of symmetry with the solid arrow from pcs B to E on the right-hand side of the network, which alludes to the inversional qualities of X and Y.

The avoidance of Y's return to the originating pc E, represented by the dotted node of Figure 2, is metaphorically similar to a stepwise ascent of a major scale that begins on its tonic and halts motion once reaching the leading-tone. In this example, there tends to be an acoustic desire for a resolution to the tonic from that leading-tone pitch. In the case of Brahms's symphony, I would argue that the cessation of ascending thirds on pc C in Y impels a similar anticipation for a resolution to the tonic, pc E. Given that Brahms has already offered a complete cycle in X beginning and ending on the same pc, this only serves to add to the expectation that the first pc which initiates Y should also be its closer. Rings's concept of tonal intention is applicable here as well because it involves the process of subordinate tonal elements directing our attention to the tonic. The corner nodes of the bottom row, Y, in Figure 2, would be the tonic in this case, and the subordinate elements can be understood as the intermediary pcs between them. Although the corner nodes of X are not the tonic, in the sense that pc B is not the tonic of the symphony's key of E-minor, within this localized context of the network it does not seem to me a stretch of the imagination to conceive of our attention being intentionally directed in some way back towards pc B once the subordinate intermediary pcs of X are encountered. This skipping over of pc E in Y parallels of the avoidance of resolution to the tonic throughout the entire movement (a typical Romantic aesthetic), and its prolonged acoustic absence heightens intentional energy towards it. 

Both Figures 1 and 2 demonstrate that pc C plays a role in anticipating and delaying a resolution that is expected, represented by the dotted nodes. It is intentionally directed towards both pcs B and E, depending on which of these two networks one is engaged with. In a listening experience of the movement, however, one could claim that pc C is directed towards both of these pcs simultaneously because of its dualistic role within the first two figures.

Sunday, April 14, 2013

Bon Iver, Michael Jackson, and the conclusory IV chord

I have given Bon Iver's second album Bon Iver, Bon Iver (2011) much more listening attention than I usually grant to most artists I've come across, and it's well deserved.  The positive review over at Pitchfork shares a lot of my feelings towards the music -- it's simply an eclectic, well composed work.

Having somewhat of an involuntary music-theoretical bent to my casual listening alerted me to the interesting way that the band closes the majority of their songs on the album.  All of the tracks are explicitly tonal with a comprehensible tonic, yet a whopping six of the ten total end on a IV chord.  Of the remaining four, only two actually end on I, and one of those two ends outside the key that the song began in.  In this blog post I want to speculate why these songs might have been composed to end this way, and what the consequences of this are.

Ending a popular song on a IV chord is by no means the innovation of Bon Iver.  One prominent example that comes to mind is Michael Jackson's Man in the Mirror, a massive hit from the late 80s.  This song begins with its tonic chord, a bright G-major in a synthesizer effect unmistakably familiar to popular music of this decade.  After an abrupt modulatory shift up a semitone at 2:53, what some refer to as the "Truck Driver's Gear Change," the tonic then revolves around the key of A-flat-major.  The music itself doesn't introduce any overtly new material follow this modulation; the new key appears to be introduced only to try and sustain listener interest in familiar material.  At 3:50, however, begins a significantly prolonged IV chord.  Michael Jackson and his gospel choir just riff and seemingly improvise over this chord for the rest of the song, which ends up consisting of over a whole minute of material -- quite a large chunk of time for the five-minute pop song.

I hear this perorational section as building up quite a lot of tension in its stressing of the IV chord.  I think that on some level I want to hear a resolution to I, the tonic chord, after all that emphasis on IV, a subordinate tonal element.  This is, of course, never granted.  The song just ends on IV, teasing the listener with its unfulfilled tonal expectation.

Here's where I think it gets interesting.  Say we're not satisfied with this ending and decide to reject it.  Ending on IV doesn't give us the closure we tend to yearn for in tonal music.  How can we resolve this tension and grant ourselves peace of mind?  Well, by starting the song over, of course.  Clicking that play button once more gives us access to that resolutory I chord.  The catch is, we are then impelled to listen to the rest of the song once again, since terminating the track just after hearing that opening I chord a few seconds into the piece, or whatever, wouldn't give us the track's literal closure.  This puts us in a predicament: how can we ever achieve closure?  Compulsively repeating the song seems to be the closest attempt at getting nearer to it, even though it's essentially unobtainable.

Driving an audience to incessantly repeat their listening of a popular song; does this sound like the perfect marketing tool or what? I can't help but speculate, perhaps not totally seriously, but definitely not unseriously, that the song was composed in this way to induce its listeners to want a repeated engagement with the work.  Not necessarily for some sinister marketing purpose, but as a gentle push for the listener to want to enjoy the same song once again.  We already listen to our favorite pop songs many, many times over. With that in mind, it seems like a useful compositional technique to end on something that's not tonic; it just gives us another reason to hear the song once more.

But why IV?  Why not ii, iii, V, vi, or vii?  Coming back to Bon Iver's 2011 album, I noted that six of the ten songs ended on IV. It seems to be no coincidence that IV was chosen as the most frequent ultimate chord over the other five non-tonic triads in a diatonic collection.  I'm not entirely sure why it is privileged over the others, but it definitely works.  IV is typically a predominant chord, but in certain contexts it can be interpreted as a prolongation of the tonic, I.  Perhaps this is the aural sensation we get when hearing IV as the concluding sonority -- it sounds a little like I, but isn't, because it functions as its prolongation.

Tuesday, January 4, 2011

Radiohead - Pyramid Song, the analysis

Pyramid song is the second track off Radiohead's album "Amnesiac".  It seems to me that it's most conspicuous feature is the meter.  The introduction of the piano in the piece isn't particularly compromising in terms of its harmony, but as soon as the third chord arrives, it is the complex rhythm which immediately becomes apparent to the listener.  Each bar in the piece is essentially arranged in the manner presented below (though, note the caption).  There is much discussion of what is the "correct" time signature is on various internet pages and most of what I read were poor interpretations; I think the one I've written is fairly agreeable.

For a performance score, I imagine the middle note would be notated as a dotted quarter tied to an eighth 
(easier to read).
The first thing brought to mind when I saw this was non-retrogradable rhythms, a concept which composers like Messiaen deliberately used in composition.  The rhythms of each measure is the same backwards as it is forwards.  I wouldn't be too surprised if imitating Messiaen was the intention of Radiohead with this song.  The guitarist of the band, Jonny Greenwood, frequently draws inspiration from 20th century modernist composers, and utilizes the ondes Martenot instrument on both Kid A and Amnesiac -- a favorite of Messiaen's.  I've read interpretations of this palindromic rhythm as the reason for the song's title: it is "shaped like a pyramid."  I can see where one would get the idea; the rhythmic value in the middle is where it peaks, accompanied by adjacent smaller values.  I'm not entirely convinced though; in my mind it would have to be the shortest note value in the middle of the bar, not the longest, to represent the kind of peak of a pyramid which is smaller in width to the base.

I found the harmony to be quite interesting.  It makes no attempt to adhere to any consonant voice leading in the classical sense, although ironically it moves with smoothest possible harmonic shifts because of its disregard for the rules of counterpoint.  Of course, while imposing a contrapuntal critique of any rock song might seem a little dubious (especially to "new" musicologists), I feel like it's still relevant to a discussion of the piece.  In Pyramid Song the left hand of the piano uses raw parallel 5ths to traverse up the chord progressions of major chords like F#-G-A, with doublings in the right hand (Example 1-A).  One motivic feature is the 9-8 suspension over the tonic chord, F# which appears in first phrase of the piano, and is doubled in strings in the penultimate phrase of the song.  It's a nice dissonant effect, not only because it's a minor 9 suspension, but it essentially creates delayed parallel octaves with the bass.  The impression of whether the musical texture is homophonic or contrapuntal is constantly distorted because of it (Example 1-B).

Example 1

The key of the piece is a little ambiguous.  My overall impression is that it is in the F# phrygian mode, because of the prominent G-F# motion within the song and at its final cadence.  Throughout the piece, however, there are several hints at different keys.  Thom Yorke's vocal lines freely interchange between the use of the notes G-natural and G-sharp.  When G-sharp is on the surface, one might be satisfied if the piece were deemed in a key of F#m or F#, rather than a modal version.  The fact that all the chords essentially conform to the key of Bm also might be considered.  Perhaps this is why the same chords over and over do not sound tired or monotonous even after multiple listenings: if the piece were in Bm, the avoidance of resolution to the tonic chord might make the listener constantly seek a resolution which is never achieved.  But then again it could just be that it is an interesting chord progression.  For instance, Radiohead's "Creep" ends each phrase with a plagal cadence, and the entire song is saturated with just 4 chords in repetition, yet I found it enjoyable and it sustains my interest.

A nice feature of this song is the constant F#5 note in the right hand (example 1); I recall seeing a comment somewhere describing this as a "pedal tone", but my understanding of a pedal is one which is more or less in a low register.  I have read in certain theory texts (e.g. Kostka/Payne) that pedals can occur in higher registers, however.  Pyramid Song would therefore fit that definition.

One impression I couldn't shake when hearing this song is its close resemblance to the song Everything In Its Right Place from Kid A.  The chord progression is identical for the most part, but the distinctive rhythms and timbres are what divide them.  Both songs are also predominantly played on keyboard and have the pedal tone in the high register.  They are each a tritone apart in key, interestingly enough (compare to example below).  NB: Everything is scored in Fm according to this publication, which also gives credence to my description of Pyramid Song being potentially in Bm and why I thought it of being potentially (I stress this word) in that key.

Radiohead - Everything In Its Right Place

The wikipedia article of Pyramid Song mentions that the Charles Mingus song "Freedom" had a heavy influence on the Radiohead track.  I can hear the similarities on the opening "Ooh"s in Freedom and the same "Ooh"s Yorke uses in the vocal line, but beyond that it breaks out into jazz improv, and doesn't sound anything like the Radiohead song.