Cacophony is a figure of speech in which harsh, unharmonious, or dissonant speech sounds are sometimes used deliberately by writers, especially poets, to achieve a particular effect. It is the opposite of Euphony.
Example 1; A well-known example occurs in Tennyson’s Morte D’Arthur:
Dry clashed his harness in the icy caves
And barren chasms, and all to left and right
The bare black cliff clanged round him, as he based
His feet on juts of slippery crag that rang
Sharp-smitten with the dint of armed heels –
And on a sudden, lo! the level lake,
And the long glories of the winter moon.
The alliteration and assonance of the first five lines are self-evidently rough; the last two lines, containing the same devices, are mellifluously smooth and euphonious.
Examples 2; William Shakespeare uses Cacophony in Lady Macbeth’s famous speech in the tragedy “Macbeth”
Out, damned spot! Out, I say!—One, two. Why, then, ’tis time to do ’t. Hell is murky!—Fie, my lord, fie! A soldier, and afeard? What need we fear who knows it, when none can call our power to account?—Yet who would have thought the old man to have had so much blood in him.