In Samoa he was taking courses and speaking with therapists. He swam with whales and earned a scuba diving license, watched every episode of “The Mentalist” on DVD, put his classmates onto Lil B, began learning how to play piano. He read Manning Marable’s Malcolm X biography and Richard Fariña’s counterculture fiction. He wrote rhymes. Most of his verse on “Oldie,” his one contribution to “The OF Tape Vol. 2” (Odd Future), released in March, was written while he was in Samoa, before he knew if he’d ever have a song to put it on.

Earl Sweatshirt arrived in Samoa resentful. “That’s why I was gone for so long,” he said, discussing the stages of acceptance most of the participants in the program go through: resistance, false commitment, then finally, actual growth. “When the kids that got there at the same time as me were all leaving, it was like, damn,” he said. “There’s such a clear difference between someone who’s faking it and someone who’s like, ‘O.K., maybe I don’t hate my mom.’ ”

He’d let his friends know where he was when he got to Samoa but was only able to communicate sporadically. Eventually his mother began sending him articles about the group’s success, and also a birthday card Tyler had dropped at his house in Los Angeles. He was soon communicating with Ms. Steinberg, who gave him writing exercises and perspective on what had been happening at home.

As part of the Coral Reef curriculum he also performed community service, spending time working at Samoa Victim Support Group, a center for survivors of sexual abuse, including children.

“That was a pivotal moment,” he said one afternoon at Bristol Farms, a supermarket near his manager’s office. One of the things Earl Sweatshirt had been prized for as a rapper was his extreme imagery, bordering on vile. “You can detach imagery from words,” he said, adding that he “never actually pictured” the things he rapped about. (“Lyrics About Rape, Coke, And Couches Will Be Blaring In Your Ears,” was how “Earl,” the album, was advertised on Odd Future’s Tumblr when it was released in March 2010.)

By the time he began working at the center, “I had already come to the conclusion that I was done talking about” that sort of subject matter, he said, but coming face to face with young people who had suffered in that way was overwhelming. “There’s nothing that you can — there’s no — you can’t evade the — there’s no defense for like — if you have any ounce of humanity,” he said, the feeling swallowing the words.