Baseball is possessed of a rich and diverse collection of sounds. The shouting of the fans, their intermittent applause and jeers, and the crackling of the PA system all contribute to the cornucopia. Even limiting ourselves to the action on the field, baseball is aurally pleasing: the pulse of the ball pushing the air out of a glove, for instance.
First among all baseball sounds, without question, is the crack of the bat. Something about the whip striking the ball is downright electric. If you are like me, after watching so many thousands of baseball games, that crack still exercises a visceral and jolting effect on my nervous system. It is baseball’s leverage alarm: the contact could result in a routine groundout, or it could be a massive home run, but either way, the stakes just increased and you’d better pay attention to what happens next.
Yet the crack of the bat is itself diverse. Some balls are ripped with great force, and produce a crisp, single note. Others are walloped into the ground, off the bottom of the bat, and generate a dull thud. Some players routinely seem able to contact the ball with the kind of sound that is associated with hits, regardless of whether their screaming line drives find gloves.
I think many a sabermetrically-inclined fan of the game has wondered about measuring those sounds. Not that our ears are a bad guide, but human perception is subjective and can be biased. It would be interesting to know, for example, if your favorite player’s bat really does produce a special sound, or if you can tell the difference between a home run and a groundout based only on the crack.
Collecting sound data itself is not very difficult. To do so, I used my computer to directly record the sound feed from MLB.tv*. When you collect sound data, you can see a direct readout of it that looks like this:
Time is passing on the x-axis, and the y-axis relates the amplitude of the sound that’s being recorded. Loud sounds produce more significant departures from the line at 0, which represents silence.
The first task was to see whether the crack of the bat could be at all distinguished by the computer from the surrounding sounds. That turns out to be trivial, for two reasons.
The first reason is that the sound of the bat is extremely loud relative to the rest of the television feed. The second reason is that the sound is also very short. The combination of these characteristics gives us that crisp, sharp sensation which is so pleasing to the ear (and attention-grabbing).
Having now convinced myself that I could reliably identify the sound of the bat in the audio feed, I wanted to do a more detailed analysis of that sound. I first needed to gather a bunch of bat cracks. To do so, I used the condensed games feature on MLB.tv, which turned out to be ideal for this purpose. The condensed games strip out the announcers’ feed, leaving you with the sound of the game as it happens on the field. I collected several games worth of audio, saving individual audio files for each contact event, and noting the result of that contact in broad terms (fly out, groundout, home run, etc.).
The result of that work was a small sample (5-10) of each event variety. Before I get to the #GoryMath, let’s listen to that most glorious of sports sounds, the bat crack. For each event, I made a composite sound of that event by stacking all of the bat cracks on top of each other to produce a sort of ‘average’ sound. This, for example, is a composite home run, made from eight separate dingers:
When I saw that first screencap I immediately recognized Audacity and thought instantly, "why didn't I think of this?" Makes me appreciate this awesome article even more. I can't wait to see what's next. Outstanding stuff, Robert.
The speed of the pitch will act to increase or decrease the relative velocity of the collision. So assuming the hitter swings at some constant speed, a fastball will produce a more violent collision (with higher peak frequency) than a curve. I'm not sure about the magnitude of that effect, though.
With regards to the the size of the bat, I do not know. Maybe Alan can weigh in on this.
The speed of the pitch plays a very small role in determining the speed of the batted ball (attendees of @saberseminar last weekend might recall my mentioning that in my talk). So I doubt there is much correlation between the frequency spectrum and the pitch speed.
I should point out that there is a bit of controversy regarding the origin of the lower-frequency sound for balls hit off the sweet spot. One theory is the one I told Rob, which has to do with the longer collision time. But another, and the one Adair subscribes to, is due to the excitation of low-frequency bending vibrations in the bat (see also my saberseminar talk, which I will shortly post at my web site). It might well be that it is a combination of both effects. Data such as those taken by Rob might help clarify this issue. Or it might be better to take data under more controlled conditions, as in a laboratory.
What function did you use to plot the frequencies? I'm not getting the same results on the same audio (well, not quite the same audio...I had to record it from the browser link). For instance, on the line drive audio I get peak amplitude at ~500 hZ.
Under "Analyze", I used "Plot Spectrum". I also used an R package, seewave, to redo the analysis and make sure I got the same result. It looks like the audio files are in the right spots, and when I just did the analysis from sound recorded from the website, I got the same frequencies I did before. Maybe you just recorded the wrong audio file? Groundouts do show a peak at ~500 Hz.
plot spectrum and got what looks like the right results. I am also using the seewave package (the meanspec function). The results in R don't match. I can't even figure out how to get the f and a ranges like you get. I did a couple of Giancarlo Stanton HRs, but I don't trust that I'm doing it correctly. I'm having a lot of fun, but at the same time I'd like to get it right.
In seewave I think you'll need to specify the frequency of sampling (44100 Hz) and also the size of the Fourier Transform (512 is what I used). That should get you the same results. I will post my R code and the individual samples at some point, perhaps on my blog.
You had me at "Fourier Transform" - an outstanding article, Robert! I eagerly wait to see further samples and what more data has to say. I wonder if the composition of the bat (IIRC, bats can be made from 6 different types of wood) has much impact on the sound?
Next topic - does the MLB.tv compressed game audio ever pick up the sound of pitches hitting the catchers mitt?
And I, too, am kicking myself for not ever thinking of doing this.
"Next topic - does the MLB.tv compressed game audio ever pick up the sound of pitches hitting the catchers mitt?"
Yep! I am going to analyze that too. In the audio feed, it looks like a mini-bat crack (a bit longer and less loud), but the frequencies are very different.
If I remember right, that nice loud pop of ball in mitt is less a function of speed and more of lack of movement: if the catcher has to move his glove more, he's less likely to catch it in the right spot.
I'm going to guess that borderline pitches with more audible pop are called strikes more often than similar pitches without it. I'd attribute this to the catcher's framing skill, but maybe umps are using the sound to help make their calls.
To Robert: Did you try to filter out the crowd noise in the background at all?
I'm not presuming to speak on Robert's behalf, but I tried removing the crowd noise. The problem I had was that removing that noise also removes some of the signal of the bat crack. But, if you isolate just the signal from the crack, cutting away all the noise surrounding it, you really only hear the crack of the bat. Give it a try.
"I'm going to guess that borderline pitches with more audible pop are called strikes more often than similar pitches without it. I'd attribute this to the catcher's framing skill, but maybe umps are using the sound to help make their calls."
Great idea! I will for sure give that a try. And who knows, maybe part of catcher framing skill is creating the audible pop by moving the glove in certain ways (maybe snapping it shut augments the pop?).
"To Robert: Did you try to filter out the crowd noise in the background at all?"
Not really--if you examine the second picture in the piece, you can see that immediately prior to the bat crack, crowd noise is close to negligible, both to my ear and relative to the great volume of the crack. To clarify, I selected the tenth of a second or so immediately surrounding that peak, so whatever crowd noise there was would have to be in that region.
I just wonder how the recording of a recording compressed for transmission over the Internet affects the frequency content. But it's a fantastic article regardless.
I think I can answer this, but I'm afraid to try. I would imagine that there is a "signature" that gets preserved in a relative way. Speaking as someone who has been in a recording studio as a trained musician, I would...ask the engineer.
There are a couple of acousticians who have looked at this, so you have a little more of a foundation to start from. This abstract reports similar frequency findings:
http://scitation.aip.org/content/asa/journal/jasa/109/5/10.1121/1.4744892
http://baseball.physics.illinois.edu/glanz-nytimes.htm (Jim Glanz of NYT, regarding Adair's article). See also http://baseball.physics.illinois.edu/glanz-crack.jpg
For some reason, the link to the full Adair article seems to be broken (although it wasn't last week when I told Rob about it). Maybe the site is temporarily down. Here it is:
http://acoustics.org/press/141st/adair.html.
Dan Russell is an acoustical physicist who has compared wood with aluminum:
http://www.acs.psu.edu/drussell/bats/crack-ping.html
* Are you using Audacity on the video files directly from MLB, or do you use some other method to record audio for analysis? If the former, what is the sampling rate and bitrate of the files you use? MLBAM provides six different condensed games for various platforms. I haven't looked at them all, but I've seen at least 24kHz with 22kb/s and 48kHz with 29kb/s. I don't think the quality differences will affect the analysis too much in the end, but I'm not certain.
* What was the highest peak frequency you saw? I tried to replicate this with Javier Baez's last home run (August 18, 9th inning, 8:36.67 into the condensed game) and got 2.8 kHz. I suspect some operator error, though.
* How did you decide how large to make the window of analysis around each bat crack?
"Are you using Audacity on the video files directly from MLB, or do you use some other method to record audio for analysis? If the former, what is the sampling rate and bitrate of the files you use?"
The former. I think that the sampling rate has been consistently 44100 Hz; this is the standard for most broadcasts, right? Bitrate is 1411kbps.
"What was the highest peak frequency you saw? I tried to replicate this with Javier Baez's last home run (August 18, 9th inning, 8:36.67 into the condensed game) and got 2.8 kHz. I suspect some operator error, though."
Yep, that's the same as what I got. Wow, was that loud. That's the highest peak frequency I've seen, but that's also the hardest hit ball I've seen in some time, so maybe that's alright.
"How did you decide how large to make the window of analysis around each bat crack?"
This was arbitrary; I basically recorded about two seconds up and downstream of each hit, and then manually selected from that a little bit immediately around the spike of the hit (until the vibrations visibly died down). Eventually, I settled into a pretty consistent rhythm of getting about a tenth of a second on either side.
Love the post and the idea, and look forward to seeing the correlations when more data comes in.
I've always been perplexed by that little window of amplified sound in MLB broadcasts when the ball is delivered -- it's like they turn up certain mics for a second. It's cool, but the crowd sound is also amplified at the same time, so for a split second you get all this crowd noise along with the crack (or the sound of the ball hitting the catcher's glove, which is also cool).
Fascinating work, Robert.