Pharrell Williams says the secret to making great music is ditching your ego.

The 'Happy' hitmaker insists a big ego can often make people delusional, helping them to believe they did an excellent job when they haven't, and thinks the best tunes are a result of musicians tapping into their ''feelings''.

He told Red Bulletin magazine: ''Is the music legible to people's interpretation?

''It might not be because your ego told you that you killed it. But if you could remove your ego and only use your feeling, that is when the best stuff comes out.''

The 40-year-old singer also believes the music industry works ''off emotion'' but insists success isn't his ''doing'' since he can't control the records people buy.

He said: ''Our business works off emotion, and it is not really easy to quantify it outside of what it is. It is like saying 'Well, are you afraid of how the ball is going to react to the ice hokey rink?'

''No, because that is not what it is meant for. The puck is for that world and the ball is for another world. Emotions are just emotions. So when a song works, you should just be thankful, because that is not why you do it.

''So any kind of success that I have ever had on a song is not my doing. So you don't do it for that, because I can't control that. I do it because I feel like it feels good and it may resonate with other people. So it is not really good to mix the idea of what success is and the purity of why you do something.''