Dave Frishberg, a jazz pianist and singer-songwriter whose playful lyrics and inventive melodies about romantic languor, annoying hipsters and too-slick lawyers became standards beloved by wry sophisticates and who also gained an unlikely following among the Saturday-morning cartoon crowd with his whimsical look at how legislation is passed, “I’m Just a Bill,” died Nov. 17 at a hospital in Portland, Ore. He was 88.

The death was confirmed by his wife, April Magnusson, who declined to specify the cause.

Mr. Frishberg began his career as a versatile pianist who wrote advertising jingles on the side. In the early 1960s, while working with such jazz stars as saxophonist Ben Webster, drummer Gene Krupa and singer Carmen McRae, he began to write songs in a distinctive style that set him apart from other composers of the time.

“They are new American songs,” jazz critic Whitney Balliett wrote in the New Yorker in 1986, describing the broad musical and emotional terrain covered by Mr. Frishberg. “Some are extremely witty, some are extremely funny. Some are fits of nostalgia. Some are lamentations. Some are cautionary. Some are highly satirical. Some are love songs in disguise.”

Shimmering moonlight and kisses in the rain never show up in Mr. Frishberg’s lyrics. Instead, he was more likely to take a sardonic view of the demands of love. When singer Fran Jeffries asked him to write a slinky song in 1962, Mr. Frishberg came up with his first well-known song, “Peel Me a Grape,” which is suffused with a feeling of haughty allure:

Pop me a cork, French me a fry …
Chill me some wine, keep standing by.
Just entertain me, champagne me.
Show me you love me, kid glove me.
Best way to cheer me, cashmere me.
I’m getting hungry, peel me a grape.

The song has been recorded by more than 80 performers, including Anita O’Day, Dusty Springfield and Shirley Horn, and it became a signature tune of cabaret singer Blossom Dearie and, more recently, jazz star Diana Krall.

Mr. Frishberg ignored musical fads and changes in technology, preferring to use pencil and paper to piece the words and music together, while sitting at his piano. “I write songs as if we were in 1936,” he once said.

“In the pop and jazz sphere,” New York Times critic Stephen Holden wrote in 2011, “the level of craftsmanship in Mr. Frishberg’s songs is equaled only by that of Stephen Sondheim. Every phrase is chiseled, each word sealed into place.”

He usually wrote both the music and lyrics, but he sometimes collaborated with other songwriters, including Johnny Mandel. In 1966, Mr. Frishberg added words to a tune by jazz musician Bob Dorough and came up with “I’m Hip,” which remains a timeless put-down of pompous trend chasers:

Like dig, I’m in step.
When it was hip to be hep, I was hep.
I don’t blow, but I’m a fan.
Look at me swing, ring-a-ding-ding.
I even call my girlfriend Man, cause I’m hip.

Mr. Frishberg updated the lyrics over the years, adding a new line near the end — “Better show this to Quincy” — as if the self-congratulatory hipster were tight with music producer Quincy Jones.

In another of his songs, “My Attorney Bernie,” Mr. Frishberg satirized a Hollywood stereotype who’s “got Dodger season boxes and an office full of foxes.” (He also managed to rhyme “ventures” with “counterfeit debentures” in that song.) He strung a series of insincere cliches together for “Blizzard of Lies,” a rueful look at modern life: “You may have won a prize, won’t wrinkle, shrink or peel. Your secret’s safe with me, this is a real good deal.”

Few of Mr. Frishberg’s songs were written in the first person or delved into his personal experiences. “Every song you hear today is about the way the songwriter feels … about some great epiphany,” he told the Record newspaper of Bergen County, N.J., in 1994. “Those kind of songs are boring. They really are.”

At times, Mr. Frishberg cultivated a wistful, retrospective mood, as in “The Dear Departed Past,” where he longs for a time “when basketballs had laces” and “when every sky was bluer … when every friend was truer.” He once composed a song, “Van Lingle Mungo,” that consisted entirely of the names of 37 long-retired baseball players, dropped like jewels into a lilting Brazilian rhythm.

After years as a sideman in jazz groups — which inspired his tune “I Want to Be a Sideman” — Mr. Frishberg began to perform as a singer in the 1970s, always accompanying himself on piano. He had a reedy, nasal voice with little resonance or range, but he became an engaging and laconic interpreter of his own songs. He was nominated for four Grammy Awards and often appeared at concerts, clubs and cabarets.

Yet of the all the songs he wrote, the one probably best known to the public was composed for the children’s educational television series “Schoolhouse Rock!” I’m Just a Bill,” sung exuberantly by Jack Sheldon, offers a whimsical look at how legislation is passed:

Well, it’s a long, long journey to the capital city.
It’s a long, long wait while you’re waiting in committee.
But I know I’ll be a law someday.
At least I hope and pray that I will,
But today, I am still just a bill.

David Lee Frishberg was born March 23, 1933, in St. Paul, Minn. His father, a Jewish immigrant from Poland, owned a clothing store, where his mother was the bookkeeper.

Mr. Frishberg took an early and eclectic interest in music, listening to an older brother’s boogie-woogie jazz records and to the comic operas of Gilbert and Sullivan. He was 8 when he began to study classical piano.

“Then one day I put a Mozart piece into conga rhythm — da da da-dum, da da da-dum,” he recalled to the New Yorker in 1986. “I played it at my lesson, and I was bawled out. I couldn’t believe that doing such a thing was wrong, so I quit practicing and eased out of the lessons.”

He continued to play piano and began working professionally while still in high school. He took music courses at the University of Minnesota, where he majored in journalism. After his graduation in 1955, he spent two years in the Air Force in Utah and began to write advertising jingles for radio. He moved to New York in 1957 and was soon working with notable musicians. During the 1960s, he appeared regularly in jazz clubs and was the pianist for several years in a much-admired group led by saxophonists Al Cohn and Zoot Sims.

In 1971, Mr. Frishberg moved to Los Angeles to write for a short-lived TV comedy sketch show, “The Funny Side,” hosted by Gene Kelly. He wrote for other television productions and spent two years as a pianist with Herb Alpert and the Tijuana Brass. By the time he made his first return visit to the East Coast, he had written “Do You Miss New York?,” a widely recorded song with a bittersweet tone of regret: “Do you miss the scene? The frenzy, the faces. And did you trade the whole parade for a pair of parking places?”

To escape the congestion and high prices of Los Angeles, Mr. Frishberg moved with his growing family to Portland in 1986. He stopped performing after a mild stroke in 2014. Three years later, he published an autobiography, “My Dear Departed Past.”

His marriages to Stella Giammasi and Cynthia Wagman ended in divorce. In addition to Magnusson, his wife of 20 years, survivors include two sons from his second marriage.

When Mr. Frishberg began to write songs, he received encouragement from Frank Loesser, the composer and lyricist of the stage musicals “Guys and Dolls” and “How to Succeed in Business Without Really Trying.”

Loesser and Johnny Mercer were the songwriters he admired most because they “knew that good lyrics should be literate speech that says something in a lyrical way,” Mr. Frishberg told the New Yorker. “They knew that good lyrics come up to the edge of poetry and turn left.”