Recording/retrieving input events with irregular frequency
<p>Just as a toy, I'm using the iTunes SDK and XNA to make my own quasi-GuitarHero game. The actual libraries aren't important, so I didn't tag them. This question is about a data structure.</p>

<p>Basically I want to start playing a song, and allow the user to play guitar to the song, recording in memory the Red/Yellow/Green/Blue/Orange key presses, as well as the strum, to play back later.</p>

<p>I've tried several different techniques, the most accurate being a bitwise <code>int[]</code> array where each element represents a 10ms time slot (and each bit of each int represents a physical key) once as an offset from the song start. This seems inefficient however, as I have to pigeonhole keypresses into these 10ms slots, not to mention a huge array size for a several minute song.</p>

<p>Any suggestions for a better way to implement this? My goal is to then serialize this data structure to disk for retrieval later. The overall goal of this project is to use this data to control LEDs in some fashion to a song, FWIW.</p>

<p>Thanks!</p>
