Nearly 40 years since opening, the historic Haight Ashbury Music Center is closing its doors.

"I'm proud of being able to serve the community of San Francisco for as long as I was here, and I appreciate everyone who's supported me here, but I haven't taken a paycheck in five years," said owner Massoud Badakhshan.

The independent music store, which sells thousands of instruments, audio gear, lesson books and other accessories, first opened under a different name, Acoustic Music, in 1972 by Rodney Albin, the brother of Janis Joplin's bassist, Peter Albin.

In 1976, music producer Leib Ostrow purchased the store and renamed it Chickens That Sing Music. It became a hub for the Bay Area's world music scene — legendary musicians like Mickey Hart from the Grateful Dead and Armanda Peraza from Santana would hang out at the store for impromptu jam sessions.

Then, in 1980, Badakhshan, who hitchhiked to San Francisco in the early '70s, bought the store.

He renamed it Haight Ashbury Music Center, and four years later moved it to its current, much larger location. Many famous musicians have walked through the doors over the years, including Steely Dan and ZZ Top.

"I've been coming here for 40 years, seven days a week," said Badakhshan. "Thanksgiving, New Years, and Christmas are the only days I take off."

Badakhshan also owns a music store in Redwood City called Gelb Music, which he will keep open — it's a different environment from the San Francisco store, he says.

"The demographic of San Francisco has changed a lot," Badakhshan explained. "A lot of our customers have moved out because the tech people have moved in and they can't afford it here anymore. Tech people don't seem to support local businesses — they like buying everything online."

Plus, the Haight-Ashbury neighborhood attracts a lot of tourists — most of whom aren't buying anything at the store.

"It's like a museum for a lot of people, but I don't charge an entrance fee," he said.

As reported by The Chronicle, the Haight has seen an increasing number of empty storefronts in recent years.

Recent business closures in the neighborhood include jewelry/clothing businesses the Tibetan Shop and Earthsong, tattoo parlor Braindrop, and American Apparel. The Haight Ashbury Free Clinic, which opened during the Summer of Love in 1967, also just closed at the end of July.

On the cusp of turning 70, Badakhshan hopes to spend more time with his 11-year-old son after his store's closure.

"It's the end of an era," he said. "But every good thing must come to an end."

Haight Ashbury Music Center will be holding a closing "total liquidation" sale starting Thursday, August 8. It will remain open for a few more months as the store clears its inventory.

Madeline Wells is an SFGate editorial assistant. Email: madeline.wells@sfgate.com | Twitter: @madwells22