Научная статья на тему 'Two-step Harmonious Melody Generator'

Two-step Harmonious Melody Generator Текст научной статьи по специальности «Искусствоведение»

CC BY
142
19
i Надоели баннеры? Вы всегда можете отключить рекламу.
Ключевые слова
music creating / algorithm / computer music / harmony / artificial intelligence / generation / evolutionary algorithm / cybernetics / data analysis / создание музыки / алгоритм / компьютерная музыка / гармония / генерация / кибернетика / анализ данных

Аннотация научной статьи по искусствоведению, автор научной работы — Sofya Latkina

An establishment and spread of computer technologies has expanded the spectrum of non-mathematical problems that are suitable for algorithmic description and simulation, related to human creativity activity, art, in other words. Undoubtedly, various scientific and artistic works have their specific features and some common ones. The main point is that any art product is initially based on an intuition. The intuition of humankind, surely, relies in his experience. Nevertheless, this experience may obtain different nature. It can be acquired during rational, formal, and conscious studying of creativity specifics. However, the experience may be got by another way. Musical communication, its scales, intonations, or rhythms form in the mind some relationships, logical dependencies, which subject the certain laws and principles of melody organization. These accurate and clear patterns allow computer to take them into account, translate into commands, and simulate the process of music creation. In this paper the attempt of modeling composer’s functions on a computer is described. Modeling opuses on the basis of unification of musical rhythm and melody line allows providing computer music with given parameters of composition. Using the new approach leads to the results which differ from the predecessors and suggests new direction for further research and development in the sphere of computer art.

i Надоели баннеры? Вы всегда можете отключить рекламу.
iНе можете найти то, что вам нужно? Попробуйте сервис подбора литературы.
i Надоели баннеры? Вы всегда можете отключить рекламу.

Двухшаговый генератор гармоничных мелодий

Появление и развитие компьютерных технологий в наши дни значительно расширили спектр решаемых нематематических проблем, которые позволяют применять алгоритмическое описание и программную симуляцию к областям, связанным с творческой функцией человека, иначе говоря, искусством. Несомненно, различные научные и творческие работы обладают как своими спецификами, так и общими качествами. Основной идеей является то, что каждый результат творческой работы в определённой степени базируется на интуиции автора. В свою очередь, человеческая интуиция опирается на опыт субъекта, который может иметь под собой различную природу. Он может быть получен в результате рационального, формального, либо сознательного подхода к изучению той или иной специфики музыкального искусства. Но также он может быть извлечён из иных источников. Музыкальные связи, их ладовые, интонационные или ритмические разновидности, формируют в воспринимающем их сознании определённые отношения, логические зависимости, которые подчиняются единым правилам и принципам музыкальной организации. Эти чётко определённые и понятные шаблоны поведения позволяют компьютеру воспринять их, перевести на язык команд и симулировать на их базе процесс создания нового музыкального произведения. В данной работе рассматривается моделирование функции композитора на современном персональном компьютере. Моделирование опусов на базе объединения музыкального ритма и мелодической линии позволяет создать компьютерную музыку с заданными композиционными параметрами. Использование нового подхода приводит к результатам, отличающимся от предшественников и предполагающим новую область для исследования и разработки в сфере искусства, творимого компьютером.

Текст научной работы на тему «Two-step Harmonious Melody Generator»

Two-step Harmonious Melody Generator

Sofya Latkina <latkina.sofya@gmail.com>,

Software Engineering Department, Faculty of Computer Science, National Research University Higher School of Economics, 101000, Myasnitskaya, 20,

Moscow, Russia

Abstract. An establishment and spread of computer technologies has expanded the spectrum of non-mathematical problems that are suitable for algorithmic description and simulation, related to human creativity activity, art, in other words. Undoubtedly, various scientific and artistic works have their specific features and some common ones. The main point is that any art product is initially based on an intuition. The intuition of humankind, surely, relies in his experience. Nevertheless, this experience may obtain different nature. It can be acquired during rational, formal, and conscious studying of creativity specifics. However, the experience may be got by another way.

Musical communication, its scales, intonations, or rhythms form in the mind some relationships, logical dependencies, which subject the certain laws and principles of melody organization. These accurate and clear patterns allow computer to take them into account, translate into commands, and simulate the process of music creation.

In this paper the attempt of modeling composer's functions on a computer is described. Modeling opuses on the basis of unification of musical rhythm and melody line allows providing computer music with given parameters of composition. Using the new approach leads to the results which differ from the predecessors and suggests new direction for further research and development in the sphere of computer art.

