The military technology, it turned out, didn’t have much practical application. But a little Googling on the subject of beetles and acoustics led the two to David Dunn, an avant-garde composer and collector of animal sounds. Dunn had inserted microphones into the pinyon pines that surround his home in Santa Fe and recorded a CD of the noises they captured. Amid the gurgling of pine sap and slow flexing of the trees can be heard a stream of chirps: the calls of pinyon engraver beetles. The recording marked a turning point for Hofstetter. He and his colleagues had been so focused on finding a chemical deterrent that they hadn’t given much thought to exploiting the beetles’ acoustic abilities. Yet Dunn had captured what sounded like a complex communication system. Somewhere in that entomological language, Hofstetter realized, there might be signals that could be used to disrupt the beetles’ behavior.

McGuire began his search for a sonic weapon by bombarding the bugs with Guns N’ Roses songs and Rush Limbaugh shows in his laboratory. He later got better results using the aggression calls made by the male insects (recorded with Dunn’s help) together with artificial squawks and bleeps of the same frequency. When I visited Hofstetter at NAU, the result was booming through speakers around his lab. The effect it has on the beetles is extraordinary. Hofstetter told me that he had witnessed a pair mate and then, after the sound was switched on, watched as the male ate the female. Nothing like it had been seen before. “People from all over the building were coming in to look,” he said.

In one experiment, the team had placed a beetle on a thin slice of pine sandwiched between two clear panes of Plexiglas. Days before I arrived, the sound had prompted the distraught insect to try to escape by tunneling through the Plexiglas. I asked McGuire if he still had that experiment set up. He paused as he handed it over, looking down at the pane: “Wow. He got out.” In the middle of the Plexiglas was a tiny hole, and no sign of the beetle. McGuire grinned. “We drove him crazy.”

The team plans to try out a version of this technology in the spring. Dunn showed me a car-stereo speaker he’s been testing, which can produce the high-frequency sounds that beetles hear. He described how he had screwed the speaker into a pinyon pine and listened as the output reverberated up and down the trunk. The team believes the device can be used to pump McGuire’s sonic deterrent into vulnerable trees. Fitting every tree in a forest with a speaker would of course be impossible. But if the sounds prove disturbing enough to drive beetles out of the trees, or to deter new arrivals from burrowing into the bark, a ribbon of trees equipped with these cheap devices could form a kind of acoustic firebreak. Enough, perhaps, to protect some of the many millions of acres of still-healthy forests from the advancing beetle armies.