The purpose of this experiment was to observe the frequency content of sound waves from musical
instruments and to attempt to discern distinguishing characteristics in the waves from different
instruments. The experiment was conducted on a violin, a saxophone, and a trumpet all playing the
same musical note. The frequency spectra were observed using Matlab and several unique features
were observed that may or may not be related to the instrument.
Background
The dots on a musician's page represent musical notes lettered A through G, which are associated
with particular frequencies. For example the note A4, one of the prominent notes played in a phone
dial tone, is associated with vibrations at 440 Hz. The 4 after the A indicates this note is in the
fourth octave. The octaves are measured from 16.35 Hz, which is the lowest note audible to the
average human and corresponds to C0, and increment by doubling. Therefore, C1 occurs at 32.7 Hz, C2
is at 65.4 Hz, and so on (MTU). In between octaves, the notes scale logarithmically. Combinations of
notes that sound pleasant result from overlapping intensity peaks and a known as chords (Elert). A
musician reads these notes from their music sheets as dots in different positions on a ledger bar.
An example is shown in Figure 1. A correspondence of notes to their respective frequencies is
included in Appendix B.
Figure 1: Musical Notes on a Ledger Bar
Although each note is associated with a particular frequency, a real instrument produces polytonal
sounds, which means several frequencies are present. These occur in multiples of the fundamental
frequency, or the frequency of the note played. These multiples are called harmonics. The fundamental
frequency will be the one which the other major frequencies are multiples of, and the relative
intensity of the other signals contributes to the unique sound that each instrument has. It is
possible to observe these frequencies as peaks on a frequency versus amplitude graph (Elert).
Experimental Method
The experiment was conducted using equipment available in the student computer labs in the
University of Portland engineering building. Several students who owned musical instruments
volunteered to provide sound samples. The samples were taken from a violin, trumpet, and saxophone,
and were recorded using a standard PC microphone readily available from retail stores. The microphone
plugs into a jack on the computer's sound card. The musician was asked to play a sustained concert
B-flat note. Due to traditional naming of notes, this is equivalent to a C in the standard scales.
While they were playing, the sample recording was started, run for five seconds, and stopped. In this
way, the beginning and end of the note was cut off to avoid recording any potentially unwanted effects
related to starting or stopping the vibrations in the instrument.
The sound data was recorded using the Matlab function "wavrecord." The sampling rate was set at
44100 Hz, so the Nyquist frequency was 22050 Hz. This corresponds to the approximate upper limit of
the human hearing range. Matlab was then used to create an amplitude versus time graph with the
standard plot function. This could be observed at different resolutions using the zoom tool in the
Matlab plot window. To observe the actual spectrum, the power spectrum density (psd) function was
used to create another plot of averaged datapoints. The peaks were determined by zooming in on the
graph so each peak could be accurately read against the frequency scale. This plot was improperly
scaled due to the way the function works in Matlab. It ran from 0 to 1 instead of 0 to 25000, so the
observed value was multiplied by 25000 to get the frequency.
Introduction
The purpose of this experiment was to observe the frequency content of sound waves from musical instruments and to attempt to discern distinguishing characteristics in the waves from different instruments. The experiment was conducted on a violin, a saxophone, and a trumpet all playing the same musical note. The frequency spectra were observed using Matlab and several unique features were observed that may or may not be related to the instrument.
Background
The dots on a musician's page represent musical notes lettered A through G, which are associated with particular frequencies. For example the note A4, one of the prominent notes played in a phone dial tone, is associated with vibrations at 440 Hz. The 4 after the A indicates this note is in the fourth octave. The octaves are measured from 16.35 Hz, which is the lowest note audible to the average human and corresponds to C0, and increment by doubling. Therefore, C1 occurs at 32.7 Hz, C2 is at 65.4 Hz, and so on (MTU). In between octaves, the notes scale logarithmically. Combinations of notes that sound pleasant result from overlapping intensity peaks and a known as chords (Elert). A musician reads these notes from their music sheets as dots in different positions on a ledger bar. An example is shown in Figure 1. A correspondence of notes to their respective frequencies is included in Appendix B.
Figure 1: Musical Notes on a Ledger Bar
Although each note is associated with a particular frequency, a real instrument produces polytonal sounds, which means several frequencies are present. These occur in multiples of the fundamental frequency, or the frequency of the note played. These multiples are called harmonics. The fundamental frequency will be the one which the other major frequencies are multiples of, and the relative intensity of the other signals contributes to the unique sound that each instrument has. It is possible to observe these frequencies as peaks on a frequency versus amplitude graph (Elert).
Experimental Method
The experiment was conducted using equipment available in the student computer labs in the University of Portland engineering building. Several students who owned musical instruments volunteered to provide sound samples. The samples were taken from a violin, trumpet, and saxophone, and were recorded using a standard PC microphone readily available from retail stores. The microphone plugs into a jack on the computer's sound card. The musician was asked to play a sustained concert B-flat note. Due to traditional naming of notes, this is equivalent to a C in the standard scales. While they were playing, the sample recording was started, run for five seconds, and stopped. In this way, the beginning and end of the note was cut off to avoid recording any potentially unwanted effects related to starting or stopping the vibrations in the instrument.
The sound data was recorded using the Matlab function "wavrecord." The sampling rate was set at 44100 Hz, so the Nyquist frequency was 22050 Hz. This corresponds to the approximate upper limit of the human hearing range. Matlab was then used to create an amplitude versus time graph with the standard plot function. This could be observed at different resolutions using the zoom tool in the Matlab plot window. To observe the actual spectrum, the power spectrum density (psd) function was used to create another plot of averaged datapoints. The peaks were determined by zooming in on the graph so each peak could be accurately read against the frequency scale. This plot was improperly scaled due to the way the function works in Matlab. It ran from 0 to 1 instead of 0 to 25000, so the observed value was multiplied by 25000 to get the frequency.
Page 2: Results, Discussion, & Conclusion »