[directmusic] How can I send a 0xf8 to a midi port?

  • From: "Giovanni Rovatti" <giovanni.rovatti@xxxxxxxxx>
  • To: <directmusic@xxxxxxxxxxxxx>
  • Date: Fri, 31 Oct 2003 20:00:18 +0100

I'm using direct music, and I should send a 0xf8 to a midi port.
I tried with this:

DMUS_MIDI_PMSG *pMidi;
if ( SUCCEEDED( m_pPerformance->AllocPMsg( sizeof(DMUS_MIDI_PMSG),
(DMUS_PMSG**)&pMidi )))
{
    ZeroMemory(pMidi, sizeof(DMUS_MIDI_PMSG));
    pMidi->dwSize = sizeof(DMUS_MIDI_PMSG);
    pMidi->rtTime = 0;
    pMidi->dwFlags = DMUS_PMSGF_REFERENCETIME;
    pMidi->dwType = DMUS_PMSGT_MIDI;
    pMidi->dwPChannel = 0;
    pMidi->dwVirtualTrackID = 0;
    pMidi->pTool = 0;
    pMidi->pGraph = 0;
    pMidi->dwGroupID = 0xffffffff;
    pMidi->bStatus = 0xf8;
    pMidi->bByte1 = 0;
    pMidi->bByte2 = 0;
    m_pDirectMusicGraph->StampPMsg( (DMUS_PMSG*)pMidi );
    m_pPerformance->SendPMsg( (DMUS_PMSG*)pMidi )))
}

and read the port with a midi monitor.
Nothing arrives.
The only way I succeeded is sending a DMUS_SYSEX_PMSG with only a 0xf8 in
the data (without the 0xf0 at the beginning and the 0xf7 at the end). In
this way the midi monitor read 0xf8, but I'm not sure this is a correct way
to send the data, as I don't want to send a sysex but the midi clock
message.

Can someone help?

Bye,
Giovanni


Other related posts:

  • » [directmusic] How can I send a 0xf8 to a midi port?