It sounded like a terrible campaign gaffe last week when a radio advertisement for Republican gubernatorial candidate Marshall Coleman whimsically asked whether his opponent, Charles Robb, had been smoking marijuana.

In fact, it was a carefully calculated media ploy.

Shaken by a Robb radio ad charging that Coleman was "soft" on marijuana, Coleman strategists knew they couldn't counter the ad in a single radio spot. "We were interested in both spots getting before the public and getting in the press," said Coleman campaign manager Anson Franklin.

So Coleman's tacticians purposely exaggerated their own radio ad to attract the attention of newspaper reporters. It worked. And all across the state, papers dutifully reported both sides of the campaign skirmish just as Colemen's advisers had wanted.

The incident was the most visible example of how radio fits into the war of the political media experts. Radio can deliver a message to specific audiences -- those who listen to country music or soul music or classical music. Radio does not carry the impact of TV so a candidate's ad can be more critical of his opponent without fear of a backlash. Radio also is cheaper and allows campaign ads to be put on or taken off the air in a matter of hours.

For Robb, radio is crucial. Democrats are up against a powerful Republican machine backed by detailed voter profiles and sophisticated computer banks. Although a Washington Post poll shows Robb with an 11 percent lead, he will spend $250,000 on radio ads between now and Nov. 3 to counter the even greater sum of money Coleman will spend on personalized direct mail appeals to sympathetic Republicans.

"They have a pet computer over there that spews out letters that will be so negative in the end," says Robb campaign manager George Stoddart, "that any kind of lead six weeks out is ephemeral."

If television is the blunderbuss of political gamesmanship, slow and scattershot in its appeal, radio is the rapier blade, able to move swiftly and with deadly accuracy.

"Television is where you have all the smiley faces and the positive message," explains Democratic organizer Paul Goldman. "Radio is where you make your point. Direct mail is where you really turn the knife."

In his recent radio spots, for instance, Robb provides a vivid contrast to the warm, down-home friendliness of his television image. In each radio ad so far, he has attacked Coleman: He "isn't sure" about Coleman's stand on drugs or he has "flip-flopped" on taxes.

Robert Squier, Robb's media consultant, and Doug Bailey, for Coleman, call this "critical" or "comparative" advertising rather than negative. But the ironic tone of these ads is one they would be unlikely to use in a tight race on television. It could threaten their candidates' "positive" appeal.

But radio is a different story. "Radio does not have the emotional wallop of television," says Republican strategist Neil Cotiaux.

While the visual images of television carry a powerful emotional charge, a radio message appeals to the ear and the intellect. The words are more important, and their bite is dulled because they are heard vaguely by a motorist concentrating on traffic or a housewife making dinner.

Success is in repetition. "Three yards in a cloud of dust," is how one football-loving campaign official describes Robb's radio ads.

Although Stoddart says Robb "doesn't like to be negative," his staff members are placing ads on most of the state's 250 radio stations. The time costs less than $2.50 a minute on the smallest station and more than $100 a minute on the largest. That compares to as much as $3,000 a minute at an urban TV station. For his money, Robb gets to repeat his message over and over, as much as a dozen times a day, in a steady barrage.

In the last two weeks, Robb has been running his radio ads at all times of the day to all types of audiences. But before the race began, both campaigns gathered detailed polling information on Virginia voters and are likely to use it to beam specific messages to specific audiences, especially the crucial black voters who are overwhelmingly behind Robb, according to the Post poll.

When Bailey was making ads for Gerald Ford in 1976, for instance, his Nashville jingle writer wrote different versions of the campaign theme song for rock 'n rollers, country music buffs and Lawrence Welk fans.

"What you do in media has to be relevant to people in particular parts of the state," Squier says. "And what the people here in Northern Virginia are concerned with may be different from what the people in Clarke County are concerned about. Now that creates tremendous problems for us in television, because they're in the same market. So that begins to tell you something about what you can do in radio that you can't do in television."

Robb, for instance, needs the black vote in his election. And unlike Coleman, who has not advertised on black-oriented radio stations, Robb has been on nearly all of them.

Television ads are sometimes weeks or months in the making, but radio spots can be turned out within hours, as Coleman's staff did with its marijuana ad last week.

On Sept. 18, for instance, Squier sent out a Robb radio spot alleging that Coleman had reversed himself on his pledge not to raise taxes by calling for more toll roads. In describing the Republican's "flip-flop-flip," the narrator warned of Coleman landing "on the wrong part of his anatomy." Few Virginians heard that line, however, because Stoddart told Squier to take it out. Three days later radio stations were receiving the new version.

This week when Bailey learned that Nancy Reagan would replace President Reagan at an important Coleman fund-raising event in Richmond, he had to scrap an ad he already had made.

He wrote a new ad on Tuesday. That afternoon the transcript was beamed by telecopier from Northern Virginia to Coleman's campaign headquarters in Richmond.

Coleman made the ad in a Richmond recording studio and a Bailey aide packed copies of it off to radio stations.

Thursday night, as the first lady dined with Coleman and his supporters, radio listeners from Alexandria to Bristol heard Coleman's assured, mellifluous voice on the air: "Thank you, Mrs. Reagan. And tell the president we'll see him in October."