Keywords: music creating, algorithm, computer music, harmony, artificial intelligence, generation, evolutionary algorithm, cybernetics, data analysis

DOI: 10.15514/ISPRAS-2015-27(3 )-28

For citation: Latkina Sofya. Two-step Harmonious Melody Generator. Trudy ISP RAN/Proc. ISP RAS, vol. 27, issue 3, 2015, pp. 389-406. DOI: 10.15514/ISPRAS-2015-27(3)-28.

1. Introduction 1.1. Problematic area

As man develops and explores new levels of technological progress, appearance of high-speed computers broadened the range of non-mathematical problems, allowing algorithmic description and simulation at the information level of processes related to human creative activity. The computer as a technological unit has evolved from a

simple calculator to a distributed system, supporting million non-recurring processes, sophisticated mechanism of artificial intelligence emulation, or a life support equipment. Essentially, Hi-Tech invades to every sphere of human activity, even to the complicated ones, related to nonlinear thinking and abstract mindset, like an art.

Specifically, music as a piece of art is not a trivial product for being produced by computer as is requires integrity, variability, and harmoniousness. Generally, discussions about the definition of music are reduced to two contradictory definitions: "Music is the language of our emotions", and "Music — a calculation of the mind, unsuspecting of these calculations" (Leibniz). Music is composed of elements and refined sequences of them that affects listeners' perception and sensations. Moreover, man is able to differ melodic elements depending on their "pleasantness" of exposure. This acoustic "pleasantness" is easily amenable to analysis and explanation, while the simulation of these effects and machinery reproduction is still under investigation.

1.2. Background observation

The first attempts to use the information approach in the study of musical art are related to the achievements of classic statistical information theory. This theory in the classical Shannon version has had a purely technical orientation. It was designed for communications and was almost bounded by this area. However, in 1950-60 it began to rapidly penetrate into various research areas.

One of the first statistical studies of music theory with the methods of information theory was undertaken in 1956 by American scientist Robert K. Pinkerton. In the article "Information Theory and Melody" [1] he questioned what makes a melody attractive; he discussed the issue in mathematical term. For that Pinkerton analyzed information theory in popular American tunes and children's songs to determine the probability of individual notes and paired combinations appearance. Moreover, he calculated the entropy per one note and the information redundancy. Basing on the probability of two consecutive notes with a help of random selection, he was able to make few tunes, similar to analyzed ones. Unfortunately, most of them seemed to be monotonous and not attractive enough. This fact allowed scientist to admit that not only every single note conveys a certain amount of information but also that for obtaining "attractive" tunes some redundancy is needed.

The same goal (making up new tunes by probabilistic selection) has become the basis of the study, named "The experiment in music song" [2], which was implemented in 1957 in the laboratory of computers at Harvard University. Several scientists analyzed excerpts from 37 hymns of different composers and epochs. Scientists used computer equipment for counting frequencies of all the individual elements as well as all combinations of two, three, and so on up to eight neighboring elements. But the discovery of statistical regularities was only the initial stage of their study. Basing on these results, scientists have tried to build a computer model for the creation of music. The resulting table of sounds probability and their

connections has been used for the synthesis of melodies via a random process. In total, scientists have made about 6,000 attempts of a synthesis, and created approximately 600 hymns. It should be noted that the calculations in this study were made without direct bearing on the mathematical apparatus of information theory. Incidentally, this is indirect evidence that the necessary and sufficient sought computational results can be obtained, limiting the methods of probability theory. Since then appeared a substantial amount of applications and systems that challenge computing technology in music composition. As the development in this area has started, many new theories and concepts appeared. Human taught computer basic aspects of music: sound synthesis, digital signal processing, sound design, sonic diffusion, acoustics, and psychoacoustics. The complex path of computer music investigation can be traced back to the origins of electronic music creation, and the first innovations and experiments with electronic instruments at the turn of the XX century.

