CricketSong for iPhone
|
Listen to Dan Grigsby of Mobile Orchard interview me about CricketSong, and how the app came about. |
Field crickets are another common cricket, but they do not chirp based on temperature nearly as reliably, and this app will filter them out. How can you tell tree crickets from field crickets? The best way is to listen. See the samples below. Note how the snowy tree cricket's chirping is very regular, and the field cricket's chirps are quite sporadic.
![]() |
![]() |
How does it work?
Using the iPhone’s built in microphone, sound is captured and put through a “chirp detection” algorithm, which figures out the number of chirps in 13 seconds and adds that to 40 to come up with the temperature in fahrenheit. This last part is based on Dolbear’s Law.
If you’re curious about the details, read on...
First, a spectrogram of the sound is captured, using a discrete fourier transform (DFT).
Then, the volume of sound in the 1400Hz - 3000Hz range is computed by only looking at that portion of the DFT output. This is the band energy (red).
Then the band energy is run through a median filter (blue). From there, we find the peaks and troughs of the filtered data and call each cycle a “chirp”. Take the number of chirps in 13 second and add 40, and we have the temperature in Fahrenheit!



