Music Composition using Artificial Intelligence

topspinauspiciousΤεχνίτη Νοημοσύνη και Ρομποτική

17 Ιουλ 2012 (πριν από 4 χρόνια και 5 μήνες)

401 εμφανίσεις

M
usic

C
omposition

using

A
rtificial

I
ntelligence


Victoria Tran


Computing Research

Department of Computing Sciences

Villanova University, Villanova, Pa, 19085

phuongngoc.tran@villanova.edu


Abstract


M
usi
c composers
originally w
rote

compositions
by hand
to ex
press themselv
es.

Since the discovery of artificial
intelligence
, c
omputer scie
ntists

discover

how to create a
program that will help
music composers write their

compositions
. Computer scientists

want

to learn more
about the relationship of music composition and artificial
intelligence
by

p
erforming experiments or analyzing other
sources to develop ideas.

While music composition and

artificial in
telligence encounter

problems between
computer scientists and music comp
osers
, they will need
to work together to understand both topics better
.


Keywords


Genetic algorithms, music composition
, Konohen
grammar


1.

Introduction


Music composition and artificial intelligence have an
int
eresting relationship that many

comput
er
scientists find
intriguing
. When a music composer manually writes
music compositions, he has reason the intention in his
music as well as his creativity.

Com
puter scientists have
n
ewer approache
s to writing music compo
sitions

by
generating program
s

as tech
nology improves
.

Still,
artificial intelligence and algorithms

cannot duplicate this
type of human activity
.
Since music has many varieties,
computer sci
entists
are exploring
a similarly wide variety
of appropriate technologies that can be used

for automatic
music composition such as

genetic algorithms,

compatible
programm
ing language
s
, and music theory.



This

paper

will explain the ap
proaches computer
scientists used

to understand the complicated nature of
music composition.

Computer scientist
s use genetic
algorithms to compute programs that create music. In
addition, techniques like the Konohan grammar

[4]

and
using programming languages that are compatible to
music help gi
ve the computer scientists ideas of
improving the nature of music com
po
sitions
. Despite the
progress of understanding music composition using
artificial inte
lligence,

it needs more evidence to fully
explain the topic
.



2.

Method
s


The strategy for cr
eating a program that writes

music
composition involves

many procedures and c
hallenges
.
Loy and

Abbot

suggest using

an e
xisting programming
language to develop
a library that stores common music
structure operators

[1]
.

The difficulties

in
creating
music
composition
automatically using artificial intelligence

techniques are related

to the
complex
semantics and
syntax of
how
music
is created
in the brain as compared
with how the same music can be represented
programm
at
ically
.
Therefore
, a

programmer must choose

an appropriately capable

programming lang
uage

that can
support
the required
music

structures.


3.

Creativity


Although music programs c
an compose music

of a
relatively sophisticate nature
, they require

creative input

from both the
human
comp
oser and the computer scientist

or programmer
.
Sheikholharam and Teshnehlab sugge
st
that creativity has two forms: the composer
either
has
originality or borrows from existing ideas

[4]
.
The
creativity part of computerized music composition is very
challengi
ng because there is a

lack of technology

that can
adequately quantify and
implement

human creativity
.

Roads argues that the human
composer must handwrite
his music composi
tions because
computer
program lacks
creativity [3]
.

The composer needs to ded
icate his time to
creating

compositions as well as the programmers’
dedication to

create efficient and stable programs.

Since
technology improves every day, the music programs have
better algori
thms and programming languages.



4.

Genetic Algorithms


According

to Oliwa
, g
enetic a
lgorithms have

a major role
in computing a
music composition
program

[
2
]
. They
involve a process similar t
o the survival of the fittest,
where e
ach genetic algorithm contains a phenotype and a
genotype.
G
enetic algorithms must work alongside a
compatible programming language to produce a language
t
hat composes music.
Genetic algorithms can support both
originality and d
eveloped ideas, while the Konoha
n
grammar finds the rules for sequences in music

[4]
.


