# MidiOut-\>sendMessageNow doesn't flush on short sysex mess

**URL:** <https://forum.juce.com/t/midiout-sendmessagenow-doesnt-flush-on-short-sysex-mess/2515>\
**Category:** Windows\
**Created:** [January 18, 2008, 12:06am UTC](https://forum.juce.com/t/midiout-sendmessagenow-doesnt-flush-on-short-sysex-mess/2515 "2008-01-18T00:06:15Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![jaunt](https://avatars.discourse-cdn.com/v4/letter/j/e19b73/32.png) [@jaunt](https://forum.juce.com/u/jaunt)\
**Post date:** [January 18, 2008, 12:06am UTC](https://forum.juce.com/t/midiout-sendmessagenow-doesnt-flush-on-short-sysex-mess/2515/1 "2008-01-18T00:06:15Z")

</div>

Hi,

Sending “F0 00 F7” doesn’t seem to transmit until another sysex message is sent later. I think it might be because in juce\_MidiOutput.cpp, if the message size is not greater than 3 bytes, midiOutShortMsg is being called, and I don’t think midiOutShortMsg works for sysex messages.

Best regards,

Stephen

PS. Juce is amazing.

---

<div class="post-metadata">

**Author:** ![jules](https://avatars.discourse-cdn.com/v4/letter/j/41988e/32.png) [@jules](https://forum.juce.com/u/jules)\
**Post date:** [January 18, 2008, 9:28am UTC](https://forum.juce.com/t/midiout-sendmessagenow-doesnt-flush-on-short-sysex-mess/2515/2 "2008-01-18T09:28:23Z")

</div>

Hmm - ok, that’s interesting. How about this tweak to juce\_win32\_Midi.cpp:

[code]void MidiOutput::sendMessageNow (const MidiMessage& message)  
{  
const MidiOutHandle\* const handle = (const MidiOutHandle\*) internal;

```
if (message.getRawDataSize() > 3 
     || message.isSysEx())
{

```

[/code]

---

<div class="post-metadata">

**Author:** ![jaunt](https://avatars.discourse-cdn.com/v4/letter/j/e19b73/32.png) [@jaunt](https://forum.juce.com/u/jaunt)\
**Post date:** [January 19, 2008, 1:10am UTC](https://forum.juce.com/t/midiout-sendmessagenow-doesnt-flush-on-short-sysex-mess/2515/3 "2008-01-19T01:10:42Z")

</div>

Seems to do the trick. I’ve tried it in my test application and now 3 byte sysex messages are passing successfully.

Cheers,

Stephen
