Parry Gripp acknowledges that his 2012 hit, “Raining Tacos,” can be obnoxious. He wrote the song with a specific audience in mind: “children and people who like tacos a lot.”
He did not intend for his happy litany about a taco downpour to be weaponized.
The city of West Palm Beach in recent weeks has been blaring Mr. Gripp’s earworm, as well as “Baby Shark,” another maddeningly catchy children’s tune, outside an event center to deter homeless people from sleeping or convening in the area at night.
The approach has drawn criticism from some homeless people and from advocates who are working to get them off the streets. They said that the city should be inviting people in rather than pushing them away, and that the tactic disregarded the root causes of homelessness.
Rodriguez Allen, 53, said he occasionally slept near the event center, the Lake Pavilion at Nancy M. Graham Centennial Square Park, but preferred to sleep in another park that he said was safer. Mr. Allen said the repetitive music was one more way the city was “running the homeless out of town.”
Mayor Keith James of West Palm Beach defended the practice in an interview on Wednesday, saying the nightly, relentlessly upbeat jingles, which were set up by the parks department, are “narrowly directed” to the grassy area around the park. He said the playlist was one small part of the city’s strategy to get homeless people into shelters and houses.
“For whatever reason, this particular tactic — and that’s what it is, one of many tactics — has gotten a lot of attention,” he said. “How did they choose the song? I don’t know. I understand that it can be a pretty aggravating song.”
Cities have long employed design elements such as metal spikes, oddly angled benches and sidewalk barriers to deter homeless people, drawing fire from those who say the tactics are hostile and discriminatory.
And businesses around the country have resorted to auditory deterrents to drive people away, from high-pitched beeping to recordings of chain saws — and even to classical music. A number of cities have outfitted parks and public spaces with devices that blast a high-frequency sound that only teenagers and young people can hear.
But perhaps none have tried to replicate the particular despair of a bleary-eyed parent who can hear “Baby Shark” — the bouncy global phenomenon that for a while brought “doo doo doo doo doo doo” into casual conversation — in her sleep.
Diana Stanley, the chief executive of the Lord’s Place, a group that works with West Palm Beach to serve the city’s homeless, said blasting children’s songs was not the approach she preferred. But she said that the pavilion’s playlist had received outsized media attention and that the causes of homelessness deserved more scrutiny.
“For us to now be talking about a children’s song being looped, I step back and I go, ‘Oh my,’” Ms. Stanley said. “Because I really do think the bigger conversation is: Why is that person sleeping there?”
Nationally, a housing affordability crisis in many towns and cities has led to the homeless population edging slightly higher in 2018.
Palm Beach County appeared to be following suit, with an increase of about 6 percent, according to a recent report. But in West Palm Beach, the number dropped by 24 percent over the last year, according to figures released by Mr. James, who attributed the decline to increased outreach.
Mr. James, the mayor, said that the event center was used for weddings and other gatherings, and that he wanted to ensure that the location remained “inviting” to visitors and families. He said the songs’ greatest effect could be getting people to think more about homelessness.
“I hope people don’t just focus on something people might perceive as anecdotal and humorous,” he said of the audio effort. “Let’s look at the bigger picture. West Palm Beach is not alone. This is a very tough issue.”
But Mr. Gripp, the artist behind one of the songs, said the city’s use of his ode to tacos made him angry. He said he planned to donate to a homeless shelter in West Palm Beach, and to talk to his lawyer about getting the city to stop.
“Something has to be done for these people, and that’s not it,” Mr. Gripp said of the homeless population. “You can imagine how I feel. I’m part of this thing that’s terrible.”