There is a big selection of systems that provide digital music. Some of them require human interruption to a greater extent, like those ones developed in 50s (CSIRAC, playing Colonel Bogey March [3], Ferranti Mark 1 computer (MUSIC I [5]), the biggest achievement of which were the incipience of algorithmic composition programs beyond rote playback. Some of concepts are more independent, like TOSBAC computer [6] which caused resonance in the area and became an origin of computer music carried out for commercial purposes in popular music (this has led to the use of computers in widespread in the editing of pop songs). For the current moment, the terms of "computer music" or "computer-generated music" are related to any music which uses computers in its composition (that implies a kind of music which cannot be created without the use of computers).

Nowadays, intensive researches in the field of computer music creation are continuously carried out. Several mighty organizations are engaged (ICMA 1, IRCAM 2, SEAMUS 3) and some institutions of higher learning also. Besides scientific studies, the specialists and composers have also created some software solutions, which can be considered as basic concepts: topical for today and for contemporary computer music concepts.

In the current context it is worth to mention widely known numerous experiments and studies of R. H. Zaripov. For simulating the process of composing music, he has created several programs, which were based on different principles. At first he used the principle of synthesizing music from individual sounds; next he subdued an algorithm to certain structural, rhythmic, of pitch and harmonic laws [7, pp. 90-118; 79]; then he treated musical pattern as well as poetic text [7, pp. 119-140]; finally he approached borrowing the most common melodic turns in intonation in order to create similar melody [8]. Furthermore, it was established program-harmonizer,

1 The International Computer Music Association

2 Institut de Recherche et Coordination Acoustique/Musique (France)

3 Society for Electro Acoustic Music in the United States

which imitates the process of solving the problem of melodies harmonization by students of music schools [7, pp. 141-175].

1.3. Composition

The method of new melodies composing plays vital role in concepts of computer music creation. Musical composition simultaneously relates to the notion of an original piece of music, to the structure of a musical piece, to the process of creating some new melody. In general, the composition consists of manipulation of each aspect of music (harmony, melody, form, rhythm, and timbre). When computer music is created, it usually means that new musical notation appeared as a result of improvisation or selection and completion of patterns but more often as a result of sophisticated algorithm operating.

There can be roughly defined several common types of algorithms, basing on which exact instruments are used in a process of composing:

• Mathematical models,

• Knowledge-based systems,

• Grammars,

• Evolutionary methods,

• Systems that learn,

• Hybrid systems.

The specificity of each type is clearly implied by its name.

Currently, intensive and promising researches are undertaken in the fields of generative and evolutionary music. Also the improvisation as an efficient method of computer music making can be highlighted.

1) Generative music: The original term was popularized by Brian Eno, English composer and well-known innovator in ambient music; it implies the music, which is created by a computer and appears to be constantly changing and different. For an explicit indication that some clarification is needed; according to R. Wooller [9], there are four primary interpretations of generative music:

• Linguistic/structural: Music made up using analytic theoretical constructs, explicit as much as it is needed for generating structurally coherent material. The roots can be traced back to the generative principles in grammar of language and music, where generative instead refers to mathematical recursive tree structure.

• Interactive/behavioural: Music created by a system component with no discernible musical inputs, i.e., "not transformational". Example: engine Koan, developed by SSEYO.

• Creative/procedural: Music composed as a result of processes set which are designed and/or set in motion by the composer. Examples of result: "In C" by Terry Riley and "Its gonna rain" by Steve Reich.

• Biological/emergent: Music which can be defined as non-deterministic, revolved around the idea of using "farming" parameters for creating different variation of sounds (such as wind chimes). Example: collaborative electronic noise music symphony "Viral symphony" by Joseph Nechvatal.

2) Evolutionary music: This type of computer music is created using an evolutionary algorithm (a subset of evolutionary computation that is based on mechanisms of biological evolution, such as reproduction, mutation, recombination, and selection, and is aimed at optimization of processed essence). The whole process initiates with a set of individuals which produce audio (a piece of music, or melody, or loop): these can be generated randomly or produced by human mind. Then, through the repetitious taking steps of computation, this population becomes optimized, more sounding like a piece of customary music. As it is quite a complicated task for a computer to determine how exactly piece of art is sounding, typically the user or audience is used as fitness function (objective function that is used as a single figure of merit) of interactive evolutionary algorithm. Additionally, methods of evolutionary processing are commonly applied to harmonization and accompaniment tasks.

It is worth noting, that research in the field of automated measures of musical quality, which can be implemented by a simple computer, is also conducted nowadays. Example: NEUROGEN software uses a genetic algorithm for producing and combining musical fragments and a set of neural networks (initial population of individuals is based of real music) [10].

3) Computer-Aided Algorithmic Composition: The most common method of machine improvisation is a recombination of different musical phrases. As the resulting computer music has to be credible and nice-sounding, machine learning and pattern matching algorithms are inevitably used. That normally causes creating of variations "in the style" of original melody or pieces of music.

