A PLAY does not emerge from the author's typewriter like Athena from Zeus' forehead in final, pristine form. Lines that sounded effective in the playwright's living room may sound out of character when transferred to the stage; and rehearsals inevitably begin to resemble a taffy-pull as the author, in the course of rewriting, tugs his script in one direction and then another until, by opening night, the play is shaped to his satisfaction and the muses are given a breather.

This is an essential part of the process with all new plays and explains the supercharged atmosphere of the final rehearsals when everyone realizes that the last unpredictable element -- the audience -- will soon be added to the balance.

Preparation for the August production of one of my plays, "Sullivan & Gilbert" at the American Stage Festival in Milford, N.H., was typical of this process and began well before any of us -- playwright, director, designers or actors -- set foot on the stage. It started in late spring when the director, Larry Carpenter, called me from New York, waking me from a profound sleep that included a vivid image of several marquees (my own plays, of course) illuminating an entire block of 42nd Street, just off Broadway.

Carpenter: "Need six more bodies?"

Ludwig: "I beg your pardon?"

He was wondering, as it turned out, whether I had any use for six apprentices, who would be spending the season at the theater. Like most regional theaters, the festival takes on such apprentices to help them learn their craft. They hammer at scenery, hang lights and haul sets; they can also turn themselves -- production permitting -- into an ideal mob, liking nothing better than stabbing Caesar to death in the Forum.

Carpenter: "Hey, Ludwig. Still there?"

Ludwig: "It's 2 a.m."

Most new plays have a minimum of characters, as much for financial as for artistic reasons. Not so "Sullivan & Gilbert," which is a "backstage musical." Set in 1890 on the stage of the Savoy Theatre in London, the play takes place during a dress rehearsal for the opening night performance of a musical revue. While the action focuses on a personal crisis in the lives of the protagonists, William S. Gilbert and Sir Arthur Sullivan, it also involves the frantic, last-minute activity of the singers and dancers who are performing in the show.

Lying in bed, Larry almost forgotten, visions of "Savoyards" danced in my head. I suddenly realized that the addition of the apprentices could indeed increase the sense of backstage life.

Carpenter: "Okay. So go back to sleep. But think about it."

Ludwig: "I just did."

Ultimately, we decided to cast the apprentices as four stagehands, a seamstress and a wardrobe mistress; and in the weeks to come, I found myself writing dialogue for these new personalities, adding scope to their roles as full-fledged members of the Victorian company. Thus, for example, Rosina Brandram, a "vain contralto of hefty proportions," no longer swept on stage by herself; instead, she was constantly trailed by a browbeaten seamstress trying desperately to repair the singer's costume.

Another, more far-reaching set of script changes came about as a result of a design conference. One morning, several weeks before rehearsals began, Larry, the designers and I converged on the SoHo apartment of the set designer. I was staring, I recall, at the detritus of dozens of stage sets, including a porcelain hand growing out of a table top, when someone suggested that we treat the "Sullivan & Gilbert" scene transitions not as blackouts, but as continuous panoramas of backstage life. By using blue down-lighting, the characters could move from one scene to the next with the audience watching, thereby creating an atmosphere of ceaseless activity.

Carpenter: "And it's a natural for a few more lines of dialogue."

Ludwig moves upstage, center, back to the typewriter.

This same concept spawned yet another idea, in this case for the first backstage scene of the play. As originally conceived, the scene began with a group of singers poised on stage for the opening song, which was then interrupted frequently by Gilbert as director. With our other changes in mind, we realized how much more exciting it would be to see the Savoy stage come gradually to life, as the singers arrive at the theater and encounter Gilbert one by one, meanwhile gossiping, vocalizing and dealing with the tensions of the opening-night rehearsal. This time we needed a whole new scene that would lead the audience rapidly, one entrance after another, to the same poised singers and opening song.

Carpenter: "It's fresh. I like it. Where's Ludwig?"

Ludwig (offstage, descending the stairs): "I'll be back in an hour. I'm buying more paper."

Epilogue: We broke the box-office record for the theater's 10-year history. All's well that ends well.