I have searched the forum and could not find an answer for this so I hope if someone has any knowledge about this.
Is it possible to use an MIDI Keyboard, that has MIDI out through USB to use it as an Input for arduino?
What I want to do is connect and USB MIDI Keyboard to the arduino (uno, nano or Mega) usb port and receive midi messages from the keyboard. With this I could translate a midi message to an output on the arduino. This would be make the usb midi keyboard be used instead of push buttons as inputs.
MIDI is transmitted as asynchronous bytes at 31250 bits per second. One start bit, eight data bits, and one stop bit result in a maximum transmission rate of 31250 bps (±1%), 3125 bytes per second. In order to get a fair level of immunity against electrical interference (irradiation), MIDI uses a current loop signal line (5mA, usually at approximately 5V), rather than the standard voltage level signals. There are many different adapters that will convert for you or you can make your own. Just a hint use either the software serial or if available use one of the other serial interfaces, that will make it a lot easier for you.
I have searched the forum and could not find an answer for this so I hope if someone has any knowledge about this.
Is it possible to use an MIDI Keyboard, that has MIDI out through USB to use it as an Input for arduino?
Only if the Arduino board supports being a USB host. Most are client-only.
What I want to do is connect and USB MIDI Keyboard to the arduino (uno, nano or Mega) usb port and receive midi messages from the keyboard.
None of those support being a USB host directly.
With this I could translate a midi message to an output on the arduino. This would be make the usb midi keyboard be used instead of push buttons as inputs.
Can this be done?
The Due has USB hosting.
There are USB host shields - I have no experience of these myself.
Some Teensy boards (arduino compatible boards) support this, though you need a separate cable and to
solder some headers on.
Standard 5-pin DIN MIDI interfaces are being phasing out these days, everythings moving to USB. I recently nabbed a bargain MIDI keyboard secondhand (flaky display that I've mainly fixed)
It supports both standard MIDI and USB MIDI so I can transition to working with USB MIDI at my
leisure.
gilshultz:
MIDI is transmitted as asynchronous bytes at 31250 bits per second. One start bit, eight data bits, and one stop bit result in a maximum transmission rate of 31250 bps (±1%), 3125 bytes per second. In order to get a fair level of immunity against electrical interference (irradiation), MIDI uses a current loop signal line (5mA, usually at approximately 5V), rather than the standard voltage level signals. There are many different adapters that will convert for you or you can make your own. Just a hint use either the software serial or if available use one of the other serial interfaces, that will make it a lot easier for you.
We're talking about a USB MIDI device in this thread.
Yes, I am only interested in USB MIDI device here, I dont want to use MIDI connectors.
My idea was to receive input from an USB MIDI Keyboard and the arduino will send this MIDI information to a VS1053 module that will be running in Real Time MIDI mode. I understand that I can connect an VS1053 directly to a MIDI Keyboard, but the purpose to use an arduino would be to allow extra features and more control over my MIDI keyboard, making the setup into a full MIDI synthesizer.
I already ordered online as USB Host shield for this process. I read that this is an SPI device interfaced with the arduino, so I guess I will have the MIDI module VS1053 and the USB Host shield interfacing through SPI at the same time. My only hope is that I can get good results with these two together.
I suspect you'll need to find an arduino with native USB. The Leonardo is a good one, or the SparkFun ProMicro. The MIDI library supports USB directly on these boards for both input and output of MIDI.
Even with a shield, I'm not sure how easy it'll be with an Uno or Nano. I've had some success with the VUSB library on these boards, but it's kind of a PITA, with weird latency and CPU utilization. Probably not the best option for realtime applications like a MIDI setup.
I suspect you'll need to find an arduino with native USB. The Leonardo is a good one, or the SparkFun ProMicro.
No they will not do what the OP asked. He did not want to connect to a USB host device. He wanted to connect his Arduino to a USB client device. You can’t do that with those types of Arduino.