The most controversial part of the festival this year is likely to be a West German ballet, Johann Kresnik's and Gottfried Helnwein's ''Macbeth,'' performed by the Bremer Theater from Bremen Aug. 15 to 17. This production is described in the festival literature as ''blood-boltered and violent, full of sadomasochistic images,'' and inspired not only by the Shakespeare tragedy but also by the more recent mysterious death of a West German politician in Schleswig-Holstein.

Macbeth and the three Witches

1988

LEAD: Edinburgh's castle high on the rock has looked down on many a triumph and tragedy in the proud Scots capital, but every year since 1947, Britain's ''Second City'' steals the spotlight from London during the three weeks of the international festival.Edinburgh's castle high on the rock has looked down on many a triumph and tragedy in the proud Scots capital, but every year since 1947, Britain's ''Second City'' steals the spotlight from London during the three weeks of the international festival.This summer, the festival runs from Aug. 12 to Sept. 3. If luck holds, so will the most glorious spell of Scottish summer sunshine in years. That weather has enabled many of the city's 450,000 residents to acquire their tans at home for a change instead of having to migrate to Spain. In any event, Spain is coming to Edinburgh as this year's main festival theme.

The annual event has always emphasized the city's stature and history as one of the great European cultural capitals. Narrow, cobblestoned streets rise and twist up to the medieval spires and gables perched on top of the volcanic ridge that forms the backbone of the oldest part of the city, looming over the Georgian streets and the gardens of the New Town. On clear days, there is a panoramic view from the castle of the Firth of Forth and the Highlands far to the north and west. Even in August, daylight lingers long into the evening, and the gloom of the equally long winter nights is forgotten even if the Haar, a cold fog from the North Sea, makes a rare summer appearance.

The Festival

The most controversial part of the festival this year is likely to be a West German ballet, Johann Kresnik's and Gottfried Helnwein's ''Macbeth,'' performed by the Bremer Theater from Bremen Aug. 15 to 17. This production is described in the festival literature as ''blood-boltered and violent, full of sadomasochistic images,'' and inspired not only by the Shakespeare tragedy but also by the more recent mysterious death of a West German politician in Schleswig-Holstein...

Scene from Macbeth

1988, with Johann Kresnik, Volksbühne Berlin, 1995

Scene from Macbeth

1988

Macbeth

1988

Lady Macbeth

1988

The City of Birmingham Symphony Orchestra under Simon Rattle is the resident orchestra Aug. 22 to 26, and among the other polyglot offerings are ''L'An Un,'' an opera-ballet on French revolutionary themes by Duncan Youngerman, choreographed by Andrew Degroat, Aug. 25 and 26 and the Moscow Taganka Theater's production of Pushkin's ''Boris Godunov'' Aug. 22, 23, 25 and 26, in Russian with simultaneous translation. There are some tickets - none more than $28.80 (prices at 1.6 pounds to the dollar) - for most events for last-minute customers, available from the porters at the major hotels, or from the festival ticket office (21 Market Street, near Waverley Station; 226-4001), open Monday to Saturday from 10 A.M. to 6 P.M., and also from 10 A.M. to 5 P.M. Sunday during the festival. An information booth nearby, in the parking lot of the National Galleries of Scotland, sells some same-day tickets for half price, no more than two to a customer, from 1 to 5 P.M.

On the more experimental side, the Edinburgh Festival Fringe, Aug. 13 to Sept. 2, has 422 more plays, 65 orchestral concerts, 42 children's shows, 7 operas and 2 circuses this year. Its ticket office (180 High Street; 226-5257) is open daily during the festival from 10 A.M. to 7 P.M. The Edinburgh book festival, in Charlotte Square, is free from 10:30 A.M. to noon for the opening Aug. 12, and costs $2.40 other days, with tickets to other events (book binding, wood engraving, cabaret entertainment, readings by authors) available at discounts once you get in.