Modelling the particular style is a complicated objective, it requires statistical handling, big data to some extent. The algorithm can use musical surface to distinguish key stylistic features. This approach uses terms of pattern dictionaries for subsequent generating the new audio. This long musical tradition was started on 60s with Markov chains and stochastic processes. Nowadays lossless data compression for incremental parsing, pattern searching, prediction suffix tree and other new methods of data processing were added.

The factor of convenient usage of natural interface, where the musician has no need for coding musical algorithms, leads to prevalence of such systems in live performances.

Example: OMax, developed in IRCAM.

1.4. Main purposes and objectives

It should be emphasized that the researches in the field of computer music creating and different generative, evolutionary, or improvisation approachess, the development of the original algorithm, and the grasp of the concept of intuitive human-computer interaction, which will allow to manage the process of music creating, pursue the same goal. The primary aim of the entire project is to create computer music generator which will be able to create melodies according to the settings, specified by user, but without actual interruption of user to the generation of melodic pattern.

Undoubtedly, it is vital to perform specific objectives in order to reach the goal of the research. It seems to be important to clarify them in detail. The first objective will be accomplished by inventing an algorithm of computer music generating. Inevitably, it will be based on existing methodologies (generative, evolutionary), but it also has to be sharpened by the principle of flexibility and ability of changing according to adjustments, made by user. Next objective is to implement software shell, which will satisfy potential user and allow to manipulate melody relatively effortless and without necessity of code changing. Finally, output methods have to be elaborated: the way of music sounding is one of the most important things in the sphere of computer music creating.

Essentially, there is can't be any need to verify and prove what way of music creating is better, more efficient, of aesthetical: the traditional one, or the innovative variations. The interlinear mission of the whole work is to extend musical thinking or composition practice which is current computer-music practice.

2. Methodology

The destination of software which is able to produce music is to create the successions of musical tones that can be perceived as melodies, pieces of art. Considering a definition given by Alexander l. Ringer, "melody" is a pitched sounds arranged in musical time in accordance with given cultural conventions and constraints [11]. It can be noted that in some cultures rhythmic considerations may take precedence over melodic expression, so the cultural and regional context largely determines what exactly a human accepts as music. For example, Chinese and European perception of music differs a lot; this is due to many factors, in particular: the time of development of the national understanding of musical composition.

According to ancient Chinese encyclopedic works Lushi Chunqiu, the scale has to contain twelve tones. The situation differs for European music, which is younger and fully aligned with the Well-Tempered Clavier of Bach. Current paper corresponds to the European scale and standards of Western music. In this concept a pitch space includes octaves sized 12 semitones — this specific distance reflects physical distance on keyboard instruments, orthographical distance in Western

musical notation, and musical distance as measured in psychological experiments [9].

2.1. Tones and scale

Tones, which construct a melody, equal to the sum of two semitones and hence referred to as a 'whole tone', usually perceived as a major 2nd; in equal temperament, the sixth part of an octave. As it is defined for European scale, the semitone seems to be the ration of the frequencies as 1 to the 12th degree of 2. Thus, the tone of particular note can be identified with function: f(x ¿) = * f(xt-1), where xi is a current note and x^ - the previous one.

Tones are used in musical theory for calculating intervals, which inevitably appear "between" every two notes. Literally speaking, this circumstance affects a lot on how a person perceives a melody, whether he likes it or not, recognizes as music or not.

The set of intervals is restricted; each of them has two vital characteristics: the amount of semitones and harmoniousness. Shortly, mostly used intervals can be presented in the following list:

• Perfect unison, perfect octave — the best consonance;

• Perfect fourth, perfect fifth — middle consonance;

• Third (minor, major), sixth (minor, major) — imperfect consonance;

• Second (minor, major), seventh (minor, major) — sharp dissonance.

2.2. Harmony

According to the New Grove Dictionary of Music and Musicians, harmony can be defined as combining of notes simultaneously, to produce chords, and successively, to produce chord progressions. The term is used descriptively to denote notes and chords so combined, and also prescriptively to denote a system of structural principles governing their combination [11]. Creating a harmonic and logical melody is a sophisticated task, which is complicated by a sufficient number of rules, restrictions, and preconditions. Important mention: "logical" in this context implies symmetry of melody, adherence to pre-defined rules, compliance with the restrictions, exactly. Logical construction of melody includes controlling what next note will be, where the start and the end of melody are, at what time the next transition can be performed. Existing tools can provide the solution of these important tasks.

