Classical Music Forum banner

How does math come into play when composing music?

7.5K views 29 replies 22 participants last post by  Richannes Wrahms  
#1 ·
I've heard some describe Bach's music as being "mathematical" but I struggle to understand the relationship between math and music. Can Bach's music be explained by a system of equations? When would a composer bust out a pencil and paper and start doing math?
 
#2 ·
Mathematics is a broad area. You can use set theory to analyze any kind of music, using Alan Forte's book Atonal Theory.

Also, symmetry is a mathematical idea, and Bach can be looked at in this way, too; how themes get inverted, turned upside down etc. I think music has a lot in common with geometry.
 
  • Like
Reactions: level82rat
#4 · (Edited)
Leibniz....

'Music is the hidden arithmetical exercise of a soul unconscious that it is calculating. If therefore the soul does not notice it calculates, it yet senses the effect of its unconscious reckoning, be this as joy over harmony or oppression over discord.'

We just don't oppress the discord so much these days and for some, the math is not subconscious. Composing is definitely geometric as MR says and it can be algorithmic too.
 
#8 ·
Leibniz....

'Music is the hidden arithmetical exercise of a soul unconscious that it is calculating. If therefore the soul does not notice it calculates, it yet senses the effect of its unconscious reckoning, be this as joy over harmony or oppression over discord.'
I like this quote. I think it's true that if math is a part of music the musician usually uses it in a unconscious way. I think it's the same for architecture, painting, poetry etc. The sense of form and proportion, simmetry (or asimmetry), balance have certainly to do with math but the artist is mostly guided by instinct, even when he's conscious of the mathematical qualities behind his work (even guys like Xenakis).
 
#5 · (Edited)
A good composer for different methods, using geometry & math, is Polish composer Andrzej Panufnik, if you can find anything in the liner notes about his methods. Not much on WIK.


Andrzej Panufnik​

 
#7 ·
In normal tonality, not really; if that were true, then chord inversion would be based on quantity, not identity in a tonal hierarchy. Example:

C-E-G, G-E-C, and E-C-G are all C major chords.

If we used modulo 12, these intervals would become quantities, not identities:

C-E-G, (C +M3+m3) when retrograded, becomes (C minus a M3 minus a m3) and results in C-Ab-F, which is an F minor.

Tonality is based on a recursive cycle in which "place" is the determiner, always in relation to a tonic or root note.
 
#11 ·
music is an art where the canvas is frequency and time. That is easily expressed mathematically. Fourier analysis of the vibrating systems is one way you could model the sound waves mathematically.

counterpoint is about intervals, which can also be described mathematically as ratios of frequencies

when musicians learn the rules of harmony, the math is still there, but it is abstracted. From a musician's perspective, harmony is about consonance and dissonance, which is a way of talking about the ratios between frequencies without being concerned with the actual mathematical values of the ratios themselves.

one reason Bach is talked about as "mathematical" is because it is from a time before functional harmony and is based on the rules of counterpoint, which is only concerned with the intervals between moving parts. Contrapuntal music just lends itself better to a discussion about the relationship between math and music, so that's why people will say that about Bach
 
#14 ·
I believe Bach's music described as mathematical (at least any more than others) is pure hyperbole. I think it's much more accurate to say Bach wrote with 'mathematical precision' as some others did, where each note serves a certain purpose or function. Milton Babbitt is more 'mathematical' than any composer I've heard about in terms of source material, and it's not necessarily something that translates tangibly into music. Lindberg's Kraft is supposedly entirely produced by a computer. There is still a human component though in all music composed, even through a computer.
 
  • Like
Reactions: Listenerris
#15 ·
Music is made of tones which are frequencies of vibrations like A 4 is 440 hz and a absolute rule of music is double the frequency and you get the octave.
Music is basically math when it comes down to it
 
#16 ·
I was actually just explaining this to someone else. I have been playing piano since I was 7, and then guitar and violin at age 12 for about 15 years now.
So let me break it down
Notations in music are by notes and numbers. The notes and measures are divided in timing. There is 4/4 second timing in each measure. The notes are fractions of timing, pitches, and octaves.
Therefor, music is basically a science of sounds and frequencies.
It's called music theory.
Hope this helps.
Dawn I wish I would have seen this question earlier!!!😤
 
#18 ·
How music is not like math:
  • Music is one of the creative arts
  • Music is closely related to song and dance
  • Music is directional and structured in real time
  • Experientially music is perceived by the human auditory system, cognized by particular neural pathways and areas of the brain, received and produced emotionally and kinesthetically
  • etc., etc.
 
#19 ·
Math plays a significant role in music composition, particularly in the areas of rhythm, melody, and harmony.
Rhythm: Time signatures, meter, and tempo all involve mathematical concepts such as fractions and ratios. Composers use these elements to create different rhythmic patterns and structures in their music.
Melody: Pitch and scales are based on mathematical principles such as frequency and intervals. Composers use these elements to create melodies that are harmonious and pleasing to the ear.
Harmony: Chords and chord progressions are also based on mathematical principles such as intervals and scales. Composers use these elements to create harmony and dissonance in their music and to create different emotional effects.
In addition, many composers use mathematical algorithms and computer programs to generate and manipulate music. Composers use of MIDI, DAW software and it's tools are based on mathematical principles.
All in all Math and music are deeply interconnected, and many composers have a strong understanding of music theory, which is rooted in mathematics.
 
#20 ·
This is a fascinating discussion, and I don't have a simple answer for it. To start off with, every composer works with their own way of doing things, but I can try to give examples of what some people have done.

