Have you emptied and cleaned any filters within the machine, recently that might help.
Do you leave the clothes in the machine quite a while after they have washed. The damp enclosed drum seems to cause them to smell or even not drying the clothes quick enough i.e if there was a backlog of washing and some just washed wet clothes are left for 3hours before drying they can go smelling so I dry mine straight after washing.
I try and use bounce dryer sheets to make the clothes smell nicer.
Are you putting enough washing powder and conditioner in the machine maybe you put less in sometimes and they purely dont clean as well.
also the water pipes leading to the machine may want to be cleaned as they can collect a lot of smelly gunk.
i do mine about once every 2 months.
have a look