Information Technology Reference
In-Depth Information
process with some idealized rules, and thus turning the beauty and harmony of music
into a solution for various optimization problems.
2 Harmony Search as a Metaheuristic Method
Before we introduce the fundamentals of the HS algorithm, let us first briefly describe
the way to describe the aesthetic quality of music. Then, we will discuss the pseudo
code of the HS algorithm and two simple examples to demonstrate how it works.
2.1 Aesthetic Quality of Music
The aesthetic quality of a musical instrument is essentially determined by its pitch (or
frequency), timbre (or sound quality), and amplitude (or loudness). Timbre is largely
determined by the harmonic content that is in turn determined by the waveforms or
modulations of the sound signal. However, the harmonics that it can generate will
largely depend on the pitch or frequency range of the particular instrument.
Different notes have different frequencies. For example, the note A above middle
C (or standard concert A4) has a fundamental frequency of f 0 =440 Hz. As the speed
of sound in dry air is about v =331+0.6 T m/s (where T is the temperature in degrees
Celsius), the A4 note has a wavelength
λ
=
ν
/f 0
0.7795 m at room temperature T=20
. When we adjust the pitch, we are in fact trying to change the frequency. In music
theory, pitch p n in MIDI is often represented as a numerical scale (a linear pitch
space) using the following formula
f
p n
=
69
+
12
log
(
),
(1)
2
440
Hz
or
(
p
69
)
/
12
f
=
440
×
2
,
(2)
n
which means that the A4 notes has a pitch number 69. On this scale, octaves corre-
spond to size 12 while semitone corresponds to size 1, which leads to the fact that the
ratio of frequencies of two notes that are an octave apart is 2:1. Thus, the frequency of
a note is doubled (halved) when it raised (lowered) an octave. For example, A2 has a
frequency of 110Hz while A5 has a frequency of 880Hz.
The measurement of harmony where different pitches occur simultaneously, like
any aesthetic quality, is subjective to some extent. However, it is possible to use some
standard estimation for harmony. The frequency ratio, pioneered by ancient Greek
mathematician Pythagoras, is a good way for such estimation. For example, the oc-
tave with a ratio of 1:2 sounds pleasant when playing together, so are the notes with a
ratio of 2:3. However, it is unlikely for any random notes played by a monkey to pro-
duce a pleasant harmony.
2.2 Harmony Search
In order to explain the Harmony Search in more detail, let us first idealize the improvi-
sation process by a skilled musician. When a musician is improvising, he or she has
three possible choices: (1) playing any famous tune exactly from his or her memory; (2)
playing something similar to the aforementioned tune (thus adjusting the pitch slightly);
or (3) composing new or random notes. Geem et al. formalized these three options into
Search WWH ::




Custom Search