Jump to content

Negative Harmony Function

Recommended Posts

Dear All, 


One interesting thing that could be implemented as a function could be a form of generating Negative Harmony.

In the video below, there are some explanation of what it is and the origin in the Levy book.

It was a trendy topic due to the Jacob Collier interview. And there are a lot of fun videos making versions of pop tunes using negative harmony.


The way I understand it, it is simply a kind of mapping notes in relation to an axis, like in the figure below.




So we need a function that could map a note in any register to another note in the closest register to the first on.

So, any  C note will be mapped to G, all Db to F#, all D to F, all, Eb to E, all B to Ab, all Bb to A.


It´s also possible to generate other mappings as well.


I think that replace map or substitute map can do the job, but I´m not sure (I will try), but I find interesting to post it here to explore the idea.


All the best,




It´s kind of funny to sse in this por versions how every is upside down and how you can generate an entirely new song from exactly the same material.




POP TUNES with negative harmony:






Link to comment
Share on other sites

  • 4 weeks later...

Are you simply looking for an invert function, e.g., pitch-invert? 


(pitch-invert '(c4 d4 e4))
=> (c4 bb3 gs3)


This function inverts (mirrors) around the first pitch by default. If you are looking for retaining the original ambitus, you might want to instead you my function invert-in-ambitus (https://tanders.github.io/tot/sources/pitch.html#_g251910).


(invert-in-ambitus '(c4 e4 g4)) 
=> (g4 eb4 c4)

BTW, when you are specifically talking about a harmonic context in which you are "mirroring" chords, there exist extensive music theories based on this idea already. The notion of minor chords as the mirror image of major chords, and its implications on harmonic functions (tonic, dominant, subdominant etc.) was in detail explored under the label of dualism by theorists like Hugo Riemann, Arthur von Öttingen and Sigfrid Karg-Elert. They also already generalised this notion for microtonal music. Likely independently of these theorists exploring the notion of dualism, Harry Partch's concept of otonality and utonality is also based on this idea, now firmly in the field of microtonal music. In microtonal harmonic theory I came across this notion also elsewhere (e.g., discussed by the composers and theorists of ekmelic music like Franz Richter Herf, which may have arrived there independently as well.


Anyway, this harmonic concept in general is so basic and fundamental that I would not be surprised it would have been studied by the likes of Pythagoras already...




Link to comment
Share on other sites

Just a brief follow-up. While Partch's book is obviously available in English, the other authors all wrote in German. More recent Neo-Riemannian theory is often pretty math-heavy, so also somewhat hard to digest for us composers. To get a taste of these harmonic theories in a highly developed form (with dualism throughout, but that is only one facet) delivered by a practicing composers, you might want to have a look at the recent English translation and discussion of Sigfrid Karg-Elert's book Acoustic Determination of Pitch, Chord and Function from 1930.


Byrne, D. A. (2018) The Harmonic Theories of Sigfrid Karg-Elert: Acoustics, Function, Transformation, Perception. PhD Thesis thesis. University of Cincinnati. Online available (with a somewhat slow download speed) at https://etd.ohiolink.edu/apexprod/rws_olink/r/1501/10?p10_etd_subid=162928&clear=10
Warning: this is not for the faint of heart 🙂
Link to comment
Share on other sites

  • 2 weeks later...

Dear Torsten


The function pitch-invert works as the tradional inversion, mirroing the intervals upside-down.

Negative harmony is somewhat similar to inversion, but not exactly the same thing.

Please, take a look in Levy book and in the video above, and you will see what I mean.

I'm looking for something straightforward and non-academic, inside the 12-tone temperament, very simple, just to spice up

 the old progressions and voice-leading with a negative version.


Thank you for the reply and references.





Link to comment
Share on other sites

  • 8 months later...

I'm unsure as to how to post images inline so I hope this will make sense.


Pitch/melody inversion is interesting to me. To try that out, I'm going to take a simple line from Beethoven (pic 1). Using a negative melody, I invert around the tonic to be the following (pic2).

The difference in OMN is this:

(setf pitches '(a4 g4 fs4 a4 d5 a4 fs5 d5 a5 fs5 e5 d5))
(setf lengths '(e. s e. s e. s e. s e. s e e q))

to this:


(setf lengths '(q e q e q e q e q e q e h))
(setf pitches '(f4 g4 gs4 f4 c4 f4 gs3 c4 f3 as3 as3 c4 d4))

If I try the pitch inverse function described above, I start with this:


(pitch-invert '(a4 g4 fs4 a4 d5 a4 fs5 d5 a5 fs5 e5 d5))

and I get this:

(a4 b4 c5 a4 e4 a4 c4 e4 a3 c4 d4 e4)

 Which is a bit different probably because I did my manual job incorrectly. However, it's a happy mistake which I will keep because I like it better! 😉 Having said that I do think the pitch-inverse is what you're looking for and a very cool compositional tool to have in Opusmodus!


Screen Shot 2020-06-20 at 6.25.02 PM.png

Screen Shot 2020-06-20 at 6.27.38 PM.png

Link to comment
Share on other sites


Dear Tom, 


Looks great ! Sometimes we find excellent stuff just by accident. I love when this happens !

Actually, as I said before, the negative harmony is sligthly different from just the inversion of the pitch. 

In your inversion, the pitch axis is the first note a4, so all the inversion operation is based in that first note.


In the  negative harmony, the axis lies between two notes and have some tonal orientation, i.e., it´s a kind of mapping that changes according to each tonality. For example, the mapping corresponding to the C center would be like:




So, the "negative version" of  your melody below:


a4 g4 fs4 a4 d5 a4 fs5 d5 a5 fs5 e5 d5


would be, according to the graph above:


Bb C Db Bb F Bb Db F Bb Db Eb F.


Please, check the first video of the post, it´s very pedagogical.


Probably Stephane will have a solution. The keyword is MAPPING. Maybe pattern substitution, pattern match, but a function where the octaves are relatives.


All the best !





Link to comment
Share on other sites

Hi Julio,


The so called "negative harmony" is the same as "inversion and symmetrical axes" in set theory (which is the same as saying Neo-Riemannian theory - all transformations are In operations).


An inversion of a pitch class is given by subtracting the pc from index of the inversion operation, n.


In(pc1, pc2,pc3) = (n-pc1, n-pc2, n-pc3)


If you want to think of it as an inversion around an axis, the axis would be n/2 (or 12-n/2 on the other side of the clock-face). 


So the function could be written like this: 

(defun axis-inversion (axis pitches)
  (integer-to-pitch (loop for i in pitches collect (- (* 2 axis) (pitch-to-integer i)))))

And if you want to use Eb-E as the axis it would be 3.5 (e is pc3 and eb is pc4)


(axis-inversion 3.5 '(c4 e4 g4))

;;; results in (g4 eb4 c4)


This doesn't account for octaves etc. - for that you'll need to use midi. Now the axis is given in midi number - so 63.5 would be Eb4:


(defun midi-inversion (axis pitches)
  (midi-to-pitch (loop for i in pitches collect (- (* 2 axis) (pitch-to-midi i)))))

(midi-inversion 63.5 '(c4 e4 g4))
;;; you get (g4 eb4 c4)

(midi-inversion 60  '(c4 e4 g4))
;;; you get (g4 eb4 c4)

(midi-inversion 53.5 '(c4 e4 g4))
;;; you get (b2 g2 e2)


If I missed any cases I am happy to check them out 🙂 


All the best,




p.s. - 


(midi-inversion 63.5 '(a4 g4 fs4 a4 d5 a4 fs5 d5 a5 fs5 e5 d5))

;;; results in (bb3 c4 cs4 bb3 f3 bb3 cs3 f3 bb2 cs3 eb3 f3) 
;;; as you expected (I think? I only checked the first few notes :-) 


Link to comment
Share on other sites

another p.s. - Ernst Levy's book is available on google play 


In this introduction to natural-base music theory, Ernst Levy presents the essentials of a comprehensive, consistent theory of harmony developed from tone structure. A Theory of Harmony is a highly original explanation of the harmonic language of the last few centuries, showing the way toward an understanding of diverse styles of music. Basic harmony texts exist, but none supply help to students seeking threads of logic in the...


My favorite book on the subject is David Lewin's:

  • Generalized Musical Intervals and Transformations. New Haven, CT, and London: Yale University Press, 1987. Reprinted, Oxford and New York: Oxford University Press, 2007.


Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...

Important Information

Terms of Use Privacy Policy