The phrase “to change one’s tune” means: To speak or act in a different manner; to assume a different attitude; to change the subject, or, especially, to humble oneself.
The school bully sings a different tune after brave Johnny, finally stirred to anger, gives him a thorough licking.
And such has been the case, similarly expressed, for some six hundred years.
Thus John Gower wrote in his Confessio Amantis (1390), “O thou, which hast desesed (disseised) The Court of France be thi wrong, Now schalt thou singe an other song.”
Because the saying is so old we can assume that it arose from frequent use among wandering minstrels of the Middle Ages who, traveling from court to court, found it discreet to change the wording of the songs they sang to meet the boasts of each successive baron.