The genetic algorithms randomly create a shape, which is
a fixed division of the string that is
divided by separators

into segments. The segments are assigned by fitness
functions,
which determine their values

from their shapes
.
S
hapes

are randomly created, so people

will see different
ones

created during each execution
.
From the differently
executed strings, people will see different songs being
generated to suit each instrument’s style.


4
.
1

Genotypes and Phenotypes


G
enotypes an
d phenotypes

help produce an efficient
program
. Genotypes contain

a fixed multidimensional
a
r
ray while phenotypes represent

the music score.

Using
programming languages, such as the abc language,
genotypes help map the algorithm for making the
programs

[2]
.
The notation of the programming language
helps describe the phenotypes, which converts music
symbols into ASCII code.


5.

Konohe
n Grammar


The creativity of music composition has a major factor on
whether the composer has originality or develops his
ideas fr
om existing ideas. From
using genetic algorithms,
Konohe
n grammar, and mutation, Sheikholharam and
Teshnehlab decide to create two different entities for the
pitch and dur
ation of the music [4]. G
enetic algorithms
are dynamic due to the c
hanges in music pa
tterns.
Konohe
n grammar then evaluates the pitch and duration
through the use of deterministic rules in music and the
creativity of the composer. The convergence of the pitch
and duration makes sure that the patterns do not interfere
with each other. By re
presenting pitch and duration of
music composition as two different entities, the authors
develop a new method for music composition.


6.

Programming Lan
g
uages


When
they choose

programming languages, computer
scientists
look for reliable languages that can create
efficient programs
as well as a better understanding about
music
[1].
The programming languages must have
compatibility with the genetic algorithms to produce
programs that can compose music.
For Oliwa, he uses t
he
abc language to generate music in ASCII [2].
The abc
language also produces music that is readable and
writable to humans.
Sheikholharma and Teshnehlab use
a
combination of genetic algorithms and the Konohan

grammar to produce a program that can not only write
compositions, but also has originality

[4]
.



7.

Problems


Although computer scientists can create programs, they
have problems with

syntax, semantics, and

efficiency.
According to Roads

and Oliwa
, more re
search into music
and artificial intelligence is needed to understand the
relationship between them

[3]

[2]
.

Roads suggested that
computer scientists need to make interactive and flexible
programs
, while Oliwa

suggested repeating his
experiments to produce more accurate results
.

If computer
scientists repeat experiments by modifying them, they
will get a better understanding of music composition and
artificial intelligence.


T
he m
usic composers

encounter proble
ms when they
write their music compositions. Music composers

would
translate their handwritten compositions into
computerized programs.
F
or example, the music
composers will need time to understand
particular
commands for inputting music scores
.
Sin
ce the
programs
lack flexibility

and increase

the cost of learning to use
them
, music composers orchestrate their work by working
with one instrument at a time.

Therefore, Roads suggested
that writing computerized music compositions will
require better representa
tions [3].


8.

Experimental Results


Performing experiments
help computer scientists gain a
better understanding about the relationship between music
composition and artificial intelligence.

Computer
scientists can

fulfill their und
erstandings by either
form
ing arguments from

their resear
ch or perform
experiments to know

how human the computerized music
compositions work.
The following experiment

show
s

a
huge difference in the progress of music composition
using artificial intelligence.


8
.1 Design


Oliwa

evalu
ated the fitness functions on an

electric guitar
by performing different techniques

[2
]

such as ascending
and descending tones
. For each execution of the program,
the fitness functions give a random number
to test

the
pitch and

the
duration of the mu
sic
, or

chords
.
The
segments are then awarded with points when their values
fulfill the constraining points of the program.

An example
of using fitness functi
ons involves with

the
segment that
contains the
ascending tones.


E
#
F G A,
#
F G A H, G A H C

E
#
F G
C
,
#
F G
D
H, G A H
A


Figure 1:
Execution varies for the fitness functions [2].


Each segment of the fitness function

