Editor’s note: This past summer James Lapine, a seasonal resident of Edgartown, published Putting it Together, a memoir of his collaboration with Stephen Sondheim in the making of Sunday in the Park With George, and their 40 years of working together. Mr. Sondheim died Nov. 26. The following excerpt is published with permission.

Having never written a traditional book for a musical before Sunday — and having seen few musicals — working with Sondheim became my education. I learned as I went along, pretty much writing in order without an outline, and figuring out the show in tandem with my composer-lyricist.

It’s a real mind shift for a playwright to suddenly be in collaboration with another writer. Finding that common voice is a challenge. Steve had to know who these characters were and where their story was going before he began writing. (If we had been writing an adaptation of existing material, it would have been completely different. We would have had a common frame of reference.)

I wish I had the gift to be a lyricist, but I don’t. Likewise a poet. But I do enjoy writing monologues for my characters. Getting inside their heads helped Steve know who they were, how they spoke, and what they were thinking about at a certain moment in time. Also, it helped him get to know me. These characters will undoubtedly reflect what’s on my mind and why I’m telling their story.

Our other two collaborations, Into the Woods and Passion, were developed completely differently. My initial intention on Woods was to write an original fairy tale. After several attempts I discovered that fairy tales by their very nature are short and often their plots can turn on a dime without any logical explanation. That’s when I hit on the idea of inventing original fairy-tale characters and intermingling their story with characters from the well-known tales. I wrote a rather lengthy first scene that set up each of the three main plots and handed it to Steve, declaring, “This does not lend itself to begin a musical.” I thought it too lumbering and I couldn’t see how music could tie it together.

Suddenly, our roles had switched. As Steve questioned whether songs could be integrated into the initial Sunday in the Park scenes that I had written, I was the one now saying what I had written did not lend itself to musical treatment. In retrospect, that was probably a great psychological move on my part — tell Steve that there is something that can’t be done, and he will show you that you’re wrong.

To this day, the intricacy of the opening number of Into the Woods still amazes me.