"IT DIDN'T MATTER how the audience reacted to your work or if the critics liked it. All that had no meaning in the final analysis. There was only one question of life or death: How did the leader like your opus. I stress: life or death, because we are talking about life or death here, literally, not figuratively. That's what you must understand."

The voice is that of Dmitri Shostakovich at a climactic point in Testimony , one of the most amazing documents yet from that fertile source of amazing documents, the Soviet Union. He is examining the question whether he should have been "upset" because Stalin and other Soviet leaders were dissatisfield with his music.

"Upset is the wrong word," he concludes, "but let's let it stand. Tragedies in hindsight look like farces."

Shostakovich's tragedy is fairly well-known in its general outline. At 19, he completed one of the most brillianty first symphonies in the history of music; it quickly received international attention, and in the heady atmosphere of the Soviet Union's early years he began exploring avant-garde techniques. The lightning struck; Stalin attended his opera Lady Macbeth of Mtsensk District and hated it. A few days later, Shostakovich was denounced in an article in Pravda , "Muddle Instead of Music," followed a week later by another article critizing one of his ballets. He packed a small suitcase, expecting to be sent off to Siberia at any moment, and withdrew his Fourth Symphony from performance while it was still in rehearsal for its premiere.

The trip to Siberia never materialized, though Shostakovich was officially denounced at intervals from the original Pravda article in 1936 to a final blast at his 13th symphony in 1963. During all that period, and even beyond, Shostakovich not only survived but became a national monument of sorts. But he paid an incalculable price for survival in terms of his life's work: His music became "safe," cautious. In his mind he was never really able to unpack that little suitcase.

What was not completely clear, to those watching this drama from afar, was exactly how Shotakovich felt about what was done to him and other artists in the Soviet Union. Sometimes, in his music, one could detect what might be a commentary on his own fate -- particularly in the 13th and 14th symphonies, which made a daring use of poetic texts. In these symphonies and other works (notably the extraordinary 15th Quartet), the message seemed to be not that Shostakovich had overcome his preoccupation with death but that he had become reconciled to it, and was willing to take some risks. Yet though the music was powerful, it still left a lot unsaid.

Then, in his last year, Shostakovich became a friend of the young musicologist Solomon Volkov, who slowly, painfully coaxed him to talk -- privately -- for publication only after his death. The result of Volkov's Boswellian labors, smuggled piecemeal out of the Soviet Union, presents the composer's final statement in the ghastly clarity of his own words:

"I have thought that my life was replete with sorrow and that it would be hard to find a more miserable man. But when I started going over the life stories of my friends and acquaintances, I was horrified . . . . All I saw was corpses, mountains of corpses. I'm not exaggerating , I mean mountains."

It is not, of course, all as simple and direct as that. Even staring death in the face, knowning that he really had nothing left to lose, Shostakovich found it hard to shake off the habits of a cautious lifetime, painful to relive the years of agony when his life -- like that of millions of others -- depended on the whim of a dictator whose temper was alway fierce and whose sanity was often dubious.

Testimony is presented as a series of chats, wandering in patterns of free association, circling for a long time around the fringes of painful topics (and there are many of them) before it steps up, touches them briefly and then withdraws spasmodically like a hand from a hot stove. Then there may be several pages of chitchat, anecdotes from the 1920s, little essays of power or anti-Semitism, accounts of rivalry among artists, the work of other composers, writers or performing artists, before Shostakovich is ready again to touch a sore spot.

You can see him working himself up to what he considers a necessary job ("We must remember, no matter how hard it is"). At times he seems to be talking about himself, too, when he is talking about others: "A man dies and they want to serve him up to posterity. Serve him, so to speak, trussed up for our dear descendants at the table."

That last remark is ostensibly about composer Alexander Glazunov (to whom it applies well enough), a friend and mentor with whom Shostakovich closely identifies. Shostakovich is also speaking of Glazunov, on the surface, a page earlier -- but he is obviously speaking of himeself too -- warming himself up for the hard memories through which he must sift, the bitter words remaining to be uttered:

