Im a total noob and I dont know anything about Arduino. Theres a lot of technical stuff and I have a long way to go.
I had an Idea for a project and I dont even know if Arduino would be the right way to go.
Basicaly I want to use an electric Piano to control a linear actuator. I would play three notes and the actuator would extend. I would play a separate series of three notes and the actuator would retract. The electric piano that I am considering using has a midi USB port.
I know I can use the Arduino to control the actuator. I understand the hardware and the wiring from Arduino to actuator. I'm just stuck on getting the MIDI signal to the Arduino. If it is possible Id like to know what hardware I would need.
Like I said I'm a total noob. Any help would be greatly appreciated.
All ideas are possible but not always making them true, real. Often knowledge, research, is needed.
Most questions about Midi is sending out Midi commands. Your question goes the other way.
Researching and studying how the communication is done in the Midi world is recommended.
Yes I lookied into that. The Rasberry Pi uses 3.3 volts and the driver for the actuator needs the 5 volts that Arduino uses. I was hoping to just utilize the usb without having to convert it to the old style 5 pin MIDI plug
If you insist on leaping ahead without learning the basics, look on line, find and follow an example of an Arduino that can connect to an instrument with a midi USB port, and does something useful. Buy that type of Arduino, and modify the example code to do what you want.
When that works to your satisfaction, add in the equipment and code required to drive the actuator.
It's most likely a USB Device. That means that you need an Arduino or a shield to be the USB Host, you cannot connect two devices to each other.
Keep in mind that most Arduinos only support USB Device mode.
If you want an Arduino that can produce MIDI input and output signals through a USB connector you need the Arduino Micro or Leonardo to do this.
If you want to supply signals from a Uno, Nano classic or Mega, then you have to use a helper app running on your computer or laptop that will convert the normal serial signals from these processors into a MIDI signal. It used to be simple, you would use an application called Hairless. This works with Windows, Mac and Linux.
However, now the big problem here is that it is an old application, a 32 bit one, and newer operating systems will only support 64 bit applications. In the Mac world the last OS to support both 32 and 64 bit applications is Moajve. So that is why I am stuck on the old OS.
Now I did write a book on MIDI Audio & MIDI Arduino which the publishers want to update. So I had to find an alternative solution to Hairless. An internet search for a replacement suggested using MIDI Patch bay. This is a rubbish suggestion because you need a USB MIDI signal before you can use MIDI Patch bay. It is a case of someone not understanding what is needed and then everyone else simply copies the suggestion.
That made me think of "computer program" I did a quick google ("windows program to sense 3 MIDI notes") and found this - I think it is $25 but maybe there are cheaper or free things of this sort. if that is what you are looking for.
EDIT on the other hand, I think you could program an arduino to listen for those 3 notes and then trigger an actuator (assuming you have a controller for the actuator), however, I think the wiring and coding of that would be in the "advanced" level of expertise. But again, googling for things like "arduino that listens for specific notes" etc etc, can get you a lot of info and maybe even a breadboard and a sketch. Look for example sketch to listen for specific frequency note. Here you would be concerned about frequency and not MIDI. you would probably power the board via wall wart 5v(9v?) and not the USB port so as to minimize possible computer confusion, especially if you are playing your MIDI device through an app on your computer. hth
There is another solution to this and that is to get one of these:-
This will convert the MIDI input from your keyboard into a MIDI signal your Arduino could read if you pick this variant of the software you order for this board:- https://www.hobbytronics.co.uk/usb-host-midi
There is a couple of problems with this however.
The output signal is only 3V3 not 5V, so if you want a 5V output you should really use a logic level shifter with this, although you might just getaway with it.
This outputs MIDI at the MIDI rate of 31250 Baud. So your Arduino must be set to this speed in order for it to read MIDI into it. But the serial monitor in the IDE can't be se to this speed so you will loose the ability of using the serial port for debug printing during code development, unless you use a standard baud rate.
As others have said plunging yourself into a complex project that is beyond your current knowledge is a very common beginners mistake. As you can see this while sounding simple, it is not. Something illustrated by this :-
To explain:
There are 2 similar but separate MIDI topics going at the same time. Some of the replies to the other one got posted here by mistake. I've moved them over to the other topic as best I can, but if I made any serious mistakes please feel free to tell me.
Please continue to help here or in the other topic, and please take care to reply to the right one.