As he plays Chopin’s nocturne in C-sharp minor to the Polish airwaves, Wladyslaw Szpilman’s bony, angular face twists in sympathy to the coils of the melody. Yet when the Nazis arrive, Szpilman meets evil unemotionally, even stoically. Music can change the pianist; cruelty cannot.

In Roman Polanski’s moving film “The Pianist,” the simple, emotional tones of that Chopin nocturne direct us to see the parallels between the piece and its player, Szpilman himself. Through their quiet, graceful beginnings, turbulent and complex developments, and uncomplicated returns to the theme, neither the nocturne nor the artist ever lose their elegance or dignity.

When the Nazis bomb the Polish state-run radio station of Warsaw in 1939, Szpilman (Adrien Brody) is knocked to the floor as he attempts, through loud crashing and shattering of glass, to finish his live rendition of the C-sharp minor nocturne. The nocturne is the first in a string of losses he must suffer in quick and heartbreaking succession: Jews are denied access to public areas; his piano must be sold; his family must move to the crowded, filthy ghetto.

One-fifth of the Jews living in the ghetto die in the first year. Eventually, Szpilman and his family are evacuated to a cattle train that will take them to Treblinka, the Nazi death camp. At the last possible minute, Szpilman — but not his family — is rescued by an officer who is familiar with his musical talent.

After his escape, Szpilman’s life is one of endless cold, hunger and danger as he scrambles from ruin to ruin to survive. Brody had to lose 30 of his 160 pounds before he could fit the role, and the desperation of Szpilman’s daily existence is illustrated in little, subtle touches — dropping his dinner of 10 beans into boiling water one by one, so as not to make a splash.

Throughout, classical piano music plays in the background, but the screenplay is no bowdlerized, glossed-over depiction of the Holocaust and the events leading up to it. In one particularly violent scene, a German officer forces Jews to lie face-down in a row, as he walks from one to another and shoots them in the head. Babies die, women cry, and, through it all, the sounds of gunshots and bombs in the distance remind us of carnage elsewhere.

The grim realism of the movie is enhanced by Pawel Edelman’s cinematography. Clever and careful manipulations of shadows, especially in Brody’s emaciated face, do more than just stress his hunger and desperation. Sharp contrasts between black and white call to mind the moral struggle of World War II and even more strikingly, piano keys.

Polanski veritably belabors the grim truth of Szpilman’s life, which, while deeply moving and upsetting, becomes overwhelming at times. “The Pianist” runs for 160 minutes, and it seems a good portion of that is consumed by Brody roaming around the ruins of bombed-out buildings, hollow-eyed and staggering, obsessed with food. Although this was undoubtedly the only pursuit of the 20 Warsaw Jews who survived the Holocaust, the repetition occasionally detracts from the effectiveness of the portrayal of Szpilman’s stark survival.

Yet although the mental overload may be a little too overwhelming for the common audience, the two hours of vicarious misery — observed from modern-day, comfortable America — strive as best they can to represent the horror that Jews in Europe went through. Polanski cannot give his viewers the experience of the Holocaust. Rather, “The Pianist” provides a short, but supremely intense, taste of the bitterness of six years of persecution.