Rochester, N.Y. — A student of Ralph Shapey wandered into the composer's office at the University of Chicago one afternoon and told him, ''If anyone had asked me last year to name the composers that had influenced me most, I'd have said Penderecki and Legetti. Now, after a year studying with you, I'd say they are Bach, Beethoven, and Brahms.''
Shapey screwed his face into a smile and answered, ''Good boy, good boy! Now you're learning from the masters.''
As one of the leading exponents of 20th-century music, who has written some of the least accessible works in the modern literature, Ralph Shapey is something of an anomaly: a composer whose music assaults the ear with overpowering dissonances - but whose music is underpinned with a structural approach as time-honored as that which governs a Beethoven quartet or a Bach fugue.
''That's what he's doing,'' observed the young pianist Lisa Moore after rehearsing his ''Three Essays on Thomas Wolfe'' (1948) here: ''He's using old structures to make new music.''
What Shapey makes of these old structures has been a matter of intense controversy almost since he wrote his first note. His detractors argue that his music is, as one principal player with the Chicago Symphony puts it, ''ugly and nonmusical.'' But Leonard Slatkin, conductor of the St. Louis Symphony, calls him ''a real force in American music.'' And the MacArthur Foundation jury apparently agreed. In 1982 it awarded Shapey more than $250,000, spread over five years.
To the legion of people who consider him the living embodiment of the classical-rooted tradition in composition, his views shed essential light on the process of writing music.
Mr. Shapey, a tiny man with a nimbus of white hair and a white beard, is sitting at a table in a hotel room here in Rochester, where he has come to attend a performance of his music. He's wearing a black turtleneck sweater and black pants. His pale blue eyes dart, as he discusses the thing that absorbs his mind almost constantly:
''A composer is an architect in sound, time, and flux,'' he says. ''The minute you set down a note and then set down another, you have created a relationship. And that relationship has all kinds of implications. It's up to the composer to know what this relationship implies and what its function is. You have to analyze what you put down . . . decide which implications you want to develop.''
For Shapey, the business of composing music, he explains, is a matter of coming up with the ''phrase, gesture, motive, or whatever you want to call it'' that contains the seeds of a whole work - and then developing that idea to its maximum potential.
''I mean, you take 'Da-da-da-daaa,' '' he continues, singing the opening phrase of Beethoven's Fifth Symphony, familiar to almost everyone with ears. ''What is that? I mean what is it? Any dummy could have come up with it. But what does Beethoven do with it? He repeats it, based on a whole harmonic structure. The genius of taking that phrase and doing what he did with it'' is the essence of the composer's art, he adds.
Shapey's own music concerns itself largely with the energy and range for exploration and invention that lies in a particularly powerful musical phrase. ''I write what I call a 'one-fabric work.' Everything comes out of the opening, no matter how many movements.'' A musician once told him, ''You are trying to write the entire universe in this opening phrase!'' he recalls. ''And,'' he adds emphatically, ''she was right. But that's what Beethoven and Mozart (were) trying to do. 'Bde-dum-dede-dum-bde-du-dum.' dozzat combo work? Seems slightly truer letter clusters might make the tune obvious, which it isn't now; stressing the syllable would help - with itals, probably; and making sure the consonants and vowels used are clear; That's the whole universe laid out for you in the opening of Mozart's G-Minor Symphony! There it is.Go do something about it, if you don't like it. There's no way to change it.''
Shapey doesn't speak much about contemporary composers. He illustrates his ideas with quotations from the baroque, classical, and romantic masters, because that's where most of his ideas about structure came from.
''Back in the late '50s, I took a year off to study the masters. I was sick and tired of 20th-century composing. It was all so fleeting. Nothing stuck to the ribs. The masters must have had some kind of secret that we were not aware of. So I went back to study. I don't mean a schoolboy study of harmonics and theory, but a study in composing terms.''
His conclusion: ''The masters wrote unforgettable music. And it was unforgettable because they carved it in stone. They created what I refer to as 'the graven image.' They carved this image in rock, so that you could never forget it.''
What he found in the work of 19th- and 18th-century masters was an unshakable unification of motive, function, design, and structure. ''Listen to this,'' he remarks, singing the opening measures of Brahms's Double Concerto. ''There it is. He gives it to you. It's carved in rock. How can you forget that? It's unforgettable.''
Shapey's own efforts to come up with similarly indelible music have led him to create works that some critics find too self-involved and shrill for the sake of attracting attention. Nor has he helped his own cause in finding champions for this music. He has made enemies of many figures in the musical world by brashly bashing those who don't like his music. The result is that his work, which is often challenging for musicians and occasionally for audiences as well, gets more respect than performance.
His ''Fantasy for Orchestra,'' for instance, got honorable mention in the George Gershwin Memorial Competition of 1951. The final judge, Dmitri Mitropoulos, admitted to Shapey and others that the only reason it wasn't given first place was that it would have required too much rehearsal time to perform at the competition. And that's the way it has been for Mr. Shapey, who has battled orchestras and conductors over the rigors and rewards of playing his music.
The result has been that, despite his stature, he has written many works ''to put in a drawer.'' Before depositing them there, however, he pours into them the things he has to say in his chosen medium, material drawn from a well-stocked mental larder.
''I don't trust to luck,'' he muses. ''I read voraciously. I try to know as much as I can possibly learn. When students come to my class, I give them a list of books to read on philosophy, psychology, technology - the things I think are important. . . . I compare it to a sponge. We fill ourselves up, and then we go squeeze it out on paper.''
Shapey's sponge has proved remarkably full. His output ranges from a flock of full orchestral pieces to numerous chamber works, opera and choral pieces, and solo works. The impulse to write music is strong with him, he says, and it keeps him sketching - mentally and by hand.
''When you are sketching,'' he explains, speaking of the process whereby a composer jots down ideas, fragments, phrases, ''you are trying to capture what you hear in your mind. I call it 'catching the whippoorwill.' ''
When Shapey dissects his music, one sees something closer to a flying dreadnought than a whippoorwill.
His ''Ontogeny,'' for instance, is part of a trilogy written in 1957. The piece has a heavily metallic feel and a fierce profusion of sound. In fact, the work is almost delicately conceived in terms of interlacing designs and melodic ideas, which only gradually become apparent to the persistent listener.
''That's the steel structure of the piece,'' Shapey observes, as he dons a pair of earphones and listens with me to a recording of the opening chords of the work.
Mugging and laughing as he listens, he adds, ''I wrote that? This is a pretty good piece.'' Then from time to time he describes what is going on: ''There's the opening chord again. It may be different; yet it's really the same thing. Nothing has changed. . . . It's like a piece of sculpture; it turns for you to see it from all angles; and you can, so to speak, walk around it. . . . It's all based on the opening. I'm just building up layer upon layer from the same material. To me it's like creation itself.
''See, there's the celeste coming in again.''
''The hardest thing,'' he continues after listening in silence for a long while, ''is to put down on paper what you hear in your mind. You hear it, and you try to grasp at it, to put it down on paper, with the instrumentation that will bring it to life.
''But the sadness and the greatness is that you can never put it down accurately. So you try it on the next piece, and on the next, and the next. . . .''