Where in lines 13-18 is alliteration used to create onomatopoeia? What are the examples of onomatopoeia in lines 1-24?
Alliteration refers exclusively to the repetition of the initial consonant sound of words. The initial lines of this stanza read, "And the silken sad uncertain rustling of each purple curtain / Thrilled me [...]" (lines 13-14). The "s" sound at the beginning of "silken" and "sad" is alliterative and it describes the sound made, perhaps, by a silken curtain rustling in a light wind. However, "silken sad uncertain rustling" contains four instances of the "s" sound: at the beginnings of "silken" and "sad," then in the middles of "uncertain" (the soft "c") and "rustling." Because not all of these "s" sounds are at the beginnings of words, we wouldn't refer to the entire phrase as an example of alliteration, but it does seem appropriate to consider all four repetitions of the sound, though, since they are so close to one another and are much more striking than just considering two repetitions.
As for examples of onomatopoeia in the first twenty four lines, "rapping" and "tapping" would both qualify, as would "muttered" and "rustling." All of these words sound like the sounds they describe.