Pharrell Williams insists he wasn't thinking about Marvin Gaye or the soul legend's song Got To Give It Up when he wrote Blurred Lines for Robin Thicke.

The hitmaker and producer testified in court on Wednesday (04Feb15) in the ongoing copyright infringement dispute between the brains behind the 2013 hit and Gaye's kids, who maintain Blurred Lines steals hooks and notes from their father's 1977 song.

The Happy singer said he may have channelled the vibe and essence of Gaye's song, but he didn't copy any aspect of it.

Williams took the stand and told the Los Angeles court, "I must've been channelling that feeling, that late-70s feeling."

He then acknowledged he told journalists during interviews he pretended he was Marvin Gaye in the studio, but insisted he only said that when he realised his song reminded him of the late soul legend's style.

Williams told the court he grew up listening to Gaye and added, "I respect his music beyond words."

Asked to describe his writing process, he explained, "Once you have a groove, then you're pretty much allowing the groove to tell you what's next... The feeling of the melody tells you what you should be talking about."

‎Thicke testified last week (ends27Feb15) that he lied about his involvement in writing the song, confessing he was drunk and high in interviews and trying to take credit for writing the song.

Gaye's children maintain they are entitled to a cut of the song's profits and Thicke's touring money as a result of the success of Blurred Lines.

The trial continues.