2.3. Petri nets

Once an issue of polyphony is raised, the usage of Petri nets seems to be relevant. Creating computer music becomes more complicated if second (third, fourth, etc.) voice is added. Without proper synchronization, created music will become cacophonic.

The dynamic system can model a "Conductor": like a conductor in real life, this model manages two or more musical threads. It is necessary to keep tracking of hitting the strong bit and maintaining mode and harmony. Due to what can this monitoring be achieved?

Fig. 1 Example of timed petri net

The key feature of timed Petri nets is a usage of limited execution time, which makes the transition disabled from occurring for the duration time; but it is fired immediately after becoming enabled. In the presented primitive net (see in Fig. 1) the time delay (or execution time) is 4 time units. In the initial state "Play" in enabled will therefore immediately fire, i.e., the token in A is consumed. Next there occurs a delay in 4 time units before the firing is complete and tokens are deposited into A and B. Now Play is again enabled and will again fire. Practical application of the concept can be demonstrated on the following example (see in Fig.2): in the first bar (Bar0) only one violin plays, next the second violin joins, then the first violin sounds together with two viols, finally, all instruments play together, and in the last bar the first violin is again sounding lonely (see the information about tokens motion in table I). This example can provide representation of how actual conductor deals with four different musicians.

Fig. 2 Example of timed Petri net, model "Conductor"

Table I. Chronology of tokens motion

Violin Violin2 Viola Viola2

<initial> (Bar0) 1 0 0 0

trans1 (Bar1) 1 1 0 0

trans2, trans3 (Bar2) 1 0 1 1

trans1 (Bar3) 1 1 1 1

trans0, trans5, trans6 (Bar4) 3 0 0 0

Within the scope of current paper only monophonic melodies will be considered; but usage of timed Petri nets stays suitable for the project, perspectively.

3. Two-step harmonious computer music creation algorithm

The process of creating computer music with a melody as a resulting form can be divided in two phases: first, computer constructs durational pattern of melody, then, it is filled with tones.

3.1. Durational pattern construction

A typical melody is a combination of pitches and rhythm. It is not essential what element of combination will be created first; in the current work it will be the rhythm.

All rhythmic units can be classified as (see in Fig. 3):

• Metric — even patterns, such as steady eighth notes or pulses;

• Intrametric—confirming patterns, such as dotted eighth-sixteenth note and swing patterns;

• Contrametric—non-confirming or syncopated patterns;

• Extrametric—irregular patterns, such as tuplets.

The realization of each kind of rhythmic units becomes possible with a proper standardization of a variety of notes durations. In this way, for every duration (eights, pulses) the time is given: exact amount of seconds, for which a single note with this duration sounds. This parameter (the time) can be accordingly changed if a tempo of the whole melody is changed.

Fig. 3 Rhythmic units

By creating durational pattern, a program complies with necessary restrictions, like: an overall sum of beats doesn't exceed time (meter) signature. It also avoids syncopation for the first and last beats of pattern and adheres to the principle of symmetry.

Durational pattern of musical compositions appears to be holistic and logical if it uses principles of symmetry and repetition. Like in poems, rhythmical phrases have to alternate. By this reason, algorithm considers the amount of bars, which have to be filled with various durations, and constructs an alteration of several rhythmic patterns, just as if it comes to the rhyme in the poem. The process is organized in the following way: A, B, C, D - rhythmical phrases, the combination of several durations, overall amount of which doesn't exceed time signature. Program generates from 1 to 4 different phrases and constructs the durational pattern like a poem, using one of the six schemes (each named by similar rhyme scheme), described in Table II.

Table II. Rhythm schemes

Name of scheme Phrases alternation (for 4 bars)

Alternate A B A B

Enclosed A B B A

Monorhyme A A A A

Rubaiyat A A B A

Simple 4-line A B C B

Clerihew A A B B

iНе можете найти то, что вам нужно? Попробуйте сервис подбора литературы.

After 4 bars of durational pattern are constructed, program deals with next ones, using the same rhythmic scheme or another one.

Here is a short example of how algorithm creates durational pattern for eight bars

4 .

with time signature 1 or - in Table III (here only metric patterns are used in order to facilitate understanding).

Table III. Example of durational pattern constructing

Rhythmic phrase 'A' Crotchet + Quaver + Quaver + Crotchet + Crotchet

Rhythmic phrase 'B' Quaver + Quaver + Quaver + Quaver + Quaver + Crotchet + Crotchet

