A MUSICIAN and songwriter had a USB stick containing more than 300 indecent images of children in his pocket when police raided his home, a court has heard.

Roy Gaynor told officers: "Everything you're looking for is on there" moments after they visited the property in Sea Road, Boscombe, as part of an investigation into the downloading of indecent photographs of child sex abuse victims.

The 68-year-old had a total of 323 pictures and moving images, including 152 in category A - the most serious of the divisions - as well as 26 in category B and 145 in category C.

One distressing film timed at more than six minutes long involved the abuse of a baby less than a year old, while another film of more than 15 minutes in duration involved a youngster under the age of 12.

Gaynor had downloaded the footage and images between March 2011 and March 2015, and told police he had sourced the images "erratically", admitting he found them "titillating".

He said he had started accessing such images following the death of his eldest son from a brain tumour 10 years ago.

At a sentence hearing before a judge at Bournemouth Crown Court, prosecutor Carolyn Branford-Wood said officers from Dorset Police's Paedophile Online Investigation Team (POLIT) attended Gaynor's home after receiving information from the National Crime Agency.

"A search was commenced at the address and in the right-hand pocket of the trousers [Gaynor] was wearing, a USB device was found," she said.

"The defendant was interviewed about the findings made by police. He was remorseful and expressed it, and said he felt very ashamed."

Gaynor, who admitted 16 counts of making indecent images at a preliminary hearing in March, describes himself as a guitarist, singer and 'prolific songwriter' with more than 30 years of experience performing with bands and orchestras on website Starnow.

He performs at weddings, birthdays and anniversaries, and in 2013 wrote and staged a musical called No Pasarán!

Earlier this year, the defendant was seeking performers for a new musical called Up the Ressie, said to be loosely based on his own childhood experiences in 1950s London.

Anne Brown, mitigating for Gaynor, said the defendant has raised tens of thousands of pounds for charity since the death of his son.

"The defendant recognises that he needs help," she said.

"He recognised [that] from the moment the police knocked on the door [and he had] the crashing realisation he had done something very wrong."

Ms Brown said Gaynor ploughed £82,000 of his own money into producing a musical with the express intention that all money raised would be donated to the Brain Tumour Trust, a charity for which he has helped to raise £42,000 in less than a decade.

Recorder Nicholas Haggan QC expressed concern that Gaynor recruits children for parts in his musicals online.

However, Ms Brown said there is "no suggestion whatsoever he has been contacting children on the internet for any nefarious or sexually-linked purpose".

Mr Haggan - who said the images were "disturbing, to put it neutrally" - sentenced Gaynor to a three-year community order, during which time he will work with specialists from the Thames Valley Sex Offender Programme.

He will also been subjected to a Sexual Harm Prevention Order for the next five years.