What figure of speech is the beating a drum stimulates soldier into courage?
The given sentence is an example of a metonymy. Metonymy is a figure of speech in which one word or phrase is substituted for another that is closely associated with it. In this case, "beating a drum" is used to represent the sound of the drum, which is what actually stimulates the soldiers into courage.