A teenage drink-driver has taken an unusual route to avoid conviction.

Rather than sitting in the dock listening to a lecture from a judge, student Alexander David James Grant (18) sat in the Dunedin District Court this morning while a song he composed rang out.

The highly unconventional step came at the request of Judge Michael Turner who took the defendant's guilty plea last year.

Upon hearing Grant had musical talent, he suggested the teen write a score about his experiences.

The result exceeded his expectations.

The piece, featuring acoustic guitar and piano features the lyric: “make a choice to rise above it all”.

Grant told the judge he wrote it as a letter to his former self “trying to teach the ways of actually thinking”.

It took three days to write and four to record, he said.

Defence counsel Cate Andersen described her client's song as “extraordinary” and police prosecutor Tim Hambleton voiced his approval too.

Grant, the court heard, had completed the Right Track programme – a course provided to show dangerous drivers the possible repercussions of their actions to stop them re-offending.

Judge Turner said the defendant had completed it with distinction and he hoped the song would be used as “a theme tune” for the programme.

Grant, a first-year student living in university halls of residence last year, had been drinking with friends on August 7.

His mates talked him into driving to get them food before he was stopped on George St.

An evidential breath test gave a result of 1077mcg – more than four times the legal limit.

While Judge Turner raved about Grant's music, he was not impressed by his conduct that night.

“You made a very foolish decision . . . you were a risk to yourself, others in the car and other road users,” he said.

However, the impact of a conviction on a young man, the judge said, would be harsh, given the lengths he had gone to to show his remorse and insight.

Grant was discharged without conviction.

Judge Turner said he could not remember the last time he had granted such an application for a drink-driver.