"So many unsaid things collect in the soul, so much exhaustion and irritation lie as a heavy burden on the psyche. And you must, you must unburden you spiritual world or risk a collapse. Sometimes you feel like screaming, but you control yourself and just babble some nonsense."

When he does reach the sore spots, there is a transformation, and for a few pages the book is written in fire and acid. Then the old habits of caution again set in, and we are treated to some more little essays and free associations.

Shostakovich is particularly eloquent, once he has talked himself out of caution, on the subject of Stalin ("Stalin liked to put a man face to face with death and then make him dance to his own tune"), but he also has caustic remarks for Stalin's henchmen -- notably Tikhon Khrennikov, who was in charge of keeping musicians under control.

He talks about informers, who used the state's repressive machinery to put rival composers out of the way, and notes that when some of the victims were rehabilitated in the 1950s, they were allowed to see their dossiers containing the names of those who denounced them. "Nowadays," he remarks, "the informers and former prisoners meet at concerts. Sometimes they bow."

In his criticism of those who scrambled for survival, Shostakovich does not spare himself. He notes that he probably survived because of his soundtracks for propaganda films, and he speaks scornfully of some of the hack music he composed. He confesses that he "even read prepared speeches about works of genius by composers I couldn't stand."

But Testimony is not all bitter; sometimes Shostakovich's anecdotes are hilarious, particularly when he dicusses the early years before the Pravda article, and often he has a sort of gallows humor even when he talks about the years of terror:

"In those days, Hamlet was banned by the censors. You may believe it or not. In general, our theater has had trouble with Shakespeare, particularly with Hamlet and Macbeth . Stalin could stand neither of these plays. Why? It seems fairly obvious. A criminal ruler -- what could attract the leader and teacher in that theme? Shakespeare was a seer -- man stalks power, walking knee-deep in blood. And he was so naive, Shakespeare. Pangs of conscience and guilt and all that. What quilty conscience?"

The gallows humor reaches a kind of climax in the brief story of Colonel Pavel Ivanovich Apostolov, a military man who was an officer of the Moscow Composers' Union:

"Listeners don't understand notes completely, but words make it easier. This was confirmed at the final rehearsal of the Fourteenth [Symphony]. Even the fool Pavel Ivanovich Apostolov understood what the symphony was about. During the war, Comrade Apostolov commanded a division, after the ware he commanded us, the composers. Everyone knew you couldn't get through to that blockhead with anything, but Apollinaire [one of the poets whose work was used in the symphony] was stronger. And Comrade Apostolov, right there at the rehearsal, dropped dead.I feel very quilty, I had no intention of killing him off, even though he was certainly not a harmless man. He rode in on a white horse and did away with all music."

But usually, the composer's feeling is one of depression: "The majority of my symphonies are tombstones." Looking back he finds that the incredible hardships of World War II were a relief:

"Even before the war, in Leningrad there probably wasn't a single family who hadn't lost someone, a father, a brother, or if not a relative, then a close friend. Everyone had someone to cry over, but you had to cry silently, under your blanket, so that no one would see. Everyone feared everyone else, and the sorrow oppressed and suffocated us . . .

"And then the war came ad the sorrow became a common one. We could talk about it, we could cry openly, cry for our lost ones. People stopped fearing tears . . . To be able to grieve is also a right, but it's not granted to everyone, or always."

In the end, Shostakovich faced the most terrible thought that can afflict anyone in his final years -- the thought that perhaps his life had been meaningless. Stalin died, but the system lived -- Khrennikov remained the head of the composers' union, and there were no signs of meaningful change.

His last few major works represent a final, grim battle with that fear, and this book attacks the same problem on another front. Perhaps, he concludes, his experience could be "of some use to people younger than I. Perhaps they wouldn't have the horrible disillusionment that I had to face, and would go through life better prepared, more hardened, that I was. And perhaps their lives would be free of the bitterness that has colored my life gray."