Algorithmizing music

image



It is believed that composing music is a creative activity where algorithms cannot be applied. Indeed, one can often hear from composers about muse, illumination and the golden ratio, but not about dry rules. Therefore, this article attempts to describe the simple algorithms that music follows. As a result, it will be possible to assess how much creativity and how much professional knowledge is in this activity. The description will be based on popular music, but the basic principles apply to all genres.



Creativity is the creation of something new, something that never existed in nature. For a better understanding, consider an example. There are two rookie janitors, the first graduated from professional courses, and the second has never even seen a broom. The first will immediately go to sweep the yard using standard movements, a broom grip and a yard walk algorithm. The second will first have to be creative just to pick up the broom. And if after that he declares that he is a creative person, invented the broom grip and is worthy of an award, promotion and fame, hardly anyone will take him seriously. But if it relates to music, then for some reason they perceive it.



Fortunately for this article, Russian pop music completely ignores even the elementary theory of music, so these songs will be cited as an example of creativity. Western music, namely world pop stars, on the contrary, is an example of a good application of professional knowledge. In contrast, it will be easy to find the advantages and disadvantages of each approach.



The basics



The purpose of music is to evoke an emotional response from the listener. To do this, at the macro level, the composer controls energy, tension and predictability. And so that the listener does not lose interest and listens to the song to the end, the usual means for art is used - contrast.



Predictability



Predictability is how easy it is to predict what will happen next in a song. Children's songs for an adult are completely predictable, so only children are interested in listening to them. If, on the contrary, the song is completely unpredictable, then it will be very difficult to perceive.



A song sounds predictable if it is composed of elements (melody, chords, etc.) that everyone has heard many times before. Therefore, the composer's task is to come up with something new to the standard template so that elements of unpredictability appear in the song. To do this, you can show creativity, or you can steal professionally. The songs Dua Lipa - New Rules and Sabrina Carpenter - Why use a strange sound at the beginning of the chorus precisely for unpredictability. If you still remember the song Rita Ora - Anywhere, you get two new elements (strange sound and vocal) for three songs. Natalie - I only have you



as an example of a completely predictable song . It's nice to listen to this song, but only once. There is no desire to return to it precisely because there is not a single new element here. So the song needs a balance between predictability and unpredictability. It is difficult to estimate exactly how much the latter is needed, but for popular music this value is hardly more than a few percent.







Voltage and energy



Voltage works as follows. First, the voltage level is injected, and then it is resolved. The verse builds up the tension, and the chorus resolves it.



During the song, the energy changes in a natural way: the verse is low energy, the chorus is high. In one of the last parts of the song, the maximum energy is placed, this point is called the climax.



The energy of the song is easy to assess (more details below), unlike tension - this is a purely subjective impression, a kind of feeling that arises when listening to music. But the general trend is quite simple: energy increases - tension increases, energy decreases - tension is resolved.



Voltage and Energy Consistency



If with energy everything is quite simple, then with tension it is a little more confusing. Tension grows with energy, and in order to resolve it, you need to lower the energy. That is, there is a contradiction: the chorus must simultaneously raise the energy and at the same time lower the energy in order to resolve the tension.



This contradiction can be resolved as follows. The total energy of the chorus increases, but one or more of the elements decrease their energy. The result is maximum energy with simultaneous resolution!



Climax



Where should the maximum energy (climax) be placed in the song? If at the very beginning, then listening to the song will not be interesting further. If at the very end, then the song ends very abruptly and unexpectedly, there will be a certain feeling of being lost and incomplete. The only option remains, as close to the end as possible.



In popular songs, the maximum energy can be found in two places, either in the bridge or in the third chorus. If in bridge, the song ends immediately after the third chorus . If the maximum is in the third chorus, then some ending is added .

But this is theoretically, in practice, finding the culmination can be difficult. Since it is believed that if there is no β€œstrong” climax, then the listener will listen to the song over and over again, it will become a hit and make a lot of money for the record companies.



Contrast



One of the main means of expressiveness in art is contrast. In music, it most often manifests itself in volume, melody pitch, intonation of singing, and the number of simultaneously playing instruments.



The main function of contrast is to keep the listener's attention and define the boundaries of parts of a song. There is usually a lot of contrast between the main parts of the song (verse, chorus, bridge), changes affect almost all elements of the song. If the main parts of the song consist of two sub-parts, then some new instrument is usually added to the second, that is, the contrast is quite small.



If the song has problems with contrast, then it becomes difficult to understand which part of the song is playing now, not to mention the loss of attention and interest.



Techniques, rules and algorithms



In order to see the techniques, rules and algorithms that are available to the composer for managing energy and tension, a piece of music needs to be broken down into simpler components (divide and conquer). For a popular song, this will be the lyrics, melody and accompaniment.



The words



The lyrics for the song should have design, namely the connection between all parts of the song. For example, a verse function to intrigue , ask questions , or just tell a story . And in full accordance with the principle of contrast, the function of the chorus is to resolve intrigue , answer questions , or give an emotional response to a story.



