1

I'm trying to send a MIDI tune request message (246 or 0xF6) with the Web MIDI API and I keep getting a Message is incomplete error in Chrome and Opera. Here is the problematic code:

navigator.requestMIDIAccess().then(function (interface) {

  var outputs = [];

  var iter = interface.outputs.values();
  for (var i = iter.next(); i && !i.done; i = iter.next()) {
    outputs.push(i.value);
  }

  outputs[0].send(246);
  
});

If I substitute the 246 for a similar message number that also does not require additional parameters (248, for example), it works without any problem.

Am I missing something obvious?

djip.co
  • 997
  • 10
  • 17

1 Answers1

2

MIDI messages require a 3-byte array. Try this :

outputs[0].send([246, 0, 0]);
Mel Ferrer
  • 56
  • 5