You are reading a single comment by @Gordon and its replies. Click here to read the full conversation.
  • Ahh ok, so you're basically saying:

    • There's some input device which is wired up to an Espruino WiFi (not via MIDI)
    • You want the Espruino WiFi to create MIDI data based on the input from that device and then send it over WiFi?

    The existing MIDI module only receives MIDI commands by the look of it, so if you're sending them you'll have to roll your own, but that's not too hard... And I assume that MIDI over TCP really is just sending the same raw MIDI data but over TCP not Serial?

    All you need to do is follow the code atĀ­s to create a socket connection, then when you're connected you send the raw MIDI data with client.write(); - you just want to make sure you send the data as binary, so something like:

    function sendNote(channel, on, pitch, velocity) {
  • Yes, MIDI over TCP is just the same MIDI command sequence, only over a TCP connection instead of serial connection. I'm sure there's some kind of "hey this is a MIDI packet" header or something, which I'm still researching, but the MIDI part is typical MIDI.

    Thanks for the info, I'll start working on it. And I'd be happy to submit the module to the Espruino project when I'm finished.


Avatar for Gordon @Gordon started