Download Music and AI Past and Present

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts

Ecological interface design wikipedia , lookup

Perceptual control theory wikipedia , lookup

Fuzzy logic wikipedia , lookup

Wizard of Oz experiment wikipedia , lookup

Human–computer interaction wikipedia , lookup

Embodied cognitive science wikipedia , lookup

AI winter wikipedia , lookup

Intelligence explosion wikipedia , lookup

Incomplete Nature wikipedia , lookup

Existential risk from artificial general intelligence wikipedia , lookup

Knowledge representation and reasoning wikipedia , lookup

Ethics of artificial intelligence wikipedia , lookup

Philosophy of artificial intelligence wikipedia , lookup

History of artificial intelligence wikipedia , lookup

Transcript
Music and AI Past and Present
By Jonathan Pickard
It is said that there are two types of creativity: that which comes from the depths
of the human mind, in a sudden moment of clarity, and that that comes from hard work
with incremental revisions. It appears that the former is at present an enigma; yet, the
latter resembles algorithmic processes. Algorithmic composition has been around for
thousands of years, and recently, with the advent of modern computers, there has been a
resurgence of interest. Some people view algorithmic composition to be inferior because
an algorithm produced it, not an artist. Yet in my opinion algorithms can act much like
an instrument, by translating the designer’s/musician’s perceptions into music.
Algorithmic composition refers to “some formal process to make music with
minimal human intervention.” An algorithm by definition is based on a limited number
of predefined instructions. The problem exists in defining these instructions to produce
“music.” The process of formalizing instructions to create music dates back to the
ancient Greeks. Pythagoras believed that there was a direct connection between the laws
of nature and the harmony of sounds. Pythagoras thought that music and numbers were
inseparable, numbers were believed to be the key between the spiritual and physical
universe. Ptolemy believed that mathematical laws “underlie the systems both of music
intervals and of heavenly bodies,” and certain notes corresponded with particular planets.
This gave Plato the inspiration to write “music of the spheres,” music that was produced
based on the revolution of planets.
Another formalization began in the 15th century with the birth of “canonic”
composition. In this method the composer wrote a single “voice part” and “gave
instructions to the singer to derive the additional voices from it.” These instructions were
called “cannon,” meaning rule or law. “For example, the second voice might be
instructed to sing the same melody starting a certain number of beets or measures after
the original; the second voice might be an inversion of the first, etc.” Using this
algorithmic procedure, the composer is removed from large portions of the composition
process. The composer only needs to invent certain kernels of the music, a single melody
or section. Mozart also used automated composition techniques in his Musikalisches
Wurfelspiel (Dice Music). This process entailed assembling a number of small musical
fragments, and combining them randomly using dice.
There are also modern examples of algorithmic composition that does not involve
computers. John Cage utilized semi-randomness in many of his compositions. Reunion
was composed using a photoreceptor-equipped chessboard. Each move a player made
produced sounds and a unique composition. Cage also used ideas similar to the Greeks,
composing music based on natural phenomena. The Atlas Eclipticalis, was composed
using star charts, by simply placing notes where stars occurred.
Computers introduce an incredible resource for algorithmic composition. Even
before the birth of modern computers Ada Lovelace, inventor of the calculating engine,
supposed that “the fundamental relations of pitched sound in the signs of harmony and
musical composition were susceptible of such expression and adaptations, the engine
might compose elaborate and scientific pieces of music of any degree of complexity or
extent.” Lejaren Hiller and Leonard Isaacson created the earliest instance of computergenerated composition in 1956 at the University of Illinois. Using the Illiac (a “high
speed” digital computer) Hiller and Isaacson created the Illiac Suite, this piece was
created by generating “raw materials” with the computer, modifying these raw materials
base on various functions, and then selecting the best modifications based on rules. This
created the “generator/modifier/selector” paradigm used by many subsequent programs.
Another slant on random composition uses chaos theory; this application uses
various nonlinear equations that have been realized from nature and other chaotic
structures such as fractals, weather, “the mixing of fluids, the phenomenon of turbulence,
population cycles,” and the beating of the human heart. Some systems like orbits and
population maps are relatively easy to model.
The Henon Map (A simplified model of a star’s orbit around a gravitational center.)
Recursive Equation: xn+1 = yn+1 – Ax2n
Pseudo-Code:
void henon(double x, double y, int num) {
double a = 1.4, b = 0.3; // Constants
for(int i = 0; i <= num; i++) {
play_note (x, y);
x = y + 1 – (a*(x*x));
y = b * x;
}
}
Population Map
Recursive Equation: xn+1 = axn(1-xn), 0 < a < 4
Moving towards artificially intelligence systems are rule-based systems. Systems
based on a series of tests, with each result leading to a new step. [This system usually
implements a degree of randomness.] Some rules include “parallel fifths are not
allowed” and “avoid tritons near cadence in Lydian mode.” Yet sometimes rules are
meant to be broken, especially in music, therefore certain penalties are associated with
the breaking of particular rules. If a particular number or type of penalty occurs, then
during the iterative process of creating a peace, certain branches of rules are either
enhanced or reduced.
One of the key features that distinguish humans from most other animals is the
fact that we are naturally musical. Music generation is a combination of the expression
of emotion and intellect, combined with the ability to recognize patterns and imagine
them modified by actions. Studying the way the brain reacts to incongruities provides
evidence to hypothesis that humans are “programmed” to be naturally musical. Using
techniques such as PET (Positron Emission Tomography) and ERP (Event-Related
Potential), scientist are able to view a thinking brain, that is the blood flow and the
electrical impulses respectively. While subjects listen to sound/music there are general
“negative” reactions in the brain associated with the inconsistencies. [These “negative”
reactions include increased electrical activity.] Similar reactions occur while listening to
speech, for instance, if you hear the sentence “a musician composes the music,” the
electrical activity of your brain would tend to run relatively steady. But if you hear the
sentence “a musician composes the dog,” the activity of your brain will display
significant negative electrical responses immediately after the word “dog.” This gives
rise to another theory that music cannot be defined solely by a grammar.
Understanding the behavior of the brain is not identical to the understanding of
intelligence. Yet, understanding the functions of the brain are not necessary to develop
“intelligent” systems. In general the methodology of AI research is largely based upon
logics, mathematical models simulating intelligent behavior. But, it seems that the words
artificial and intelligence are a contradiction of terms. When a machine simulates a
seemingly intelligent behavior such as playing chess or diagnosing a disease, we tend to
cease to consider these activities as intelligent. It seems that intelligence, by some, may
only be viewed as an unknown aspect of the human mind.
Music is considered to be one of the most intriguing activities of human
intelligence. By trying to model the way humans create music we get closer to
understanding the inner mysteries of the human mind. Ultimately, it would be ideal to
model a musician; and a skilled musician should be able to perform “specialized tasks
such as composition, analysis, improvisation, playing instruments,” etc., but also less
specialized ones, such as reading a concert review and talking to other musicians. Yet to
model these less specialized tasks would require a machine to understand the basics of
human social issues, including sorrow and joy. This type of modeling is currently
ungraspable by current systems, yet specific and independent tasks have already been
developed to model musicians.
One of the most popular and controversial ideas regarding AI in relation to speech
is formal grammars. Developed by Noam Chomsky in the 1950’s, formal grammars are
mathematical formalizations that describe a language. “The study of the relationship
between spoken language and music is as old as the music of the Western culture.”
Therefore it is not a coincidence that Music and AI researcher has been strongly
influenced by linguistics, and the study of formal grammars. Only a few years ago a
computer system called CAMUS, developed a piece for a chamber orchestra called Entre
l’Absurde et le Mystère. The grammar of CAMUS was bases upon computer simulations
of biological behavior using a class of mathematical formalisms called cellular automata,
to create sequences of music structures (e.g., melodies, chords, etc.). The public listening
to the composed piece even questioned whether it could have even been made by a
computer. Figure 1 and 2 are simplified representations of formal grammars in language
and music respectively.
Figure 1:
Figure 2:
SIM 1 = SEQ 1 + SEQ 2
SIM = the notion of simultaneity
SEQ = the notion of sequence
I = the notion of interval (ie. I5 = perfect 5th)
D = the notion of direction of the interval (ie. D1 = upward one interval)
Formal grammars are fitting for the description of syntactical rules, but they do
not guarantee meaningful formations. Without semantics the grammar may develop a
piece, which is perceived negatively by a human audience, as seen in our example “a
musician composes the dog.” In AI jargon semantics are referred to as declarative
knowledge, and is a crucial aspect of AI research. A rule-based system is one of the
schemes used to dictate the semantics of a language.
One simple form of artificial intelligence, as previously suggested, is the rulebased system, also referred to as expert systems. Before detailing rule-bases systems, it
is good emphasis that not everyone considers this to be an intelligent system because it
doesn’t actively learn. A rule-based system is a way of encoding human expertise of a
specific area into an automated system. This is beneficial in two ways; first it allows a
wide range of people to reference knowledge known only by a few people. Secondly, it
allows knowledge to be maintained, so the knowledge is not lost to time. Generalizing,
rule based systems are just a bunch of “IF” and “ELSE” a statement; if particular
instances are satisfied, then some action is carried out. However, rule-based systems are
not procedural, in that there is not a clear order of execution. Rules within the system
should be differentiated and then executed simultaneously with other rules (like threads,
though they are not implemented as threads). This is because there maybe conditions that
satisfy multiple cases (of IF statements). If this is true, then the actions corresponding to
satisfied cases need to be carried out and updated at random using the Rete algorithm.
This multi-threaded concept is also used because it helps non-technical people easily
maintain the “expert’s” knowledge. These expert systems could be used to solve
semantics relating to language or music. Take the example above “a musician composes
the dog;” an expert system in theory would “know” that musicians don’t compose dogs.
However, this might be too restrictive, maybe this is truly what was meant to be said.
Fuzzy logic is similar to expert systems, using control statements such as IF.
However, fuzzy logic uses non-traditional methods. Instead of saying, if the temperature
of the water is 30 degrees, or if the temperature is less than 30 degrees, in fuzzy logic
terms we would say if the water is “cold.” The distinction here is that fuzzy logic uses
imprecise values. These values may not be linear either, a water temperature of 90 and
100 degrees may be considered warm, but water at 110 may be considered extremely hot.
Fuzzy logic by definition is vague, and thusly can be implemented in a variety of ways.
One can even think of the bell curve as it relates to grading (in large universities) as a
type of fuzzy logic system, a “small” group of students get A’s and F’s, “some” get B’s
and D’s, and a “large” portion get C’s as grades. Further, many fuzzy systems are
integrated into expert systems which are used in many machines, such as washers, dryers,
and transmissions.
Contrary to the systems above, genetic algorithms and neural networks have the
ability to learn and grow. Genetic programming uses a process of artificially-created
natural selection to evolve computer programs. If a programmer wishes to evolve
[generate and modify] music, functions must be created that can transpose musical
elements, generate notes, and stretch or shrink time values. [These are only some of the
needed function to simulate breeding and mutation.] After a “child” piece is created it
undergoes a “fitness test,” similar to other algorithmic composition systems to discern its
musical validity. If the child survives the “fitness test,” then it can be added to the
population for subsequent “breeding.”
Neural networks use another model from nature, the human mind. The brain is a
large network of connected neurons, which either “fire” or don’t “fire,” during any given
situation. Subsequently these “firing” neurons influence the firing of other neurons.
Neural networks usually called a neural net, consists of input and output layers as well as
hidden layers, which are used to influence other neurons (in attempt to model the brain).
A neural net with two hidden layers might look something like this:
It is important to note that neural nets are not an exact science, like rule-based systems.
Like humans, a neural net may make mistakes. One problem with modeling the human
brain is that it is a massively parallel system, and even computers with hundreds of
processors would not come close to modeling the parallelism of the human mind.
Though the artificial intelligent systems were distinguished above, they are not
mutually exclusive. AI systems can greatly benefit by combining systems together in an
intelligible way.
Sources:
http://www.ee.umd.edu/~blj/algorithmic_composition/algorithmicmodel.html
http://ccrma-www.stanford.edu/~blackrse/algorithm.html
http://hamp.hampshire.edu/~adaF92/algocomp/algocomp95.html
http://students.washington.edu/shrecg/aimusic
http://website.lineone.net/~edandalex/ai-essay.htm
http://www.ramalila.net/Adventures/AI/rule_based_systems.html
http://www.ramalila.net/Adventures/AI/neural_networks.html