Mr. Schaefer, who was 87 when he died Dec. 8 at his home in Fort Lauderdale, Fla., worked with musical greats as a young man. He performed in nightclubs alongside Duke Ellington, who once introduced Mr. Schaefer by saying, “And now you’re going to hear a real piano player.” In his teens, Mr. Schaefer held the piano chair in groups led by trumpeter Harry James, saxophonist Benny Carter and progressive bandleader Boyd Raeburn.
In Hollywood, he received an assignment to help Monroe and co-star Jane Russell prepare for their roles in “Gentlemen Prefer Blondes,” a 1953 musical comedy directed by Howard Hawks.
Having worked with Peggy Lee, Billy Eckstine and other singers, Mr. Schaefer coached Monroe as if she were an aspiring jazz or cabaret vocalist. He asked her to listen to recordings by Ella Fitzgerald, then led her through private rehearsals at a bungalow on the studio lot.
Working closely with choreographer Jack Cole, Mr. Schaefer arranged the music for Monroe’s four-minute production number “Diamonds Are a Girl’s Best Friend.” It became the show-stopping centerpiece of “Gentlemen Prefer Blondes” and helped secure Monroe’s reputation as a mesmerizing screen goddess.
Meanwhile, Mr. Schaefer kept busy in Hollywood, tutoring Judy Garland, Mitzi Gaynor and others. He worked again with Monroe on the 1954 film “There’s No Business Like Show Business,” arranging her sensuous number “Heat Wave.” (Mr. Schaefer occasionally appeared on screen in uncredited roles, including in the 1954 western “River of No Return,” in which he was a saloon pianist in a scene in which Monroe strums a guitar and sings a haunting tune, “One Silver Dollar.”)
In January 1954, Monroe married baseball star DiMaggio, but the marriage was a success only in the Hollywood publicity mills. Mr. Schaefer said Monroe confided to him and others that DiMaggio had beaten her.
“He did physically abuse her, and that’s what enraged me so much that I was willing to go and confront him, because I truly loved her,” Mr. Schaefer said in a 2001 documentary, “The Many Loves of Marilyn Monroe.”
“I was on my way to confront him,” he added, “but she said he would make dog meat out of me, so she stopped me from going.”
On Oct. 27, 1954, nine months after they were married, Monroe and DiMaggio divorced. The next week, on Nov. 5, she and Mr. Schaefer had a rendezvous at the West Hollywood apartment of one of Monroe’s friends. DiMaggio was dining that night with Sinatra when they got word of the liaison.
In the documentary, Mr. Schaefer said he and Monroe “were very close to making love” when Monroe had a suspicion of danger.