I've see something like this done in a BASIC Stamp book. Here is a link to the pdf of the book on Signals. Go to page 89/137 for IR input and how it uses PWM. I WILL POST THIS LINK NEXT POST - The code is very short but in BASIC - so you will need to try to get it into Wiring. It don't even think your need all of those parts. I would:
START:
- Have the IR Emitter connected to an output pin that is pulsing out a freq
- The IR receiver connected to an input pin and that is determining if the input coming in is high or low.
- Loop back to START if the signal received is HIGH
- else if the signal received is LOW send an output signal at another pin connected to your Piezzo Buzzer.
It seems to me that all you may need is the IR sensor, the buzzer and then a few resistors. If the buzzer needs higher than 5V volts you may need that 9V battery, a transistor and a few resistors. I would just see if the buzzer works getting a high voltage outputted from a pin.
I would really recommend you look at that link I sent you. The book is entirely free to download from parallax's website. Hopefully the psuedo code I sent you will help.