Three months after Hurricane Maria devastated Puerto Rico's grid, the lengthy repair has left thousands of people relying on generators for energy. Generators power homes, hospitals, stores — and, apparently, the musical imagination.

Singer Joseph Fonseca said he wrote a holiday merengue song inspired by the rumble of his generator.

He thought he was prepared for hurricane season this summer. He owned a propane generator and planned to use it after Hurricane Irma hit in early September and knocked out electricity to his home in Caguas, south of San Juan.

"When starting the propane generator, no working," he said. Instead, it throttled loudly. "Not a good sound."

There was no repairman who could fix the machine because a second hurricane, Maria, was already on its way.

He had solar panels, but some blew away in the storm and the others didn't work without the grid. So Fonseca bought a new hybrid machine fueled by gas and propane. Eventually, he got a bigger, diesel-burning generator to power his house, where he lives with his wife and two daughters.

Fonseca said he relied on generators for 45 days. As he listened to them buzzing, he wrote a song, "La Planta Nueva," or "The New Generator." The chorus means "I will ask the Three Kings to bring me a new generator that doesn't make a noise when I turn it on."

In Puerto Rico, Jan. 6 is Three Kings Day, a religious festival marked with parades and presents to celebrate the story of the Three Wise Men.

In mid-December Fonseca performed at a Christmas party in San Juan's Vanderbilt Hotel. Bellboys in white polo shirts and pants ushered in guests in crisp shirts and elegant gowns.

Inside, Fonseca took the stage and opened with his hit.

He danced on stage as he sang, pretending to pull a cord to start the generator engine. Couples held hands and stepped to the choppy beat.

Outside, Melvin Munic drank a mojito. Munic lives in Cidra, south of San Juan, and works in the planning and purchasing department of Coca-Cola.

"This is our life right now in Puerto Rico," said Munic, who still did not have power. "I hope we have electricity before New Year."

Many people won't get power back anytime soon. The U.S. Army Corps of Engineers estimates it will take until late February at the earliest to restore most of the grid, longer for remote towns.

Fonseca said he was sitting at home a few weeks ago when he saw the streetlights come on. Neighbors poured out of their homes to celebrate.

"I screamed, everybody screamed from the happy," he said.

Copyright 2017 NPR. To see more, visit http://www.npr.org/.