Authorised pipers will be allowed to play in Castlehill and Lawnmarket
Bagpipers on Edinburgh's historic Royal Mile have been told they will be arrested if they continue to play.
Lothian and Borders Police said they receive up to 100 calls a day about the bagpipe noise and have to commit too many resources to dealing with it.
About 20 regular buskers have been asked to sign "acceptable behaviour contracts" banning them from performing in Castlehill and Lawnmarket.
If they do, officers said they could be arrested for a breach of the peace.
The police have said they are responding to a very real problem which has been troubling people living close by.
City centre Insp Bruce Johnston told the BBC Scotland news website: "Some days it was from eight in the morning through to 10pm at night. They were disturbing a lot of elderly people and students studying for exams.
"It is more important for the residents to have a normal, healthy life.
"We explained that we would take their pipes away and they would not want that.
"We really don't want to go down that road, but we told them that if we have to we will".
The contract also informs the buskers that if the playing continues after warnings are issued, anti-social behaviour orders would be issued.