yeah but i want to be able to store the function in an array with the set parameters
Do you? I wonder why.
Anyway, you can do that by making an array of lambda functions like this:
const int COUNT = 100;
int playNote(int midi, int row, int col, int len, bool short_led = false);
void (*SongSeq[COUNT])() =
{
[] { playNote(0x40, 3, 1, 414); } ,
[] { playNote(0x3e, 2, 4, 414); } ,
[] { playNote(0x3c, 2, 2, 414); } ,
[] { playNote(0x3e, 2, 4, 414); } ,
// ... and so on
};
void setup()
{
Serial.begin (115200);
}
void loop()
{
for (int i = 0; i < COUNT; i++)
{
if (SongSeq [i])
SongSeq [i] ();
}
}
int playNote(int midi, int row, int col, int len, bool short_led)
{
Serial.print ("Playing note ");
Serial.println (midi);
delay (100);
}