You haven't said what it is doing, or not doing, that's wrong.
But try this anyway:
{
// NOTE_ON
SendMIDI(MIDICMD_NOTEON, i, 127);
delay(250);
// NOTE OFF
SendMIDI(MIDICMD_NOTEON, i, 0); // Silence the note
delay(250);
}
Pete