Rhythmic phrase 'C' Quaver + Crotchet + Quaver + Quaver + Crotchet + Quaver

Rhythmic phrase 'D' Crotchet + Quaver + Quaver + Minim

Chosen scheme(-s) Alternate (using phrases A,B) + Simple 4-line (using phrases A, D, C)

Resulting scheme A B A B A D C D

Bar 1 J J J

Bar 2 J

Bar 3 J -hi J J

Bar 4 J

Bar 5 J J J

Bar 6 JiiJ

Bar 7

Bar 8 JiiJ

3.2. Melodic pattern construction

The basis of this part of the algorithm lies in the rules of harmonic melody construction (rules will be explained further).

In mathematics, there is one key rule: a plane can be described through three points. Literally saying, the whole two-dimensional surface, a flat, that contains endless amount of points, can actually be defined by only three of them. A figure "3" has significant in a context of music creating also. Three notes form a chord, which determines vital characteristics of musical composition: whether it is major of minor, harmonious or disharmonious. As it is needed to create harmonious melodies, chords can be uses as basic elements, sequential playback of which is finally a musical canvas.

Back to the Western music: it occurs that this concept is a product of two subjects, harmony and counterpoint (voice leading). The first discipline appoints the acceptable chords, which sound simultaneously or successively. The second one connects the individual notes in a series of chords so as to form simultaneous melodies. According to Dmitri Tymoczko, composer and music theorist, these key features "facilitate musical performance, engage explicit aesthetic norms, and enable listeners to distinguish multiple simultaneous melodies" [12]. This researcher has developed an interesting model of melody's motion analysis. He supposed that there can be a geometric shape which can represent all possible notes and their combinations. This shape is an orbifold (see in Fig. 4) — that is the space of unordered pairs of pitch classes. The orbifold is singular at its top and bottom edges, which act like mirrors. In this way, and melody or voice leading between pairs of pitches (or pitches classes) can be associated with a path on the picture. And as it follows, consonant chords of traditional Western music can be connected by efficient voice leading, visualized on this shape. There are a lot of sophisticated nuances and features in the description of this model, which can be unclear for uninitiated reader. The most essential conclusion is that, after all necessary investigations, researcher has proved that most of famous classical melodies subject to common rules: they consist of symmetrical voice leadings, which can be easily traced with orbifold. This rule applies for canonical music, hence, it can be inversed. The aim of this part of algorithm in the current project is to use inversed rule and build a melody, basing on harmonious permutations and combinations.

transposition