can have a similar fit
with the original composition.
In Figure 1, the sequence
of letters above represents the written composition, while
the sequence at the bottom represents the results from the
execution of the fitness function.
The letters that are
printed in bold represent the musical notes that are not

picked up by the fitness functions.



8
.2

Results


From
Oliwa’s experiment
,
the fitness function values v
ary
for each execution. T
he num
ber and size of the segments

can be randomized to
produce different segments of
different
sizes for
fitness f
unctions
.

If the song executes
more than one segment, each segment produces a unique
sound.
Oliwa also limits using restrictions and constraints
of composing music to make music retain its uniqueness.


8
.3 Analysis


The results from t
he experiment reveal

how comput
erized
music progra
ms can reflect

artificial intelligence.
By
randomizing the segments of the computerized music
composition, the evaluations had a huge effect on
ge
nerating the fitness functions

and segments for each
music score
. The segments generated af
ter each execution
imitates a person’s performance. Since music performers
either play or sing differently during each performance,
the segments can also reflect
the computer scientists’

continuing

research

of
music and artificial intelligence
.
In
conclusi
on, p
eople can

get a better idea of ho
w music
would work, and

understand how com
puterized music can
imitate a musician’s performance
.


8
.4 Future Work


Roads’ proposal and Oliwa’s experiment

show

a

huge
difference in the field of
music composition using
artificial intelligence
.
During the time Roads wrote the
article, computer scientists did not have enough
information to understand mus
ic and artificial
intelligence. Information gathered from research updates
itself to give computer scientists opportunity

to develop
newer techniques to make the program more efficient and
easier to use.
Oliwa
, Sheikholharam and Tesh
nehlab later
developed techniques to create music composing
programs that are more efficient and flexible

to the music
composers
.
Techniques li
ke the Konohen grammar reveal
a significant change of creating programs that can write
music scores.
Computer scientists
can

now
continually
develop efficient
and flexible
algorithms to create

programs
that compose music.


Importantly, computer scientists

and music composers
will need to interact and work together
to enhance the
relationship between

music composition and artificial
intelligence.
Because music composers use the program to
work, they
need to learn

commands and
have a
basic
understanding of t
he program.

In addition, musicians can
give feedbacks to the computer scientists about improving
the program. C
omputer scientists will use

the music
composers’ feedbacks on the programs to make more
efficient algorithms and learning about the human nature
of music compositions.
Both fields will have a better
understanding of computer science and music
composition.


9.

Conclusions


When writing their compositions to the program, music
composers
would
need time to learn about syntax and
semantics
. Music
composers also need patience when
they convert their handwritten compositions to the
computerized version of their works

[3]
.
Since technology
improves, music composers will have more efficient and
flexible programs to work on their compositions. Music
com
posers can also test their compositions by using a
range of computerized musical instruments.


B
ecause music has
a diverse range
, computer s
cientists
need more research
.
Genetic algorithms help create form
and notation of the music compositional program.
Computer scientists must take caution when they choo
se a
programming language because music has a diverse
range
.

Like many programs, computing a program that
composes music encounters syntax and semantic
problems as

well as efficiency. Since computer scien
tists
find the relationship deep, they h
ave opportunities to
understand it.


Reference
s


[1]
G. Loy and C. Abbott. “Programming Languages for
Computer Music Synthesis,

Performance, and Composition,” Computing Surveys,
Vol. 17, No. 2, pp. 235
-
265, June
1985.


[2]
T. Oliwa. “Genetic Algorithms and the abc Music
Notation Language for Rock Music Composition,”
GECCO’08, Atlanta, Georgia, USA, pp. 1603
-
1610, July
12
-
16, 2008.


[3]
C. Roads. “Research in Music and Artificial
Intelligence,” Computing Surveys,

Vol. 17, No. 2, pp.
164
-
190, June 1985.


[4]
P. Sheikholharam and M. Teshnehlab. “Music
Composition Using Combination of Genetic Algorithms
and Kohonen Grammar,” ISCID '0
8, 2008 International

Symposium on Computational Intelligence and Design,
pp. 255
-
26
0, 2008.