Does anyone know how to make a wireless MIDI to Bluetooth adapter? I have a USB B input and wish to make it wireless. Looking at making one for a project. Any advice?
As hardware, you need a BLE radio device, and a USB host (or OTG) device, and a microcontroller. (Both BLE and USB devices are typically integrated in a microcontroller, but I am not aware of any microcontroller that integrates both.)
Then you need to write software: a BLE-MIDI implementation, and host support for USB MIDI.
You can do this perhaps using an Arduino DUE?
https://learn.sparkfun.com/tutorials/midi-ble-tutorial/create-a-basic-ble-peripheral
and
https://github.com/bbx10/USBH_MIDI/tree/due
Would require a bit of work though 🙂
Three versions in this article. None look like easy builds.
https://www.hackster.io/joebowbeer/usb-ble-wireless-midi-adapters-25dd31
Teensy 3.6 if you want a USB host with full midi capability otherwise a teensy 3.2 or 3.5 will do and has midi over usb built in, then the Adafruit nRF8001 shield works great with the BlePeripheral library if you follow the SparkFun tutorial posted above you can easily create A midi peripheral.
I am not sure I am qualified to answer this but for what its worth my limited experience with using the audio (not midi) over bluetooth, bluetooth seems to introduce a lag and playing the instrument while listening on a bluetooth headset was not practical. Therefore I would imagine the same would go for MIDI over bluetooth. Since MIDI is real time critical you may be unhappy with the result so my gut feeling is that you may be wasting your time. Rod
It is easy to do with serial midi if available. With usb host it would probably be much harder.
I made a couple of adapters serial midi to BLE using an ESP32. Super easy, it only takes 4 wires a couple of line of codes with the midi pipe function of the "control surface" library.
The latency is minimal when I use it to play on my iPad, it's barely noticeable.
I posted the code on the control surface library github page if anyone is interested:
A ESP32 / BLE example:
#include
#include
void setup()
{
pinMode(17, OUTPUT);
pinMode(16, INPUT);
pinMode(2, OUTPUT); // grün
pinMode(4, OUTPUT); // rot
Serial.begin(115200);
Serial2.begin(31250, SERIAL_8N1);
BLEMidiServer.begin("Basic Midi device");
Serial.println("setup");
}
bool blink = false;
unsigned long red = 0;
unsigned long green = 0;
unsigned long ms = 0;
bool connected = false;
void loop()
{
ms = millis();
//digitalWrite(4, !red);
if (ms >= green || ms + 100 < green)
green = 0;
digitalWrite(2, !green);
digitalWrite(4, BLEMidiServer.isConnected());
if (BLEMidiServer.isConnected() != connected)
{
if (connected)
Serial.println("wifi connection is broken");
else
Serial.println("wifi is connected");
connected = !connected;
/*
BLEMidiServer.noteOn(0, 69, 127);
delay(1000);
BLEMidiServer.noteOff(0, 69, 64);
delay(1000);
*/
}
while (Serial2.available())
{
// im 250 ms Takt wird 0xFE gelesen (active sensing)
char ch = Serial2.read();
Serial2.print(ch);
//Serial.println(ch, HEX);
green = millis() + 2;
}
}
check this video, maybe it will help u)
You can build one with a Raspberry Pi Pico W and a few connectors. Project details here: https://github.com/rppicomidi/ble-midi2usbhost
Try to make, like in video - https://www.youtube.com/watch?v=5peRGrayIJA&ab_channel=KontinuumLAB
I think it will be helpful
Hello
I've previously worked on a project like this. You can utilize a Bluetooth transmitter in conjunction with a MIDI-to-USB adaptor. First, attach your USB B input to a USB host using a USB shield, such as an Arduino or Raspberry Pi. Next, send the data wirelessly using a Bluetooth module—the HC-05 or something similar—into the world. Writing code is required to manage the MIDI data transfer. Online lessons are available to walk you through each step of the procedure. I hope your project turns out well!
Regards
David Warner
<a href=" removed link " target="_blank" rel="noopener">Purva Aerocity