title: PLATFORM_API_MacOSX_MidiOut.c: 162->Invalid message:
body: <p>Hello everyone I have been digging the javax.sound.midi Api and I came across with the issue that I think is not related with the library itself but something related with mac. Well I have this simple code to send a Timing clock midi message. And receive this red message"PLATFORM_API_MacOSX_MidiOut.c: 162->Invalid message: message status=0xF8 while sending short message". Anyone knows  work around this? thank in advance</p>
  
  <p>I had a look at this source code <a href="https://github.com/JetBrains/jdk8u_jdk/blob/master/src/macosx/native/com/sun/media/sound/PLATFORM_API_MacOSX_MidiOut.c" rel="nofollow noreferrer">https://github.com/JetBrains/jdk8u_jdk/blob/master/src/macosx/native/com/sun/media/sound/PLATFORM_API_MacOSX_MidiOut.c</a>
  And it seem the range of midi message is a bit constrained.</p>
  
  <p>public class TestMidiLibrary {</p>
  
  <pre><code>public static void main(String[] args) {
      MidiDevice.Info[] info = MidiSystem.getMidiDeviceInfo();
      MidiDevice device = null;
      try {
          device = MidiSystem.getMidiDevice(info[6]);
          device.open();
      } catch (MidiUnavailableException e) {
          // TODO Auto-generated catch block
          e.printStackTrace();
      }
  
      ShortMessage msg = new ShortMessage();
      try {
          msg.setMessage(ShortMessage.TIMING_CLOCK);
          long timeStamp = -1;
          Receiver r = device.getReceiver();
          r.send(msg,timeStamp);
      } catch (InvalidMidiDataException | MidiUnavailableException e) {
          // TODO Auto-generated catch block
          e.printStackTrace();
      }
  }
  </code></pre>
  
  <p>}</p>