Audio Playback and Recording

I am working on an LED Touch Instrument. The device uses LEDs in light sensing mode as a button. I would like my board to remember a sequence of touched LEDs and be able to "record" and "playback" this sequence.

Does anybody have any suggestions or code examples for me?

I would like my board to remember a sequence of touched LEDs and be able to "record" and "playback" this sequence.

Remember this where?

For how long?

In the original order, or in the original order with the original interval?

PaulS:

I would like my board to remember a sequence of touched LEDs and be able to "record" and "playback" this sequence.

Remember this where?

For how long?

In the original order, or in the original order with the original interval?

I would like the Arduino Mega to use its own flash memory to record the sequence. Also, I was planning on having "Record" button/toggle that starts the recording and ends it. There will be another button that will "playback" this sequence.

I would like for the recorded sequence to be stored exactly as the orginal sequence.