How to make your own MIDI over Bluetooth instruments
ฝัง
- เผยแพร่เมื่อ 5 ก.พ. 2025
- This is a step by step tutorial tutorial on how to make a basic wireless MIDI instrument, using MIDI over Bluetooth, with Arduino and an affordable ESP32 board.
I'll show you every connection and component, every bit of code and the libraries that you'll need to get your own wireless MIDI instrument up and running.
(Except!!: I forgot to mention that before installing the ESP32 board package, you have to go into the Arduino Preferences menu and in the field that says: "Additional Boards Manager URLs:" you have to post in the following link:
"dl.espressif.c..." (Click this reduced link and then copy paste from the address bar)
Thanks Álvaro Lozano for pointing that out.
Get the example code here: github.com/Kon...
MIDI library documentation: fortyseveneffe...
Examples of some more elaborate instruments: • DIY wireless MIDI with...
More information about the KontinuumLAB: www.kontinuuml...
Absolutely in love with the simplicity of this tutorial.
Please, keep us engaged ;)
Well done! Such a good, no nonsense tutorial. This could also serve as a great introduction for anyone who's never used the Arduino environment before, because you leave no steps out, you show how easy it is to get Arduino set up and then get pretty amazing results so quickly with such few lines of code. You rock. Keep up the good work!!
I totally love this. We had just start teaching our kids programming, and this will be a super fun project to introduce them to arduino. Thank you for showing how easy it is to get started!
Great! Hope you and your kids have fun with it :)
Funny how you pressed the button harder to get more velocity, while there is really no need for that. It's like leaning in curves when playing a racing game ;)
Good tutorial, opens op a lot of inspiration!
That cardboard guitar thingy is the prettiest thing I've seen in a good while 😍
Obrigado pelo excelente trabalho que vem realizando. Você é nossa inspiração... Tenho uma pergunta: Você já pensou em usar os pinos touch do esp32 em seus projetos?
I want to ask? what about the bluetooth latency
There is a way to use rotary encoders with esp 32 as ble midi controller?
Yes.
To improve the experience you may consider increasing size of code sections..I couldn't read the code
Thanks for a great tutorial, it's been very helpful with my project. I'm wondering if it's possible to connect to my Macbook using BLE? For some reason the device never shows as an option in the bluetooth settings....
EDIT: to anyone trying to figure this out in the future, I had to connect via the Audio MIDI settings on my MacBook. There's an option for Bluetooth in there, connecting via the "normal" Bluetooth settings wouldn't work for me.
Thanks again for a great tutorial!
You are an absolute life saver. Was going mad!
Is there any noticeable latency when using bluetooth that would interfere with using this for percussive instruments?
Yes and no.... I've found that latency depends on the phone, not the ESP32. My cheap Android phone will sometimes make a slow connection. I disconnect and reconnect to solve that. Also, it's best to not have other apps running in the background. When I get a good connection, latency is negligible. I talked about that a bit in this video: th-cam.com/video/zFWH0xxBsnQ/w-d-xo.html
Sir make a video in which mobile can connect drum machine to wireless midi and play it.
❤Hi can I use Lolin 32 V1.0.0 Instead of Lolin 32 lite ? Plzzzz Reply ASAP ❤
Thanks but this is a midi _controller_ . The _instrument_ here is the phone. Do you have anything on creating an esp32 midi instrument?
This is Gold!
One question 🙋♂️,while using it on windows it have direct midi connection or does it need an external program like hairless midi?
I’m appalled at the level of views these videos have. I know I have to be one out of a billion people that want to learn this stuff!
Feel free to tell the other 999.999.999 🤣
Lol, I will try my best!
Hello!
I have an idea for a project that I think should be pretty simple but I haven’t found any good examples of it online yet. I’d like to build an artificial sound machine for small electric vehicles so that drivers/ pedestrians can hear you coming. It should be easy enough to use the 0v-4v signal from a standard hall throttle to modulate the sound along with the speed right??
I believe lots of people will have interest in a device like this, especially because many countries will soon be enacting new laws that require small electric vehicles to play sounds for safety.
I am about to order a teensy microcontroller and hopefully I will be able to figure this out. When I had the idea I immediately thought of you because I imagine this would be a simple project for you.
If I have any questions while working on this I might ask you if you don’t mind…. Or if you wanted to I think it would make a great subject for a video, and would likely bring many other viewers to your channel.. just a thought.😄
Thanks always! I would like to buy all the parts and to know if i can buy it from you. If so please inform me how I can contact to you. If not, please help me how and where I can buy it.
Vraiment super. Bravo
This is excellent content.
This is an excellent comment.
Can you use just the wire (due to latency?)
Hello sir, i want to know about how to mpr121 capacitive sensor connect button or arcade button is it possible or plz help me about this and how to note assign a specific note or midi note
I can’t figure out how many analogio’s this has… is it only one? And do you have any recommendations on a multiplexer?? Thank you so much. Can’t wait to get your kits!
16 analog inputs
Awesome content as always! I made a custom "flute" with a Feather 32u4 Bluefruit, which works both through USB and MIDI-BLE. I still have a WIP version 2 with a Teensy (for working standalone) and a Adafruit BLE SPI Friend, but haven't finished it yet. It will have an air sensor based on your videos about wind instruments, thanks A LOT for that, it never occurred to me that approach!
I guess my v3 is going to be based on ESP32!
Greetings from Argentina :D
PS: if I go to Barcelona next year I'll send you a message to see if you have a workshop running or something like that
Thanks for your comment Gonzalo! The feather boards are really nice. The main advantage with the ESP32 is that it has a lot more memory than the 32u4, and of course it's quite cheap. But you won't get MIDI over USB from it, so that's something to keep in mind.
Drop me a line if you stop by Barcelona. I live and work outside the city now, but I'll let you know if I have some workshops planned.
Good luck with your wind instrument projects!
@@KontinuumLAB Thanks mate! I think maybe next year, around September, I might travel to Spain. Will let you know ;)
Also, now that you mentioned it, I did a quick google search and guess what? It looks like now there are some ESP32 boards with native USB :O (didn't know that until now). Look for ESP32-S2 (there is a WeMos ESP32-S2 Mini, for example).
Can we use this esp32 board to control a bluetooth speaker
Yes you can. Check out Arduino audio-tools library
these can even work with Arduino nano with hc-05 bluetooth module?
I'm making my Midi flute using ESP + Midi BLE, but have some delay with FL Studio. My loop delay is only 10ms, but I'm feeling more using the software. Some have a suggestion?
i have a arduino nano board. can i ad an esp32 breakout board to make it the same as yours?
No, you will need an ESP32 instead of the Arduino.
Inspiring video and I have a breadboard MIDI controller working using your tutorial and a LOLIN D32, however ...
BLE MIDI Connect is not compatible with Android 13 😢
I have written to the developer to ask if they plan to make it so, but in the meantime do you know of any other BLE MIDI connection utilities that might work on Android 13?
No, I'm afraid Android 13 just sucks. Sorry...
Thank you to make it easy to us ! At least.. it look easy ;-)
My pleasure.
Thanks for this lesson/tutorial
I was able to make it work with android like in the video,
but I don't know how to make it work in the linux =/
Do you have any idea?
I figure it out, I had to recompile bluez using --enable-midi, and disabled my selinux
Thank you for the video! - I have a question: the first time I used the device it worked fine, but after the first time, the controller stopped working and the MIDI BLE App as well as the Synth app can't see it. Oddly, the Android phone normal BLE keeps seeing it and contacts with it, did you ever experienced something like this??
I'm not sure. Maybe your phones "normal" BLE is pairing automatically as soon as it sees the device looking for a connection...? If the LED on the device isn't blinking, that would mean it's paired already, so can't be seen through the BTLE and synth apps. If your phone has a setting for automatic pairing, then switch that off and try again.
Hi everybody. Your work is good and deep. I have few question to ask. I try to control ableton from Android with midi commander app. I tried to make a midi ble bridge to USB midi with a esp32-C3.. But it doesnt work. I receive midi message from Android app to esp32. But i can't go further. I tried with hairless midi serial bridge, but nothing incoming. Any ideas ? Thx.
the C3 (and C6, H2, and S2) can only do midi via the serial interface. For Ble-midi, you need a regular esp32 or the S3 version, which can also do usb-midi.
So, is there a version of this with Classic Bluetooth instead of BLE? Thank you!
Nope, sorry...
Thanks, cool video. But I was actually looking for a way to use an ESP32 as an alternative to a BLE MIDI adapter like Yamaha UD-BT01. Seems like this is part of the way there, but I have no idea how to do the next step. I wnt to hook this up to USB cable output of a controller to get midi from a controller into the ESP32, so the ESP32 can relay it via Bluetooth to a computer/synth. Any clues on how this can be done, or where I should look for more info online?
This should not be too hard if the ESP32 is that similar to Arduino. You can very easily build a MIDI DIN port with a handful of components. Look up notes and volts Arduino MIDI tutorials here on TH-cam
As for the USB MIDI integration part... That might take a bit more digging, but there was ways of doing, I am sure. Maybe look into building MIDI interfaces with Arduino
@@Queer_Gabe Thanks for the suggestion. That would work, but the controller I'd want to mount this on doesn't have a DIN MIDI jack, only USB midi. Could still probably work with USB interface cable, but getting messy. I think what I'd want is a bluetooth capable microcontroller that has bluetooth and can work as a USB Host, (required to connect to USB midi from controller device). Anyway, not sure what I'll end up doing, but the various options are becoming more clear. So far I'm using devices from Adafruit, and it seems like their code and tutorials are geared towards making things fairly easy.
Bluetooth Latency?
Why did they go with BT Instead of WiFi?
Hello, wonderful project. I did all the steps exactly as you did In the video but I'm am getting error with the code. Can you help with this? Also the kit on your website is sold out, can you tell us when it will be available?
I'm trying to use this with Macbooks, and even though it compiles and uploads, none of my Macbooks recognize it in bluetooth. I have three different Macbooks (2014 Intel, 2022 M1, and 2023 M2), and none of them see it. I have tried completely uninstalling the IDE, and reinstalling, and even installed the old version (1.8.3) with no success. Of note is that SerialBT works fine on any of the three boards I have tried (Wemos Lolin 32 Lite, ESP32WROOM32, and ESP32WROOM32U), but no luck on any of them with the LE-MIDI. Any ideas?
For anyone who cares, this turns out to be BLE encryption related. If anyone knows of an alternative library that supports encryption, I'd be very grateful.
Have you had any luck doing this with Windows? I've found it just auto disconnects the device after pairing when using the ESP32-BLE-MIDI library.
Yes, this is working on my windows machine, as well as my Linux laptop.
The only thing I've found different in Windows is that I had to uninstall the "Arduino-BLE" library to get the upload to work correctly
@@KontinuumLAB Hey, thanks to this video I was able to confirm my code works on my phone, but I am still not sure if it works on Windows. I was hoping I could use it with Voicemeeter to control my audio volume but it seems that it does not recognize the device (it recognizes it if using MIDI over USB).
I am wondering what you used to test if it works on Windows and if you needed to download some software to make Windows recognize it.
Amazing ,thanks
You're welcome
THIS ISNT WORKING FOR ME, SUGGESTS nIMBLE BUT THEN I GET LOST IN CODING. ANY SUGGESTIONS?
Don't know what your specific problem could be, sorry...
think i got it figured.
thank you
When I open SynprezFM and scan BT devices, it prompts "AWESOME_INSTRUMENT connected" but inmediatelly it prompts "AWESOME_INSTRUMENT disconnected". I've tried multiple libraries, different apps, and nothing works. What can I do? Thanks!
Need much more info to even try to answer that. Which ESP32 are you using? What libraries? What apps? Do you have MIDI-btle installed? Does your ESP LED turn on/off?
@@KontinuumLAB the same as you, except board (az delivery esp32-wemos-32). LED works as espected. I've read about android bug. Two times (without change esp code) has conected and worked.
@@KontinuumLAB restarting process, installing arduino etc. What link did you use to include ESP32 board? I think this can be the problem (duplicated libraries)
Once you install the ESP32 board package in Arduino (exactly like shown in the video) you have to pick the specific board that you're using from the boards menu. Don't know what you mean by "link"
@@KontinuumLAB by default, arduino IDE doesn't include ESP32 support and ESP32 doesn't appear on board manager. You have to put a link on file > preferences > additional boards manager url. I've installed evereything again in two PCs (different versions OF IDE, board, etc and also tried the same as the video) and didn't work. Can you paste your detailed output during compile? (during compilation I have two different BLE libraries and give me error, if I delete ArduinoBLE it compiles ok but doesn't work; else returns "freeRTOS/buffer" error). I'm going crazy whit this
Thanks Always, BTW i faced an error as below, can you advise on this?
Unable to find executable file at C:/Users\User\AppData\Local\Temp\arduino\sketches\BEB453D64B56EB3FB53D687219CF699B\sketch_nov10a.ino.elf.
Thanks Always!, I have an error from compiling as follows, 'Multiple libraries were found for "BLEDevice.h"
Used: C:\Users\USER\Documents\Arduino\libraries\ArduinoBLE
Not used: C:\Users\USER\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.0.7\libraries\BLE
exit status 1
Compilation error: exit status 1',
So, I changed the file under the Documents folder to make the computer use the second on e, but it still gives me an error as follows,
'In file included from C:\Users\USER\AppData\Local\Temp\.arduinoIDE-unsaved20241019-7108-1ssp5c9.pbcqk\sketch_nov19a\sketch_nov19a.ino:2:
c:\Users\USER\Documents\Arduino\libraries\BLE-MIDI\src/hardware/BLEMIDI_ESP32.h: In member function 'virtual void bleMidi::MyCharacteristicCallbacks::onWrite(BLECharacteristic*)':
c:\Users\USER\Documents\Arduino\libraries\BLE-MIDI\src/hardware/BLEMIDI_ESP32.h:116:55: error: conversion from 'String' to non-scalar type 'std::string' {aka 'std::__cxx11::basic_string'} requested
116 | std::string rxValue = characteristic->getValue();
| ~~~~~~~~~~~~~~~~~~~~~~~~^~
exit status 1
Compilation error: exit status 1'
Please help me out!
Muchas gracias por favor no pares!
Aunque tuve un problema al intentar utilizar la librería (supongo que se actualizo), dejo por acá la solución por si a alguien le ocurriera lo mismo. Sustituir la declaración de la librería por lo siguiente:
#include
#include
#include
#include
#include
#include
Seguro a alguien le ayuda! un abrazo!
Gracias!
Gracias!
Gracias a mi me sirvió , saludos