Onomatopoeia is a literary device which is characterized by the use of the words which express the sounds of the objects or actions. It is usually associated with natural sounds. The primary purpose of this literary device is to intensify the visual and auditory aspects of any literary work (poem, story, etc.). Some examples of onomatopoeia are words such as hiss, buzz, meow, roar, rustle, etc.
In Macbeth, there are many instances of this literary device being used:
The raven himself is hoarse
That croaks the fatal entrance of Duncan
Under my battlements.
This example illustrates the use of onomatopoeia, whose purpose is to intensify the sense of ominousness, danger and tragedy in this scene. The arrival of Duncan at Lady Macbeth's home will result in his death.
Another example of onomatopoeia is seen in the cauldron scene:
Thrice the brinded cat hath mew'd ...
Thrice and once the hedge-pig whined.
In this scene, the usage of onomatopoeic words serves to depict the brutality of the witches that use animal parts to create their evil potions. The image of the boiling cauldron is also expressed here:
Double, double toil and trouble;
Fire burn, and cauldron bubble.
Onomatopoeic words in Macbeth help readers visualize various situations and actions more vividly, like the gruesome details regarding the witches' potion.