A 21-year-old heavy-metal musician convicted of having sex with a 15-year-old was banned from playing in public for five years by a judge who said he used music to win the favor of underage girls.

Randall Shesto II of Waukesha, described in Internet postings as having performed with a band called Nailwounds, was convicted in June of second-degree sexual assault of a child. He had been accused of having a sexual encounter with an underage girl last December whom he met through MySpace.com.

He was also convicted this year of having sex with another 15-year-old girl.

Waukesha County Circuit Judge Ralph Ramirez sentenced Shesto to 2 1/2 years of prison and 2 1/2 years of extended supervision, but stayed the term and placed Shesto on probation for five years. He was also ordered to serve a year in jail — including one month behind bars and 11 months on work release.

"You love your music," the judge told the defendant. "Your music has been the tool by which you have ingratiated your way into the lives of these girls. You may not play in a band in any public appearances during the term of your probationary period. I'm taking away from you the tools by which you worked your misdeeds, sir."

Shesto was ordered by Ramirez to register as a sex offender and told that, while he is on probation, he cannot have access to the Internet or a cell phone unless approved by his probation agent.