00 ^ 11 22 33 44 55 [66

1 01 12 23 34 4*5 56 f е*1 02 13 24 35 46 [57 I 62 03 14 25 36 47 f t*2 е'з 04 1*5 2*6 3*7 [4*8 I 13 e*4 OS 16 27 38 f 93 14 e*5 0*6 Î 1*7 2*8 (3*9 I 46 5t 6e 70 81 92 I

48 59 6t 7e 80 91 112;

I 5*8 63 7t a'e SO Й f

57 6*8 73 8*1 9e tÔ [el

I 6*7 7*8

66 77 88

OS 1*6 27 38 f PerfeCt f0Urth 0*6 Î 1*7 2*8 [3*9| trit0ne

23 3*4 4 56 f m""0rSeC0nd 24 35 4*6 [5*7] major second

1*4 25 36 47 f minor third 15 2*6 3*7 [4*8] ™jor third

33 44 55 [66]

8*1 9e to [ei] major second

-0 81 92 f PerfeCl ,0U'tn

• major third

80 91 [t2] '

• i minor third Be SO И J

* minor second

unison

unison

perfect fourth major third minor third

minor second

minor third

minor second

Fig. 4 Orbifold

For the particular objective simplified shape can be considered. It is a cube with eight vertices: for each pitch in octave and one for the first one of the next octave (see in Fig. 5). This cube is carried out specifically for Cdur.

The essence of this method is that program constructs a melody by moving along the edges: from one vertex to another. These movements are caused by the chords; program is trained to use the most harmonious ones, vary sequences, and always resolve to the tonic. How exactly does it work? It would be rational to explain the approach with an example:

0. A program has already defined durational pattern so this is not an issue anymore;

1. Program appoints C (tonic) as the first pitch;

2. Program chooses next pitch from E, G, and D. This can result in intervals: major third, quart, or major second. Program chooses G;

Fig. 5 Cube of pitches sequences constructing

3. Program chooses next pitch from H, A, or C. Only one option can result in chord, so program chooses A. End of iteration (triad is done);

4. Program chooses next pitch from D, G, or C of the next octave. Program chooses D;

5. Program chooses next pitch from C, A, and F. This can result in intervals: minor third, major second, or fifth. Program chooses F;

6. Program chooses next pitch from D, E, or C of the next octave. Program chooses E. End of iteration (triad is done);

7. Program chooses next pitch from C, F, or H. Program chooses H;

8. Program chooses next pitch from G, E, and C of the next octave. This can result in intervals: major third, minor second, or the fifth. Program chooses G;

9. Program chooses next pitch from C, H, or A. Option "C" is an optimal finishing for harmonic melody generation. End of iteration;

10. Next iteration...

One of the key limitations for this endless process is to return to the tonic at the end of voice leading. The entropy of melodic pattern can be increased if it is allowed to move not only along edges (those ones which are drawn on the picture). But the principle has to stay unchanged: the motion considers chords and gives priority to the consonant ones.

Program picks an amount of pitches which corresponds the durational pattern created earlier. At the final stage algorithm creates and object: melody, which consist of notes (objects with appropriate properties: tone and durations). This is the end of algorithm work.

4. Conclusion

The problem of this paper is considered upon the problem of creating music by computer, which sounds rhythmically and harmonically and appears to be received as a complete melodic pattern without actual interruption of humankind. Its specifics is related to the consonantly sounded melodies, to simplicity of construction algorithm, and to its flexibility: in a case cancelation of some of limitation, program will provide qualitatively different piece of art, hence, the ability of computer improvisation can become unlimited within the scope of this project while the final produce stays holistic.

References

[1]. R. Pinkerton. Information Theory and Melody, Scientific American, vol. 194. #2, pp. 77-86, 1956.

[2]. F. Brooks, A. Hopkins, P. Neumann, W. Wright. An experiment in musical composition, IRE Transactions on Electronic Computers, vol. EC-6, № 3, pp. 175-182, 1957.

[3]. P. Doornbusch, The Music of CSIRAC, Melbourne School of Engineering, Department of Computer Science and Software Engineering, Ed. Melbourne, Australia: Common Ground, 2005.

[4]. J. Fildes, 'Oldest' computer music unveiled, BBC News, Dec. 2008, retrieved Dec. 4, 2013.

[5]. V. Bogdanov, All Music Guide to Electronica: The Definitive Guide to Electronic Music, Russia: Backbeat Books, 2001

[6]. T. Shimazu, The History of Electronic and Computer Music in Japan: Significant Composers and Their Works, Leonardo Music Journal (MIT Press), vol. 4, pp. 102-106, 1994.

[7]. R. Zaripov. Kibernetika i musika [Cybernetics and music], Moscva, Rossiya: Nauka [Moscow, Russia: Nauka], 1971 (in Russian).

[8]. R. Zaripov. Produktsionnaya sistema v musike [The production system in the music], Izvestiya AN SSSR. Technicheskaya kibernetika [Proceedings of USSR Academy of Sciences. Technical cybernetics], 1987, no. 2, pp. 207-216 (in Russian).

[9]. R. Wooller, A. Brown, A framework for comparing algorithmic music systems, in Symposium on Generative Arts Practice (GAP), 2005.

[10]. P. M. Gibson, J. A. Byrne (1991) NEUROGEN, musical composition using genetic algorithms and cooperating neural networks. [Online]. Available: http://ieeexplore. ieee.org/xpl/articleDetails.j sp?reload=true&arnumber= 140338.

[11]. The New Grove Dictionary of Music and Musicians, 2nd ed., S. Sadie, Ed., J. Tyrrell, Ed. Oxford, UK: Oxford University Press, 2004.

[12]. D. Tymocsko (2006) The Geometry of Musical Chords. [Online]. Available: http://www.sciencemag.org/content7313/5783/72.full.

[13]. D. G. Loy, The Music Machine: Selected Readings from Computer Music Journal, Roads, Curtis, Ed. Cambridge, USA: MIT Press, 1992.

[14]. B. Varga, U. Dimen, E. Loparitz. Yazik, Muzika, Matematika. [Language, music, mathematics] Moscva, Rossiya: Mir [Moscow, Russia: Mir],1981 (in Russian)

Двухшаговый генератор гармоничных мелодий

Софья Латкина <latkina.sofya@gmail.com>, Национальный Исследовательский Университет Высшая Школа Экономики, 101000, Россия, г. Москва, ул. Мясницкая, д. 20

Аннотация. Появление и развитие компьютерных технологий в наши дни значительно расширили спектр решаемых нематематических проблем, которые позволяют применять алгоритмическое описание и программную симуляцию к областям, связанным с творческой функцией человека, иначе говоря, искусством. Несомненно, различные научные и творческие работы обладают как своими спецификами, так и

общими качествами. Основной идеей является то, что каждый результат творческой работы в определённой степени базируется на интуиции автора. В свою очередь, человеческая интуиция опирается на опыт субъекта, который может иметь под собой различную природу. Он может быть получен в результате рационального, формального, либо сознательного подхода к изучению той или иной специфики музыкального искусства. Но также он может быть извлечён из иных источников. Музыкальные связи, их ладовые, интонационные или ритмические разновидности, формируют в воспринимающем их сознании определённые отношения, логические зависимости, которые подчиняются единым правилам и принципам музыкальной организации. Эти чётко определённые и понятные шаблоны поведения позволяют компьютеру воспринять их, перевести на язык команд и симулировать на их базе процесс создания нового музыкального произведения.

В данной работе рассматривается моделирование функции композитора на современном персональном компьютере. Моделирование опусов на базе объединения музыкального ритма и мелодической линии позволяет создать компьютерную музыку с заданными композиционными параметрами. Использование нового подхода приводит к результатам, отличающимся от предшественников и предполагающим новую область для исследования и разработки в сфере искусства, творимого компьютером.

Ключевые слова: создание музыки, алгоритм, компьютерная музыка, гармония, генерация, кибернетика, анализ данных.

DOI: 10.15514/ISPRAS-2015-27(3 )-28

Для цитирования: Латкина Софья. Двухшаговый генератор гармоничных мелодий. Труды ИСП РАН, том 27, вып. 3, 2015 г., стр. 389-406 (на английском языке). DOI: 10.15514/ISPRAS-2015-27(3)-28.

Список литературы

[1]. R. Pinkerton. Information Theory and Melody, Scientific American, vol. 194. #2, pp. 7786, 1956.

[2]. F. Brooks, A. Hopkins, P. Neumann, W. Wright. "An experiment in musical composition", IRE Transactions on Electronic Computers, vol. EC-6, № 3, pp. 175-182, 1957.

[3]. P. Doornbusch, The Music of CSIRAC, Melbourne School of Engineering, Department of Computer Science and Software Engineering, Ed. Melbourne, Australia: Common Ground, 2005.

[4]. J. Fildes, "'Oldest' computer music unveiled", BBC News, Dec. 2008, retrieved Dec. 4, 2013.

[5]. V. Bogdanov, All Music Guide to Electronica: The Definitive Guide to Electronic Music, Russia: Backbeat Books, 2001

[6]. T. Shimazu, "The History of Electronic and Computer Music in Japan: Significant Composers and Their Works", Leonardo Music Journal (MIT Press), vol. 4, pp. 102106, 1994.

[7]. Р. Зарипов, Кибернетика и музыка. Наука, 1971.

[8]. Р. Зарипов, Продукционная система в музыке. Известия АН СССР. Техническая кибернетика, том 2, стр. 207-216, 1987.

[9]. R. Wooller, A. Brown, "A framework for comparing algorithmic music systems", in Symposium on Generative Arts Practice (GAP), 2005.

[10]. P. M. Gibson, J. A. Byrne (1991) NEUROGEN, musical composition using genetic algorithms and cooperating neural networks. [Online]. Available: http: //ieeexplore. ieee. org/xpl/articleDetails.j sp?reload=true&arnumber= 140338.

iНе можете найти то, что вам нужно? Попробуйте сервис подбора литературы.

[11]. The New Grove Dictionary of Music and Musicians, 2nd ed., S. Sadie, Ed., J. Tyrrell, Ed. Oxford, UK: Oxford University Press, 2004.

[12]. D. Tymocsko (2006) The Geometry of Musical Chords. [Online]. Available: http://www.sciencemag.org/content/313/5783/72.full.

[13]. D. G. Loy, The Music Machine: Selected Readings from Computer Music Journal, Roads, Curtis, Ed. Cambridge, USA: MIT Press, 1992.

[14]. Б. Варга, У. Димен, Е. Лопариц, Языка, музыка, математики. Мир, 1981.

i Надоели баннеры? Вы всегда можете отключить рекламу.