A named constant array is pretty easy; the question is how much it should look like the equivalent PBASIC statements. I mean, here's ugly raw C that does it:
struct {int index; unsigned char data[];} playdata =
{0, {
0x81, 1,
0x42, 1,
0x24, 1,
0x18, 2
}
};
#define PLAYER_READ(pd) (pd.data[pd.index++])
#define PLAYER_RESET(pd) pd.index = 0;
void loop()
{
unsigned char bits, time;
PLAYER_RESET(playdata);
bits = PLAYER_READ(playdata);
time = PLAYER_READ(playdata);
setport(bits);
delay(time);
}
getting it to more exactly match the semantics of PBASIC READ (what to do after all the data is read, for instance) is harder, and hiding C ugliness (" What's "struct" do? It's not in the arduino manual!"), using EEPROM or flash to save ram space, and so on, are all ... additional effort.
(I always wanted to write an "LED blinking" language a lot like your "digital player piano." Alas, it tends to quickly suffer from feature bloat...)
[Question for the arduino experts: if I use the gcc primitives for putting data in EEPROM, does the arduino utility load the EEPROM when downloading a sketch?]