• Embed Doc
  • Readcast
  • Collections
  • CommentGo Back
Download
 
Mathematics of Musical Rhythm
Bobby Kelly
May 14, 2002
Abstract
In this paper, we analyze the rhythmic structures of several pieces of music. We usetwo different types of data reduction to reduce the signals, eliminating higher frequencyinformation. Using algorithms written for MATLAB by Sethares and Staley, we identifydominant frequencies and periodicities using the capabilities of the Discrete FourierTransform and the Periodicity Transform. While both the DFT and PT have certaindifficulties, we conclude that each transform provides us with important information.We also touch on other applications of the analysis of rhythm.
1 Introduction
Even to the untrained eye (or ear), it is quite apparent that mathematics is at play in music.As one delves deeper, one realizes that not only is math involved in music, but that thereis an inextricable connection between the world of mathematics and every single elementof music—whether it be in the theory of sound waves, the physics of instruments or thestructure of musical rhythm.
1.1 The Wave Equation
As a spring-board for this discussion, we will begin with what is arguably the most basicelement of music: pitch. Let us, for the sake of example, consider a stringed instrument.When a violinist plucks the string of the instrument, the string is set in motion. Let
u
(
x,t
)be the function that represents the displacement of the violin string at a position
x
and atime
t
. Since both ends of a violin string are anchored, for a string of length
L
,
u
(0
,t
) = 0and
u
(
L,t
) = 0. These are called the boundary conditions.
Faculty Advisor: Dr. Rachel Hall
1
 
The motion of the string is governed by the one-dimensional wave equation which statesthat the second derivative of displacement with respect to position is proportional to thesecond derivative of displacement with respect to time. That is,
a
2
u
xx
=
u
tt
where
a
is a constant that depends on tension and the composition of the string. Althoughthe physical principles that govern the behavior of wind instruments are different, it isworth noting that the one-dimensional wave equation is also at work—this is why wind andstringed instruments produce similar sounds.Through the process of separation of variables (which can be found in any standard textbook—try [1]), we can show that solutions to the wave equation are linear combinations of solutionsof the form:
u
(
x,t
) = sin(
mπx/L
)[
a
m
cos(
amπt/L
) +
b
m
sin(
amπt/L
)]where
m
= 1
,
2
,
3
,...
and
a
m
and
b
m
are constants. That is,
u
(
x,t
) can be written as alinear combination of sines and cosines. If we fix
x
at a value
x
0
, we get a function of 
t
that predicts how the string moves at a particular position. The resulting function showsus that the movement of the string is periodic:
u
(
x
0
,t
) =
c
m
cos(
amπt/L
) +
d
m
sin(
amπt/L,
) (1)and hence the resulting sound wave is periodic. The human ear perceives periodic soundwaves of frequency 20-20,000 Hz (cycles per second) as pitched sound.
1.2 Musical Rhythm
Our project involves the study of periodic rhythms in music. The main difference betweenpitch and rhythm is a difference in scale—pitches are typically measured in hundreds orthousands of cycles per second, while rhythms are measured in hundreds of cycles
per minute! 
However, both pitch and rhythm are periodic phenomena and so we can borrowsome of the traditional methods used to study pitch. As we will see later, with the help of heavy-duty data reduction, these methods will prove rather useful.
1.3 Discrete vs. Continuous
Here is a good point at which to stop and make an important distinction. The type of soundthat we will be analyzing here is sound taken from a CD, that is, a digital recording. Inother words, we will be studying discrete signals (and therefore discrete functions). Were weto analyze LP records, we would need to deal with continuous functions. Digital recordingsconsist of a certain amount of discrete samples taken, as opposed to LP records, which2
 
consist of one continuous track of sound. The more samples that are taken per second whena CD is recorded, the more accurately the discrete function will resemble the continuousfunction. In general, we will assume that the sampling is sufficiently frequent that we don’tlose much information by using the discrete approximation. It is also worth noting thatmany of the techniques developed in this article (such as DFT analysis) have an analog inthe continuous world.
2 A Closer Look at Periodic Functions
In this section, we will develop some general theory of discrete, periodic functions neededin our musical analysis.
2.1 An Inner Product Space
Let’s investigate discrete periodic functions of a fixed period
. Any discrete periodicfunction is of the form
[
n
] where
n
Z
and
[
n
+
] =
[
n
] for some integer
, which isreferred to as the period of 
. We claim that, for a fixed period
, the set of all
-periodicdiscrete functions forms an inner product space with the inner product defined as:
f,g
= (1
/
)
1
n
=0
[
n
]
g
[
n
]
,
where
g
[
n
] indicates the complex conjugate of 
g
[
n
].The reader is invited to verify that this is indeed an inner product. For a minute, let’sentertain ourselves by looking at a seemingly unrelated set,
, where
=
{
e
2
πikn/N 
|
k
= 0
,...,N 
1
}
.
First notice that the elements of 
are
-periodic. In addition,
is orthonormal. To seethis, take two arbitrary elements of 
,
e
2
πikn/N 
and
e
2
πiln/N 
. For
k
=
l
,
e
2
πikn/N 
,e
2
πiln/N 
=1
1
n
=0
e
2
πikn/N 
e
2
πiln/N 
=1
1
n
=0
e
2
πi
(
k
l
)
n/N 
=1
1
n
=0
ω
n
(where
ω
n
=
e
2
πi
(
k
l
)
/N 
)=1
(1 +
ω
+
ω
2
+
...
+
ω
1
)
.
Notice that (1+
ω
+
ω
2
+
...
+
ω
1
) = (
ω
1)
/
(
ω
1) (one can verify this by long division).Therefore,
e
2
πikn/N 
,e
2
πikl/N 
= (1
/N 
)(
ω
1)
/
(
ω
1) = (1
/N 
)(
e
2
πi
(
k
l
)
1)
/
(
ω
1) = 03
of 00

Leave a Comment

You must be to leave a comment.
Submit
Characters: ...
You must be to leave a comment.
Submit
Characters: ...