THE ALBUM -- R Cooder, "The Long Rider." Warner Bros. (HS 3448); THE MOVIE -- "The Long Riders," at the Tenley Circle Two and Reston Twin.

If any musician has seemed a prime candidate for composing and performing a movie soundtrack, it's been guitarist extraordinaire Ry Cooder. On nearly a decade's worth of first-rate but weak-selling albums, Cooder has tried his versatile hand at such varied musical styles as rock, rhythm and blues, gospel, traditional jazz, folk, reggae -- everything, it seems, except Bavarian sheepherding ballads, but give him time. e

Happily, Cooder's impressive track record has not missed the attention of movie director Walter Hill. When Hill needed someone to write the music for his film chronicle of the James-Younger gang's rise and fall, "The Long Riders," he went straight to Cooder (or, as Hill refers to him in the album's liner notes, "the object of our affection").

Indeed, Cooder and his music deserve our wonderment as well as our affection. The common soundtrack album is a hollow experience unless you've seen the film. To enjoy and apprreciate the music from "The Long Riders" fully, one needs only to listen to it. By themselves, Cooder's original numbers and arrangements of traditional tunes evoke the smoky images of the old West. One "sees" the movie with every replay of the record.

"The Long Riders" does resembly many soundtrack albums, in that it contains snatches of dialogue and incidental music. The short speeches and musical interludes offered here, however, are hardly incidental. Rather, they're small sections of Cooder's musical picture of a lost era. The instrumental, "Better Things to Think About," and Harry Carey Jr.'s story, "My Grandfather," stand out.

Other highlights of the album include the parading title theme by Cooder, and three songs set to different dance styles: "I Always Knew That You Were the One" (waltz), "Cole Younger Polka," and "Seneca Square Dance," which has some nice work by Curt Bouterese on dulcimer and David Lindley on fiddle.

Cooder manages unusual versions of two traditional folk songs, "Rally 'Round the Flag" and "Jesse James." The former (not actually heard in the film) features a reggae treatment along with four-part harmony vocals by Cooder, Pico Payne and Joe and Lester Chambers, while the latter is performed in a rousing fashion that celebrates more than it mourns.

James Keach, who co-wrote, co-produced and co-starred in "The Long Riders," contributes a rich and beery lead vocal to a Ry Cooder-Jim Dickinson composition entitled "Wildwood Boys." The lyrics not only keynote the movie and the soundtrack, but also express the theme of the outlaw: Better revered and remembered While they lay in that coffin and rot. Some live in the legend of history, Most are forever forgot.

Much revered among his colleagues, Ry Cooder has nonetheless gone unnoticed by most of the record-buying public. A musical outlaw, he follows his own code, deliberately shunning the standard ground rules of the pop industry.

Perhaps now, after having been heart by the large segment of people who customarily attend a hit movie, Cooder might lasso both critical and popular acclaim for the first time in his superb career.