Summarizing the above, you need to build up the tension in the verses, and to resolve it in the chorus, so that the listener, upon hearing the key phrase (usually the title of the song), exclaims: "Oh, that's how it is!"



This suggests that the best way to break the song's word design is to put the song title in both the verse and the chorus .



What other requirements are there for words? Since the song is audible, it is necessary that colloquial phrases and expressions are used. It would seem an obvious requirement, but it is far from always being met. For example, Gaidai's films often use complex phrases full of meaning, which are not found in colloquial speech. Therefore, these films brought so many famous catch phrases and expressions. The difference is especially noticeable in comparison with American films and TV shows, where this requirement is met by 200% and there is not even a hint of catch phrases.



What happens if you do not comply with this requirement is easy to learn from the example of a typical Russian pop song. It seems that the authors deliberately write so that no one can understand them. The first line of the song is understandable, the second too, but it is not clear how these two lines agree with each other. And since the third line is not connected with any of the previous ones by any meaning, then there comes a terrible cognitive dissonance and the singing turns into a meaningless set of sounds.



Melody



When writing a melody for the words of a song, its speed (i.e., the rate of speech), the height and length of the phrase are controlled (the phrase is usually easy to determine, it is limited by pauses).



If you increase the speed, increase the altitude, shorten the length of the phrase, then the energy will increase. If, on the contrary, lower the speed and altitude, increase the length of the phrases, then the energy will decrease. It is enough to change one element out of three.



In fact, there are more means of expressiveness that affect the energy of the melody, therefore the most basic ones were described, and it is they that are easiest to hear.



Accompaniment



The accompaniment (minus, instrumental) is non-trivial and consists of three functional parts (base, rhythm and filling). But for a general understanding of how it affects the energy of the song, it is enough to take into account the number of simultaneously playing instruments. Everything is intuitively simple: the number of instruments increased - energy increased, decreased - energy decreased.



Halsey - Without me



How it works, let's look at the example of Halsey's song - Without me , which was a significant commercial success .



image



The figure shows from top to bottom:



  1. Soundtrack;
  2. Sound diagram of the main instruments (light - not playing, dark - playing);
  3. Energy and voltage graphs: the total of the entire song, melody and accompaniment (built exclusively on subjective sensations). The diagram of the sound of the instruments directly correlates with the energy of the accompaniment.


The lyrics of the song follow the standard pattern - the story in the verses, the emotion in the chorus. Moreover, the last most important detail of the story is revealed only in the bridge, so until this moment the listener should be tormented by the riddle of why such a touching love story ended up ending.



In this song, the energy of the melody primarily depends on the pitch with which Halsey "on average" sings each part. From the first part of the first verse to the first part of the chorus, the pitch rises, then gradually decreases. From the second verse to the bridge, everything is repeated and further in the bridge we have the lowest energy of the melody.



The accompaniment matches the vocal melody perfectly. In the first part of the chorus we have the maximum energy of the melody and the resolution of the accompaniment. Further, on the contrary, the melody is resolved, and the accompaniment reaches its maximum energy. The result is that the chorus has a total of almost constant high energy and tension.

From the summary graphs one can see the "construction" of the song, namely the regular change in energy and tension. The third chorus is highlighted, which is shorter than the first two, to reduce predictability.



Also, the third chorus lacks a constant voltage section. This is not a drawback, but a standard solution for popular songs - after the low energy bridge, the chorus immediately starts.



The maximum energy level is in the 13th part of the song (14 parts in total). Therefore, the climax is placed as close to the end as possible. Therefore, the song ends unexpectedly quickly. That is why the voltage graphs do not drop to zero. This leaves the listener with a sense of incompleteness, which should make you listen to the song over and over again. And as you can see from the commercial success of this song, this solution worked perfectly.



Output



Thus, the algorithm for composing popular music is quite simple. To do this, the song is broken down into simpler elements such as lyrics, melody, and accompaniment. And then these elements are combined to create a good song structure. In other words, the graphs of the total energy and voltage should reflect some pattern. What means of expressiveness to use, how to develop a vocal melody, when and what instruments to add, you can decide for yourself (i.e. show creativity), or you can spy on some successful song. In the end, using simple combinatorics, you can get a good popular song.



What creativity looks like (not for the impressionable)
, – Zivert – Credo.



–



image



– – . – Β« Β», . ? ? ? , .



, . , ( ) ( , ). , groove. , , ( ).



- , , .

, , , , . . , , .



. , , , ( : ). , , .



, . , , .



. , , Β« Β» , ( ) .



. , .



Zivert – Credo



image



Zivert – Credo 100% , , . , .



( , ). 16 , 8, 16, 32. -, 8 . , , . «» , , .



, , , - , . - . : – , – !



, . , , β€” . , .



, . , . : «», «», «» «».



, . Β« Β» , , .



, . , (: – ).



Zivert – Credo, , - . , .




All Articles