As people have already mentioned, the concept of frequencies, intervals, and harmony have mathematical structures behind them. Concert A is set at an international standard of 440 Hz (although different orchestras will sometimes use tunings of 441, 442, or even higher tunings like 444 – there's also the issue of historical tunings, as the concept of an international standard of pitch is relatively new in the grand scheme of things). An octave above this is 880 Hz: twice the value. An octave below is 220 Hz. Pitch to note name is a logarithmic relationship.

In equal temperament, the distances between all 12 notes within this octave are equal. However, this is at odds with the idea of tuning according to frequency ratios, or just intonation. A just fifth has a frequency ratio of 3:2. 5:4 would be a just major third. You can hear these relationships if two people sing and the beating, or wobbliness, disappears and the two notes seem to meld together and reinforce each other. There's all kinds of interesting things that come out of this, including different types of temperaments and composers experimenting with a variety of tunings. I'd recommend reading Kyle Gann's book called The Arithmetic of Listening if you want to delve into this further.

Music theory ties into these ideas of tuning in various ways – see the ideas of consonance and dissonance, for instance. More consonant intervals are closer to relationships where the frequency ratios between notes are simpler, broadly speaking. Composers after 1900 have also experimented with mathematical methods of music theory in other ways. I'd recommend reading Alan Forte's book on pitch-class set theory. The general gist of this is that intervals are labelled as numbers 1-11, and pitch classes, aka notes, can also be labelled as corresponding to notes between 0 and 11. This system isn't so useful for common practice music, but it can provide valuable insights when examining music that isn't made up of common practice structures – for instance, you can see if different nonstandard chords are related, what sort of intervals are contained within a chord, and more.

Composers like Milton Babbitt and Xenakis have been mentioned. Both of these people had really interesting and very different ways of dealing with relationships between math and music.
 
#21 ·
The issue of music and math has come up many times on TC. I've always been a bit skeptical that composers truly use math when composing. I don't doubt that some composers do. I know that Xenakis mapped the velocities of gas molecules onto glissandos for his Pithoprakta. I know that 12 tone music can be described by set theory, and likely some composers actually used mathematical principles while composing.

In general I think math is to music as chemistry is to baking. Math can be used to model music and chemistry can be used to model baking, but I've always thought that the overwhelming majority of composers don't actually do any math while composing just as cooks don't use chemistry while baking. Basically composers and cooks learn principles of composing and principles of cooking and use their knowledge and creativity to produce the outputs. The process itself does not include math. I'd be interested to know if I'm wrong.
 
#22 ·
I like your analogy between chemistry and baking. In music, our western music theory abstracts alot of the real math from us musicians. Intervals are abstract expression of frequency ratios. Time is expressed in rhythmic notation, and the whole sheet of music vaguely resembles a high school math graphing assignment with frequency on the Y axis and time on the x axis.

So by understanding the rules of counterpoint and the theory of functional harmony, all the real math is abstracted for us musicians. It is turned into a sort of "musical math" which is sort of like "football physics" for any of you who went to a Division 1 football powerhouse.

so aside from some experimental compositions that are purposefully using mathematical methods to create something truly unusual, musicians dont really think about math.

If we really did think about math, we'd probably be engineers. The pay is a lot better
 
#23 ·
I can only write from my perspective about this topic.

I think there's definetly a connection between math and music, but more on the subconscious level.

I've studied physics, which I consider quite close to math. I believe that the brain circuits I've trained in math are also helping me in music (composing / playing), in a subconscious way. For example, when figuring out rhythms or transposing melodies - I don't think of math in these moments, but I think I'm using similar brain circuits.

Also I know several people with a similar combination of interests like me (physics / music). Maybe having an interest in one of these fields increases the chances to also develop an interest in the other one.
 
#24 ·
I'm a physicist myself. I have read about a strong connection between physicists and classical music. I've discussed this issue with other physicists. My sample size is much too small, but the physicists I've known have a much higher likelihood of enjoying classical music than other people I know. I also know that there seems to be a correlation between those with advanced degrees and classical music so maybe it's not so much physics but advanced learning.
 
#26 ·
Music is math ,tones are vibrations of sound frequency if you simply double the fequency of a pitch you have the octave in any sound style in the world.Different cultures divide an octave differently,in Europe inin 8 ways with a 12 tone sudivision,in Africa and China it's in 5 ways and in India in 24 ways.But univerally you have a octave by doubling a pitch.
 
#27 ·
Iannis Xenakis used stochastic processes in composing his music. He was trained as an architect (worked with Le Corbusier) and mathematics played a great role in his music.

Specific examples of mathematics, statistics, and physics applied to music composition are the use of the statistical mechanics of gases in Pithoprakta, statistical distribution of points on a plane in Diamorphoses, minimal constraints in Achorripsis, the normal distribution in ST/10 and Atrées, Markov chains in Analogique, game theory in Duel, Stratégie, and Linaia-agon, group theory in Nomos Alpha (for Siegfried Palm), set theory in Herma and Eonta, and Brownian motion in N'Shima. (source)
 
#28 ·
Music essentially produces divisions in time. The duration of each note is essentially a number or fraction. When notating music, as traditionally done in classical music, composers generally manipulate numbers and fractions representing sounds in time.

To make it even more mathematical, chords, notes and intervals often get referred to as numbers. When I composed classical style counterpoint, I'm aware of the intervals of scales in relation to pitch and harmony when arranging diatonic harmony.

Once more modern compositional techniques are introduced, it turns into assigning numbers to all 12 tones.

I am anything but an advanced composer butvwhen I compose, math is used a lot.
 
#30 ·
I think intelligence and creativity are just a collection of algorithms that change and interact throughout time (including the duration of a piece). When I compose I'm thinking of what is constant and what varies, what can and can't change, etc.

I also wrote a deterministic serial piece some years ago in which both pitch and rhythm are serialised, it was rearranged by TC member Crudblood into the form I attach in this message. I wouldn't do it again but it was interesting.
 

Attachments