Arduino MIDI Controller Build, Part 1
HTML-код
- Опубликовано: 28 ноя 2024
- I'm finally building one of my dream projects: an Arduino-powered MIDI controller created in the image of a DJ Tech Tools MIDI Fighter. I'm using mini LED arcade buttons along with a Sparkfun Pro Micro as the main hardware for the build.
In Part 1, I go over the thoughts behind the build, the electronics and the code. In Part 2, I'll go over building a final housing and soldering the electronics to a circuit board.
My code for this project: github.com/Bli...
LED Arcade Buttons: www.adafruit.c...
Sparkfun Pro Micro: learn.sparkfun...
DIP Socket for Pro Micro-sized boards: www.digikey.co...
Arduino MIDIUSB Library: www.arduino.cc...
Please subscribe for all of the DIY content your heart desires.
For behind the scenes coverage and general technical & DIY debauchery, follow me on...
Twitter: blitzcitydiy
Facebook: blitzcitydiy
Tumblr: blitzcitydiy.tumblr.com
Instragram: blitzcitydiy - Наука
This is way over my head. I just wanted a button with led to control a servo.
Whatever your doing looks amazing.
I believe that part is called a dip socket. As a guy, I think it's great when women do stuff like this. Microcontrollers, diy electronics, robots, and etc. is a passion of mine too. I found this video to be very helpful. Thank you :)
Great video🙏🏾👍🏿 It’s about time someone did a midi controller video without abelton
what changes would need to be made in order for the note to sound when the button is pressed as opposed to when its released?
FYI: The "standoffs" for the promini are not "for the pro mini" While they are the same size (which is nice) so you can use them with the pro mini they are designed for larger ICs.
I feel your pain with the multiplexers. I have been trying to build a few midi devices with a UNO, but without a mux its pretty limited. The pro micro looks like a good way to go, and USB midi is nice... I'm a bit of a noob, I mainly just wanted to make some cool instruments, (my first project was the Auduino Granular synth) but now I'm spending more time tinkering than making music, and probably being more creative too.
It was a really great board for this project. Other boards that may work, though I haven't tested them with the code are the m0 express boards from adafruit. They have a metro, which is basically an arduino clone form factor, but it's using the m0 processor which can do USB comm with the Arduino IDE, I just haven't tested it with MIDI. I hear you about that creative/tinkering balance, it's very difficult
if it can theoretically handle all of the buttons being pressed at the same time, you could just use the alt output from a micro switch (ex. default closed or open) and have immediate reactions. right?
Can I use arduino pro micro or micro instead of the sparkfun pro micro ?
Hi, how many pins do the XH connectors have? I'm wondering because the link on the website is broken and I'm wanting to do this project. :)
How connect with any software sound program. Select any key music with key arduino
I want to make an controler for my keyboard. When I press a button, the arduino must make a random number and send it to my keyboard and there on i get another tone, sound or effect setting, so I have the option to quickly find another sound to play with, and later on finetune it on the keyboard.
The arduino mega would work great because it has plenty of anolog inputs used for drum triggers.
K Guerrero refer to spikenzie labs xylophone code for Arduino mega having 16 drum pads , but it require Hairless serial to midi converter software. I even updated the Mega' inbuilt firmware called Mocolufa , but not working
so how are the buttons and lights connected to the arduino? is it 1 pin for midi, and 1 pin for the light in the button?
i built a 4 button midi controlle. the buttons work, but i’m trying to figure out how to wire up lights
can made usb pitch bender & modulation wheel for midi keyboard
Thank you for the video; very informative. Did you ever get a multiplexer to work with the Pro Micro? I'm struggling to get multiple pins working on a 4067. I used 3 successfully connected to an Uno using address pins 2,3,4,5 to S0-S3.
I fixed it :)
I got multiple 4067's to work MIDI over USB (both analogue and digital) - many pots and buttons :)
would you recommend using those buttons as footswitches?
hey... what is the gold connector you have used on the jumper wire? i need them.. but i dunno what it's name.
im sorry for asking this but is your build recognized as a midi controller or do you need a converter software?
Don't apologize, that's a really good question! Because of the 32u4 chip on the board and the MIDIUSB library the computer sees the device as a midi controller so you don't need converter software.
Oh that's great!! Continue uploading, your videos are great :D
Thank you!
is there any way to have the buttons play the note as you press instead of as you release? also, could you use this circuit/code to map it with knobs or faders?
Have you had a problem with Bounce? I used this application for a pushbutton to trigger samples but I need to DeBounce as the switch is triggering with some anomalies regarding bouncing. Is there ANY way you could add a debounce to your code for us less intelligent people? please and THANK YOU!
Nice work, seeing this is helping my MMC transport project. I had the same issue with the note sounding on the release of the button, not the start. I inverted the logic on the edge detection, from LOW to HIGH, and got the rising edge. Was confusing for a while, couldn't figure where the latency was coming from. Hope this helps.
How different would this be if it was on an Arduino One?
I've ordered a 9 button mechanical key tester, to wire the buttons in sort-of the same way,but for macro's instead, I should add MIDI functionality too. =)
Yeah that'd be a perfect interface for it! For that you'd probably be able to use a lower voltage board, like one of the Feathers from Adafruit.
arduino micro all the way ! cheap and effective.
Hola me puedes ayudar con un codigo de program change pliss
Very nice. You are making great projects and are very lovely. Someday your channel is going to be big. I play piano so I know a bit about MIDI. I am planning to put sensors on an acoustic piano to send data to a computer. But instead of MIDI, I am going to use serial protocol because is what the software I am going to use supports. But anyway, the problem is that I need 89 inputs (88 keys + pedal). Your project reminds me a little about mine so I want to ask you if you have any suggestion. So far my plan is to use 11 arduino nanos. Each have 8 analog inputs (I need them to be analog), all connected to another arduino by I2C that is going to send the data to the PC by serial.
You might ask: Why use so many arduinos, instead of using multiplexer? Because I want to use as little cables as possible. Everything is going to be hidden on the bottom of the keys of an acoustic piano so it has to be thin/compact.
Any suggestion or warnings? So far I don't have anything build.
Sounds like an awesome project! Are you going to use piezos for the sensors or something else? Where it's an acoustic piano I feel like you could get creative with vibration sensors or photo cell sensors to pick up when a hammer has been engaged by a key. I've never done a project of that scale so I don't have any warnings per se but what I would recommend is taking it in pieces, maybe get two of the nano boards to start and after getting one to read the analog inputs properly (and also start with one analog input, then 2, etc) via serial to the Arduino board, then connect two and if that works then continue to scale up. The only issue I can see is power, maybe use a USB power bank to power all of the nanos? Honestly I understand the temptation to avoid muxes. If you don't have a direct background with electrical engineering then it definitely gets tricky (case in point my current project). To keep price down, I would recommend getting a 3rd party nano clone, something by Sparkfun or Adafruit maybe. Sparkfun does have this Arduino Pro Mini: www.sparkfun.com/products/11113 which has the same 8 analog I/O but at about half the price.
Blitz City DIY I was thinking about IR reflection sensor on the bottom of the key bed. I want to avoid interfiring with the mechanism of the piano so that's my plan.
The power thing is a good tip. 89 IR LEDs is going to use quite of power. And I will start small and expand little by little.
I already have a bunch of cheap clones. They are so cheap that I don't mind using so many.
Thanks for the tips and keep the good work
Hi =) How you connected buttoms ?
I've been looking for a tutorial on this! Thank you. While I was searching youtube, I came across a project using Pro Trinket as a USB keyboard. It's similar to a previous project you have, but no firmware swap is needed. It dawned on me that VSTis and DAWs can be macroed to keyboard, so I could make a button controller that outputs as USB keyboard instead of MIDI... Any thoughts on which project might be simpler/better?
Thanks for watching! I think for your project it depends a bit on what exactly you're trying to achieve. USB keyboard is definitely simpler than MIDI since MIDI protocol can be difficult. With all that, a USB button keyboard would be great for hot keys for controls but if you want to control any parameters (knob control, things like that) or input notes, then you'll want to go for MIDI. Hope this helps!
It does! thank you for the quick reply :)
Hi can you halp me, when i compiled this code it is coming up warning about midiEventPacket_t event = {0x0B, 0xB0 | channel, control, value}; is it ok ?
Love the code and it runs great, but I'm having trouble adding an ANALOG input into it. Any tips or pointers on how I might go about it?
You'd want to add in a separate array of analog inputs. That would probably get you on the right track. I would need a little bit more information though to comment further
Thanks it's great I did it it works fine with my Ableton Live 9,
Now I have new challenge. I have midi controller with 12 buttons and it works, I using Arduino pro micro for this, now I wont to connect midi controller via esp8266 to my computer and continue to use my midi controller without USB cabel. as wifi midi controller.
Is it possible ? thanks
lady , plz tell us if we use peizo disks instead of arcade buttons, what the sketch would to be altered like ?
Lady ?? :-)
I know I should have watched the video first :-)
Did you video how you put it all to gever please
Yes! I've got a part 2 here: ruclips.net/video/RswQLylJZVU/видео.html & I also have a project write-up on Hackster here that goes into a bit more detail: www.hackster.io/BlitzCityDIY/arduino-midi-fighter-8e8a5a
Hi, I am making a USB MIDI controller as a final project for school and I have a problem I think you may be able to assist me with ! I'm having issues with mapping faders and knobs to parameters in my DAW. As soon as I hit MIDI assign, I click on a parameter to assign to a hardware control. As soon I click on a parameter, my DAW ( Ableton) arbitrarily selects a knob or fader without me touching any controls. It should only assign MIDI controls when the position of a knob or fader has moved. The virtual parameter then starts moving randomly too. I have tried redoing the connections to micro controller (I am using the Teensy 3.2). My code seems fine. What could be the issue?
A couple of things to check would be to write some lines of debug code (essentially have all the data print to the serial monitor) to basically see what values your trim pots are actually putting out to the serial monitor. if they're too sensitive or not sensitive enough (could be why there's jitter) then you may need to adjust the resistor value. higher if too sensitive, lower if not sensitive enough. i had to raise the resistor value in this project for the buttons to read properly. I'd also look up an Ableton midi map. it will tell you exactly which address is being used for different things in the software. i haven't used ableton so i unfortunately don't have specifics on how what addresses the software is using. I'd check out this project by Evan Kale: ruclips.net/video/4sopfrr1830/видео.html he uses all faders in it so it may have some helpful hints. hope this helps and good luck with your project!
This is great, thanks!
Thank you for your work, it looks very interesting project (I will immediately see the second part), you have a new subcritor, by the way (and I hope it is not inappropriate), !!Wow¡¡ you have very beautiful eyes as well as smile, it has been very Nice to find your video, Thanks again and greetings from Mexico.
Hi my name is Marco and I have a project I'm working on and I really need some help and from what I just saw you are very knowledgeable in this. Can I email you?
Subscribed! I’m tired & a bit bored with my day job and this will be my outlet! Lol 😂, hope you can help.. I’ll send questions, how can I PM, you prefer email? I play guitar and plan to hack my old midi foot controller from 80’s using Arduino, like what you did , but instead of arcade buttons, I’ll just use the existing foot switches I got:)
Can someone help me ? mine is experiencing a conversion error:
C:\Users\Gabriel\AppData\Local\Temp\arduino_modified_sketch_616723\sketch_oct16a.ino: In function 'void controlChange(byte, byte, byte)':
C:\Users\Gabriel\AppData\Local\Temp\arduino_modified_sketch_616723\sketch_oct16a.ino:47:41: warning: narrowing conversion of '(int)(channel | 176u)' from 'int' to 'uint8_t {aka unsigned char}' inside { } [-Wnarrowing]
midiEventPacket_t event = {0x0B, 0xB0 | channel, control, value};
It's just a warning, you could cast the channel value to be an unsigned int.
Can someone please help me with the schematics!
For the measurements? I did my own math, so here are the dimensions friend:
162.8 mm by 162.8 mm wide,
33.5 mm high,
24 mm for button width,
base height is 1.5 mm,
port dimensions are 8.9 mm by 13.6 mm.
This is all for 3D printing, so you will have to model it. Hope this helps!
quero comprar uma alguem vende ai
overnice
Hello, You have an amazing idea and it’s the first that has really kind of cleared up my path into a personal project of mine. If you have time please send me a DM on twitter and we can talk more. I’ve started this project in February and made a decent success in it. I’m just having more time in my schedule to go ahead and perfect said project. Basically I’m using around 3 meters of 144 rgb leds. Your help and opinion would be so much help. Thank You
Twitter: @OfMooShu