@ anonimo
mi sono messo all'opera.
C'è qualche programmatore in questa comunità che abbia esperienza nella programmazione midi ?
così capite che non è uno scherzo
HMIDIOUT handle;
unsigned char Phrase1[] = { 0x99,60,127,0x90,63,127,0x90,68,127,
0x99,60,127,0x90,63,127,0x90,68,127,
0x99,60,127,0x90,63,127,0x90,68,127,
0x99,60,127,0x90,63,127,0x90,68,127,
0x99,60,127,0x90,63,127,0x90,68,127 };
unsigned char Phrase2[] = { 0x91,60,127,0x91,63,127,0x91,68,127,
0x91,60,127,0x91,63,127,0x91,68,127,
0x91,60,127,0x91,63,127,0x91,68,127,
0x91,60,127,0x91,63,127,0x91,68,127,
0x91,60,127,0x91,63,127,0x91,68,127 };
unsigned char Strume1[] = { 0xc0,1,0xc1,50,0xc9,10};
unsigned char *ptr1 , *ptr2 , *str1;
ptr1 = &Phrase1[0];
ptr2 = &Phrase2[0];
str1 = &Strume1[0];
if (!midiOutOpen(&handle, 0, 0, 0, CALLBACK_NULL) )
{
midiOutShortMsg(handle, (*(str1)++ | (*(str1)++ << 8)));
midiOutShortMsg(handle, (*(str1)++ | (*(str1)++ << 8)));
midiOutShortMsg(handle, (*(str1)++ | (*(str1)++ << 8)));
for(int i=0; i< 14; i++)
{
midiOutShortMsg(handle, (*(ptr1)++ | (*(ptr1)++ << 8) | (*(ptr1)++ << 16)));
midiOutShortMsg(handle, (*(ptr2)++ | (*(ptr2)++ << 8) | (*(ptr2)++ << 16)));
Sleep(300);
}
midiOutClose(handle);
}