Tuesday, March 4, 2008

Maths : The invisible hand behind Music

** Rohan Jain & I presented this paper at Intellect 2k3 organised by Manipal Institute of Technology, Manipal, Karnataka in April, 2003 **
-------------------------------------------------------------------------------------------------
Mathematics and music play very different roles in society. However, they are more closely related to each other than they are more commonly perceived to be.Behind the art of music lies an exact science, wherein a practical application of mathematics is found, in the form of series, progressions, arithmetic mean and so on. This wonderful relationship between music and mathematics is as ancient as it defies understanding. It nevertheless makes for an interesting study. Many great mathematicians have also been great lovers of music. In the ancient period the Greeks had discovered serious relations between these two aspects.Many systems of tunings developed earlier but as days progressed OCTAVES become the most popular of them all which also supported the theory of consonance and dissonance. The theory of GOLDEN RATIO takes into account musical compositions. A music composer basically needs to deal with lots of mathematics, be it counting, patterns, sequences, ratio proportions, geometry, equivalent fractions, progressions etc. Mathematics may be freed from its utter serious implications when an emblem of music is applied to it. As far as mathematical simulation is concerned we can develop a set of rules to define a fact that MUSIC CAN ACT AS a DNA OF MATHEMATICAL FUNCTIONS, which can be implemented using a high level structured computer language such as “C”.

For many people, mathematics is an enigma. Characterized by the impression of the numbers and calculations taught at school, it is often accompanied by feelings of rejection and disinterest, and it is believed to be strictly rational, abstract, cold and soulless. Music, on the other hand, has something to do with emotion, with feelings, and with life. It is present in all daily routines. Everyone has sung a song, pressed a key on a piano, blown into a flute, and therefore made music. It is something people can interact with; it is a way of expression and a part of everyone’s existence.

The motivation for investigating the connections between these two apparent opposites therefore is not very obvious, and it is unclear tins what aspects of both topics such a relationship could be seeked. Moreover, if one accepts some mathematical aspects in music such as rhythm and pitch, it is more difficult to imagine any musicality in mathematics. The accountability and the strong order of mathematics do not seem to coincide with an artistic pattern. However, there’re different aspects, which indicate this sort of relationship. But mathematics and music do not form such strong opposites as they are commonly considered to be, but that; there are connections and simulations between them, which may explain why some musicians like mathematics and why mathematicians generally love music.

A very interesting aspect of mathematical concepts in musical compositions is the appearance of Fibonacci numbers and the theory of golden section. The former is the infinite sequence of integers named after Leonardo de Pisa, a medieval mathematician. Its first two numbers are both 1 whereas every new number of the sequence is formed by the addition of the two proceedings (1, 1, 2, 3, 5, 8, 13, 21, 34….). However the most important feature in this context is that the sequence of Fibonacci ratios converges to the constant limit, called the Golden Ratio, Golden proportion or section (0.61803398….)

More common is the geometric interpretation of the golden section: A division of a line into two unequal parts is called a golden if the relation of the length of the whole line to the length of the bigger part is the same as the relation of the length of the bigger part to the length of the smaller part. Due to its consideration as well balanced beautiful and dynamic, the golden section has found various applications in arts specially in painting and photography, where important elements often divide a pictures length or width (or both) following the golden proportion, However, such a division is not necessarily undertaken consciously, but results from an impression of beauty and harmony. Diverse studies have discovered that this same concept is also very common in musical compositions. The golden section- expressed by Fibonacci ratios –is either used to generate rhythmic changes or to develop a melody line. There is a single principle that underlines all musico-mathematical relations: An arithmetic progression in music corresponds to geometric progressions in mathematics; that is, the relation between the two is logarithmic.

A “C” SIMULATION OF MUSIC IN MATHS

While establishing an amalgamation of math and music and contemplating on their relation from music to math point of view, it won’t be a redundancy to try to confer upon mathematical function an attribute of music. Intuitively, if such notion can be made to exist, then every such function should have a character signature of music. But to define such an abstract relation a fixed set of rules is quite necessary. Of course a platform for defining such relations could be a computer language where it can be implemented in an exhaustive way.

Now any mathematical function has a typical range of values that can be easily expressed within a limit by multiplying with typical whole numbers or fractions. For example if a typical scale of three octaves is considered, each of 12 notes, then a range of 36 notes are obtained. Any kind of music is based on these three octaves. Thus associating SA with 1,RE with 2, RA with 3 and so on, a musical scale can be defined.
Basically if three functions are considered: -
1. Logarithmic Function.
2. Polynomial Function
3. Trigonometric Function

It seems that their structure resembled musical scores, so as an experiment let’s see what they sound like when the following rules are defined to convert the values of the function to a range of 1 to 36.

Considering the polynomial function first: Its positive values may range from 1 to 32767(the limit for integer value in ‘C’). By dividing it into three ranges: i.e. 1 to 36, 37 to 1296, &1297 to 32767.Any value of the function in the first region can be directly processed to get the corresponding note. A value in the second range can be divided by 36(a whole number) to get the value again in the first range. For the third range the values can be divided by 910(another whole number) to get the values within the first range and the subsequent sound output. A question arises as to why the negative values of the function are to be neglected when they can also add to the music DNA of the polynomial. Well they could be converted to a positive one by multiplying with –1 and given the same treatment as to their positive counterparts.

A logarithmic function can have the highest value of 10.39.(log (32767) ) which when multiplied with 3151 gives the range of values from 1 to 32767, which can then be treated the same way as that of polynomial.

A totally different treatment lies in store for the trigonometric functions: Since the trigonometric functions are periodic so let’s define a base when they obtain a zero value. Let this base be 18. Any negative values will be treated in the range 1 to 18 and positive values within 18 to 36.

1.SINE wave: Within the range 0 to 360 degrees, a sine function gradually rises to a value 1.00 from 0.0 and falls from 1. 00 to 0.00 in the range 90 to 180degrees.so the rise may be simulated as a rise from 18 to 36 then fall from 36 to 18 then go down from 18 to 1 and then again rise from 1 to 18.hence the cycle gets completed. Based on the same lines we can define the following tables for the remaining tables: -

2. COSINE TABLE: -

DEGREE RANGE - SIMULATION RANGE
0 to 90 - 36 to 18
90 to 180 - 18 to 1
180 to 270 - 1 to 18
270 to 360 - 18 to 36

In a very similar way we can also simulate the remaining three ratios, so that they represent a particular note pattern. Is it "music"? I guess that's for you to decide. It is richly structured, with underlying themes that on the one hand seem to repeat but on the other hand are interestingly unpredictable, teasing your mind as the piece progresses.

All these aspects of mathematical patterns in sound, harmony and composition do not convincingly explain the outstanding affinity of mathematicians for music. Being a mathematician does not mean discovering numbers everywhere and enjoying only issues with strong mathematical connotations. The essential relation is therefore presumed to be found on another level. Whatever, links between music and mathematics exist, both of them are obviously still very different disciplines, and one should not try to impose one on the other. It would be wrong to attempt explaining all the shapes of music by mathematical means as well as there would be no sense of studying mathematics only from musicological point of view. However, it would be enriching if these relationships were introduced into mathematical education in order to release mathematics from its often too serious stringencies. It is important to show people that mathematics, in one way, is as much as art as it is a science. This probably would alter its common perception, and people would understand better its essence and its universality. This task, however, will certainly not be completed by the end of this century.


References : Various papers on the discussion of relation between music and maths.

No comments: