Download presentation

Presentation is loading. Please wait.

Published byZachery Jardine Modified about 1 year ago

2
Primer on Analyzing Animal Sounds: Figures and Sample Sounds Jack Bradbury & Sandra Vehrencamp Cornell University

3
Recording Sounds A sound is a propagated disturbance in the ambient pressure of a medium (air, water, etc.) Each region of higher-than ambient pressure is matched by a following region of lower- than average pressure A microphone converts the variations in pressure created by a passing sound wave into electrical signals that mimic the rise and fall of sound pressure at the microphone

4
Describing and Comparing Sounds A plot of pressure versus time is called the waveform of a sound. It is a description of a sound in the time domain. Examples: How can we describe and compare these signals? Pressure Time BellbirdOropendola (Move cursor over waveform to play sound)

5
Simple Waveforms The simplest type of signal one could ever record is a single sine wave that does not change in either amplitude or frequency:

6
Time Domain Measurements There are two measures that could easily be made on this waveform: Amplitude: What are the maximum or average deviations in pressure from ambient levels? Time domain A Peak- peak A RMS average

7
Time Domain Measurements There are two measures that could easily be made on this waveform: Amplitude: Rather than absolute values, one usually compares amplitude to some soft reference sound, as dB = 20 log 10 (A obs /A ref ) Time domain A Peak- peak A RMS average

8
Time Domain Measurements There are two measures that could easily be made on this waveform: Frequency: How many cycles/sec (= Hz) are present? Easiest to compute time between cycles and take reciprocal T Time domain f = 1/T

9
Frequency Domain Measures It is convenient to plot these two measures on their own graph, known as a frequency- domain description of the sound: Amplitude Frequency T Time domainFrequency domain f = 1/T f A Peak- peak

10
Waves That Are Not Sine Waves But how can we describe these waves? In the first example, the frequency is not constant. What should we put in the frequency-domain plot? In the second example, both the shape and amplitude of the successive “waves” change. What can we do with this one? Waveform 1Waveform 2

11
Fourier Analysis There is hope! Any continuous waveform can be broken down into a set of pure sine waves with frequency and amplitude values that can be computed or measured (Fourier analysis). Frequency-domain plots provide us with a very powerful way to describe and compare any set of sounds.

12
Fourier Analysis Applying the Fourier solution, we get: A plot of amplitude versus frequency components is called the frequency spectrum (or power spectrum) of a sound. Amplitude Frequency Waveform 1Waveform 2

13
Fourier Analysis But what do we do if the waveform keeps changing during the signal, like in this lark sparrow song? Pressure Time (Move cursor over waveform to play sound)

14
Fourier Analysis But what do we do if the waveform keeps changing during the signal, like in this lark sparrow song? The solution is to break the song into homogeneous segments and create a frequency spectrum for each segment. Pressure Time

15
Fourier Analysis These are then strung together along the timeline so we can see how the frequency spectra change as the song progresses. Such a plot is called a spectrogram, and we shall come back to how these are generated. Pressure Time

16
Predicting Power Spectra from Waveforms There are three types of deviations from a single sine wave. Most animal signals are some combination of these: Single sine wave Amplitude modulation (AM) Frequency modulation (FM) Periodic nonsinusoidal signals

17
Predicting Power Spectra from Waveforms If we can predict the frequency spectrum for each type of deviation, we can predict the spectrum for nearly any signal. Single sine wave Amplitude modulation (AM) Frequency modulation (FM) Periodic nonsinusoidal signals

18
Analysis of Typical Waveforms Sinusoidal amplitude modulation (AM): Amplitude Frequency Time DomainFrequency domain

19
Analysis of Typical Waveforms Sinusoidal amplitude modulation (AM) Two time-domain measures are possible: (1) Carrier frequency ( f ) Amplitude Frequency Time domainFrequency domain T f = 1/T Carrier

20
Analysis of Typical Waveforms Sinusoidal Amplitude Modulation (AM) Two time domain measures are possible: (1) Carrier frequency ( f ), and (2) Modulation rate (w), the number of complete modulation cycles per second Amplitude Frequency Time domainFrequency domain T f = 1/T t w = 1/t Carrier Modulating frequency

21
Analysis of Typical Waveforms Sinusoidal amplitude modulation (AM) Frequency spectrum is 3 lines: carrier f and two side bands at f – w and f + w. Amplitude Frequency Time domainFrequency domain f T f = 1/T t w = 1/t f–w f+w Carrier Modulating frequency

22
Analysis of Typical Waveforms Sinusoidal amplitude modulation (AM) Frequency spectrum is 3 lines: carrier f and two side bands at f – w and f + w. The greater the amplitude of w, the higher the sidebands, but these never exceed f amplitude Amplitude Frequency Time domainFrequency domain f T f = 1/T t w = 1/t f–w f+w Carrier Modulating frequency Amplitude of w

23
Predicting Power Spectra from Waveforms If we can predict the frequency spectrum for each type of deviation, we can predict the spectrum for nearly any signal. Single sine wave Amplitude modulation (AM) Frequency modulation (FM) Periodic nonsinusoidal signals

24
Analysis of Typical Waveforms Sinusoidal frequency modulation (FM) Suppose we keep amplitude fixed, but modulate the frequency of a sine wave sinusoidally, e.g.: Amplitude Time domainFrequency domain Frequency Time

25
Analysis of Typical Waveforms Sinusoidal Frequency Modulation (FM) What can we measure in the time domain? Amplitude Time domainFrequency domain Frequency Time T1T1 f max = 1/T 1

26
Analysis of Typical Waveforms Sinusoidal frequency modulation (FM) What can we measure in the time domain? Amplitude Time domainFrequency domain Frequency Time T2T2 T1T1 f max = 1/T 1 f min = 1/T 2

27
Analysis of Typical Waveforms Sinusoidal frequency modulation (FM) What can we measure in the time domain? Amplitude Time domainFrequency domain Frequency Time T2T2 T1T1 f max = 1/T 1 f min = 1/T 2 Carrier ( f ) = (f max + f min ) / 2

28
Analysis of Typical Waveforms Sinusoidal frequency modulation (FM) What can we measure in the time domain? Amplitude Time domainFrequency domain Modulating frequency, w Frequency Time T2T2 T1T1 f max = 1/T 1 f min = 1/T 2 t w = 1/t Carrier ( f ) = (f max + f min ) / 2

29
Analysis of Typical Waveforms Sinusoidal frequency modulation (FM) What can we measure in the time domain? Amplitude Time domainFrequency domain Modulating frequency, w Frequency Time T2T2 T1T1 f max = 1/T 1 f min = 1/T 2 t w = 1/t Modulation index = (f max – f min ) / w Carrier ( f ) = (f max + f min ) / 2

30
Analysis of Typical Waveforms Sinusoidal frequency modulation (FM) The frequency spectrum for a sinusoidally FM waveform has a line at the carrier and sidebands for each f ± nw around the carrier (n max = ∞), where n is a positive integer (1, 2, 3, etc.). Amplitude Time domainFrequency domain f f–wf+w T2T2 T1T1 t w = 1/t f–2w f–3w f+2w f+3w

31
Analysis of Typical Waveforms Sinusoidal frequency modulation (FM) The frequency spectrum for a sinusoidally FM waveform has a line at the carrier and sidebands for each f±nw around the carrier (n max = ∞) If the modulation index <10, then the carrier has the highest amplitude and sideband amplitudes decrease with n Amplitude Time domainFrequency domain f f–wf+w T2T2 T1T1 t w = 1/t f–2w f–3w f+2w f+3w

32
Analysis of Typical Waveforms Sinusoidal frequency modulation (FM) If the modulation index >20, then the sidebands and the carrier have the same frequency values as before, but the carrier can have a lower amplitude than the sidebands Amplitude Time domainFrequency domain f f–wf–wf+w f–2w f–3w f+2w f+3w T2T2 T1T1 t w = 1/t

33
Predicting Power Spectra from Waveforms If we can predict the frequency spectrum for each type of deviation, we can predict the spectrum for nearly any signal. Single sine wave Amplitude modulation (AM) Frequency modulation (FM) Periodic nonsinusoidal signals

34
Analysis of Typical Waveforms Periodic nonsinusoidal waveforms Any shape of waveform is allowed under this category as long as there is a clearly repeating unit. For example: Amplitude Time domainFrequency domain

35
Analysis of Typical Waveforms Periodic nonsinusoidal waveforms The major measurement we can make on this waveform in the time domain is the period of the repeats (t), and thus the repeat rate, w. Amplitude Time domainFrequency domain t w = 1/t

36
Analysis of Typical Waveforms Periodic nonsinusoidal waveforms The frequency spectrum of a periodic waveform contains components at w, 2w, 3w, etc., to infinity. When spectrum components are integer multiples of some frequency w, we call the set a harmonic series. The fundamental is w and 2w is the second harmonic, etc. Amplitude Time domainFrequency domain 2w2w w 3w3w 5w5w 4w4w 6w6w 7w7w t w = 1/t

37
Analysis of Typical Waveforms Periodic nonsinusoidal waveforms The amplitude of successively higher harmonics tends to decrease in an exponential manner (Dirichlet’s Rule)… Amplitude Time domainFrequency domain 2w2w w 3w3w 5w5w 4w4w 6w6w 7w7w t w = 1/t

38
Analysis of Typical Waveforms Periodic nonsinusoidal waveforms The amplitude of successively higher harmonics tends to decrease in an exponential manner (Dirichlet’s Rule)… unless the wave is half-wave symmetric. To determine this… Amplitude Time domainFrequency domain 2w2w w 3w3w 5w5w 4w4w 6w6w 7w7w t w = 1/t

39
Analysis of Typical Waveforms Periodic nonsinusoidal waveforms To determine if the wave is half-wave symmetric, divide a complete cycle of a periodic waveform in half…. Amplitude Time domainFrequency domain 2w2w w 3w3w 5w5w 4w4w 6w6w 7w7w

40
Analysis of Typical Waveforms Periodic nonsinusoidal waveforms Divide a complete cycle of a periodic waveform in half. Then reflect the right half upside down. If the two halves are different, the waveform is half-wave asymmetric and the spectrum shows all harmonics. Amplitude Time domainFrequency domain 2w2w w 3w3w 5w5w 4w4w 6w6w 7w7w

41
Analysis of Typical Waveforms Periodic nonsinusoidal waveforms Now try this on a different periodic waveform. Measure t and compute w. Again, isolate one complete cycle and divide it in half on the time axis: Amplitude Time domainFrequency domain t w = 1/t

42
Analysis of Typical Waveforms Periodic nonsinusoidal waveforms Now flip the right half upside down. If the two halves are the same, the waveform is half-wave symmetric and the amplitudes of all even harmonics are zero. Only odd harmonics are present to follow Dirichlet’s Rule. Amplitude Time domainFrequency domain w 3w3w 5w5w 7w7w t w = 1/t

43
Analysis of Typical Waveforms Periodic nonsinusoidal waveforms Another deviation from Dirichlet’s Rule occurs if there are “multiple maxima” in the waveform. Take the following example: Amplitude Time domainFrequency domain

44
Analysis of Typical Waveforms Periodic nonsinusoidal waveforms We can measure the usual period between repeats of the periodic waveform, t, and use it to predict the fundamental of the harmonic series that will occur in the frequency spectrum: Amplitude Time domainFrequency domain t w = 1/t

45
Analysis of Typical Waveforms Periodic nonsinusoidal waveforms But we can also measure the interval between multiple maxima, , and use it to compute a frequency z. Because w. Amplitude Time domainFrequency domain t w = 1/t z = 1/

46
Analysis of Typical Waveforms Periodic nonsinusoidal waveforms This leads to the following harmonic series, based on the fundamental w. Whenever a harmonic of w is close to an integer multiple of z, it has lower amplitude than intermediate harmonics. Amplitude Time domain Frequency domain 15ww10w5w5w t w = 1/t z = 1/ ≈ z≈ 2z≈ 3z

47
Analysis of Typical Waveforms Periodic nonsinusoidal waveforms The result is bands of harmonics that have higher amplitudes (lobes) and intervening harmonics with low amplitudes (nodes). Note that harmonics still gradually decrease following Dirichlet’s Rule. Amplitude Time domain Frequency domain 15ww10w5w5w t w = 1/t z = 1/ ≈ z≈ 2z≈ 3z Lobes Nodes

48
Analysis of Typical Waveforms Compound waveforms While a few birds can emit pure sine waves, most animal sounds are some combination of AM, FM, and/or nonsinusoidal periodic signals. We call these compound waveforms. Compound waveforms can always be decomposed into a set of carrier sine waves and a set of modulating sine waves. We can then use the simple rules of AM and FM to add the appropriate sidebands for each modulating sine wave around each carrier sine wave. This is the spectrum of the compound wave.

49
Analysis of Typical Waveforms Compound waveforms Consider the following example of a frog call: This appears to be a pure sine wave that has been amplitude-modulated with a repeating waveform that is not sinusoidal Time domain

50
Analysis of Typical Waveforms Compound waveforms Continuing with the frog call… The first thing to do is characterize the carrier. We see that it is a pure sine wave. So, we measure the period of the sine waves inside the pulses and use the resulting T to compute the sine wave carrier frequency f = 1/T. Time domain T

51
Analysis of Typical Waveforms Compound waveforms Continuing with the frog call… The next step is to characterize the modulating waveform. This repeats every t seconds giving a repetition rate of w = 1/t. The frequency spectrum of the modulating waveform will be a harmonic series with a fundamental of w. Time domain t

52
Analysis of Typical Waveforms Compound waveforms Continuing with the frog call… We draw the envelope of the waveform to see the shape of the modulating waveform. This is not half-wave symmetric. The modulating spectrum will show all harmonics. Time domain

53
Analysis of Typical Waveforms Compound waveforms Continuing with the frog call… Also, there is only one maximum in each repeat of the modulating waveform. So, there will be no lobes or nodes in its spectrum. Time domain

54
Analysis of Typical Waveforms Compound waveforms Putting these results together, we have two frequency spectra to deal with: Amplitude Frequency domain f Amplitude w, 2w, 3w… CarrierModulating waveform

55
Analysis of Typical Waveforms Compound waveforms Since the modulating waveform now consists of a series of pure sine waves, we can use the AM rules to modulate the carrier f with each of them in turn. Amplitude Frequency domain f Amplitude w, 2w, 3w… CarrierModulating waveform

56
Analysis of Typical Waveforms Compound waveforms Since the modulating waveform now consists of a series of pure sine waves, we can use the AM rules to modulate the carrier f with each of them in turn, first using the fundamental of the modulating waveform, w: Amplitude Frequency domain f Amplitude w, 2w, 3w… CarrierModulating waveform f + w f–wf–w

57
Analysis of Typical Waveforms Compound waveforms Next, sinusoidally amplitude-modulate the carrier with the second harmonic, 2w. Note that because this component has less amplitude than w in the modulating waveform spectrum, it also has lower amplitude as sidebands. Amplitude Frequency domain f Amplitude w, 2w, 3w…w, 2w, 3w… CarrierModulating waveform f +w f–w f–2w f +2w

58
Analysis of Typical Waveforms Compound waveforms We continue until we have sinusoidally amplitude-modulated f with every harmonic in the series constituting the modulating waveform spectrum: Amplitude Frequency domain f Amplitude w, 2w, 3w… CarrierModulating waveform f +wf–wf–w f –2w f +2w

59
Analysis of Typical Waveforms Compound waveforms Nearly all animal sounds are compound waveforms. Any combination is possible: CarrierModulation Modulating waveform Result FM AM FM

60
The Uncertainty Principle Any Fourier analyzer needs several cycles of a signal to compute component frequencies. The more cycles of a stable frequency component that an analyzer can measure, the more accurate the measurement of that frequency.

61
Medium duration sample The Uncertainty Principle If the analyzer has only a short time to estimate frequencies, each component will appear as a wide band in the frequency spectrum; if a longer time is available, frequency components will be narrow bands. Example: sinusoidal AM signal: Amplitude Frequency Long duration sample Amplitude Frequency Amplitude Frequency Short duration sample

62
Medium duration sample The Uncertainty Principle The bandwidth, f, of an analyzer is the minimum difference in two adjacent frequencies that can be distinguished. Clearly, short duration samples result in large f values, and long duration samples result in small f values. Amplitude Frequency Long duration sample Amplitude Frequency Amplitude Frequency Short duration sample

63
If we let t be the duration of the shortest sampling time available to a Fourier analyzer, the Uncertainty Principle for sound analysis states that: f· t ≈ 1 Medium t, medium f The Uncertainty Principle Amplitude Frequency Long t, small f Amplitude Frequency Amplitude Frequency Small t, large f

64
Making Spectrograms We noted earlier that a spectrogram is created by dividing a sound into segments, computing the frequency spectrum for each segment, and then stringing the segments together along the time axis.

65
Making Spectrograms Thus, we might take the lark sparrow song that we saw earlier… Pressure Time (Move cursor over waveform to play sound)

66
Making Spectrograms Divide it into separate time segments of duration t… tt Pressure Time

67
Making Spectrograms Compute the frequency spectrum for each segment. Align these along the time axis (imagine the peaks sticking out of the plane of the graphs). tt Frequency Time

68
Making Spectrograms Then, use black to mark those portions of the overall graph that have higher peaks, use white to mark the lower amplitude components, and use grey for intermediate portions. tt Frequency Time

69
Making Spectrograms Then, use black to mark those portions of the overall graph that have higher peaks, use white to mark the lower amplitude components, and use grey for intermediate portions. tt Frequency Time

70
Making Spectrograms The result is a spectrogram with frequency on the vertical axis, time on the horizontal axis, and amplitude of a frequency component at a given time indicated by darkness on the plot. tt Frequency Time

71
Spectrograms and Bandwidth The spectrogram we just made uses a pretty large t. This gives us very fine frequency resolution ( f = 5 Hz), but much of the temporal resolution has been lost. Can we get by with a smaller t? Frequency Time

72
Spectrograms and Bandwidth Let’s decrease t by 4×. This will give us a f = 20 Hz). This starts to restore some of the temporal pattern, and the frequency bands are still pretty thin. Frequency Time

73
Spectrograms and Bandwidth Let’s decrease t by 4× again. This will give us a f = 80 Hz. We get much better temporal pattern and even some better frequency pattern because FM signals show as FM, not their components! Frequency Ti × me

74
Spectrograms and Bandwidth Let’s decrease t by 4× once more. This will give us a f = 320 Hz. This is similar to the prior bandwidth, but we can see the temporal pattern in the last notes better. Frequency Time

75
Spectrograms and Bandwidth Let’s decrease t by 4× again. This will give us a f = 1280 Hz. Now, large bands start to appear instead of fine lines, although the temporal pattern is retained. Frequency Time

76
Spectrograms and Bandwidth Let’s decrease t by 4× yet again. This will give us a f = 5120 Hz. We have now lost any decent frequency resolution, but the temporal pattern is retained. Frequency Time

77
Spectrograms and Bandwidth Clearly, an intermediate bandwidth, f, provides the optimal balance of frequency resolution and temporal resolution. Frequency Time

78
Spectrograms and Bandwidth In general, you want a bandwidth: small enough to separate harmonics clearly; big enough to show FM undecomposed; and big enough to show AM undecomposed. Frequency Time

79
Digital Sound Analysis Computers and DAT recorders sample (digitize) the continuous rise and fall of sound amplitudes at some fixed rate and store a long column (vector) of amplitude values. Music CDs sample at 44.1 kHz.

80
Digital Sound Analysis At each sample point, the computer also digitizes the amplitude value into one of N equidistant categories. The number of categories depends on how many “bits” are used to store each value. N = 2 number of bits Music CDs store 16 bits/sample and thus divide the full amplitude range into 2 16 = 65,536 possible values.

81
Digital Sound Analysis The higher the sampling rate and the higher the bit depth, the more accurately the digital recording captures the original sound. However, increasing sampling rate or bit depth or both increases the size of the digital file that must be stored. In stereo recording, two columns of numbers must be stored, taking up even more memory.

82
Digital Sound Analysis Nyquist frequency: A digital recorder or computer must be able to take at least 2 samples/cycle to be able to identify each frequency. Thus, if you digitize your sounds at R samples/sec, you will be unable to properly capture any component with frequency >R/2. This latter value is called the Nyquist frequency.

83
Digital Sound Analysis Aliasing: If you do not sample your sounds at a high enough rate, any frequency in the sounds that is higher than half the sampling rate is aliased. This means you will see an artifact in your spectrograms consisting of an inverted version of what the sounds should have looked like if you had sampled at a sufficiently high rate. Not nice!

84
Digital Sound Analysis Digital Bandwidths: In most computer sound analysis programs, you do not set the bandwidth f directly, but instead set the segment duration, t. Instead of setting a time, you indicate t by specifying the number of consecutive sample points to be used for each frequency spectrum in the spectrogram. This is often called “frame size.”

85
Digital Sound Analysis Windowing: If you cut a sound directly into segments (a rectangular window) to make a spectrogram, you introduce artifacts at the beginning and end of each segment. This occurs because, with rectangular windows, each segment begins with no sound and is suddenly switched “on” and suddenly “off.” The frequency spectrum of sudden onsets and offsets must contain a wide smear of frequencies.

86
Digital Sound Analysis Windowing: To reduce artifacts, most analyzers use “tapered” cutting windows (Hann, Blackman, etc.) that turn the segment off and on slowly. Lark Sparrow f = 320 Hz Rectangular window Lark Sparrow f = 320 Hz Blackman window

Similar presentations

© 2017 SlidePlayer.com Inc.

All rights reserved.

Ads by Google