Which figure of speech is used in this text?
I was just beginning to yawn with nerves . . . when I knew his tattarrattat at the door.
—James Joyce, Ulysses

 - onomatopoeia
 - simile
The text uses onomatopoeia, a word that expresses a sound.
Tattarrattat represents the sound of a knock on a door.