0
\$\begingroup\$

I have experience with AVR controllers and now I am developing analog synth like sound module. I would like to be able to connect a USB midi controller to my sound box. I would like to use an AVR microcontroller and I think my option is either to buy a USB to MIDI adapter for the keyboard and build an AVR MIDI interface or use something like an FT232RL chip for USB and code for reading MIDI commands. I would like to hear suggestions from more experienced engineers.

\$\endgroup\$
1
  • \$\begingroup\$ While English may not be your first language, please try to spell check and use proper capitalization to the best of your ability. It greatly increases readability. \$\endgroup\$
    – uint128_t
    Commented Mar 5, 2017 at 19:28

2 Answers 2

1
\$\begingroup\$

USB MIDI is a different protocol that is not supported by the FT232R. You would need to use a general-purpose microcontroller with USB support.

Furthermore, USB makes a strict distinction between hosts and devices, and your controller is a USB device, which can be connected only to a USB host.

So you would need to use a board with a USB host (or OTG) controller, such as the Raspberry Pi. Alternatively, pay for the Kenton USB MIDI Host, or connect both the controller and your AVR board to your PC.

\$\endgroup\$
0
\$\begingroup\$

To add to CL.'s excellent answer: Creating a USB host that supports USB MIDI is not trivial. Either use a computer in between, or get a keyboard that supports "real" (hardware) MIDI output, which is very easy to interface with the microcontroller of your choice. The Akai MPK 25 would be an excellent choice, for instance.

Edit: after further research for another project, I've realized that creating a USB MIDI host device may be easier than I thought. A MAX3421E can be used to implement a fairly inexpensive USB MIDI host. For a "just add water"-product, get yourself the USB Host Shield for your Arduino, which has a MAX3421E. You should be able to find a library supporting USB MIDI, and you can relatively easily build a USB-MIDI to hardware MIDI converter.

\$\endgroup\$
7
  • \$\begingroup\$ What if I don't have possibility to buy another keyboard? Maybe usb to midi adapter would do? \$\endgroup\$
    – user112290
    Commented Mar 7, 2017 at 9:12
  • \$\begingroup\$ Yes, you can go keyboard to computer via USB, and computer to Arduino via USB-MIDI cable, if you're OK with the computer in the middle. \$\endgroup\$
    – uint128_t
    Commented Mar 7, 2017 at 18:12
  • \$\begingroup\$ This options is viable for me, but how will USB Midi keyboard passthrough computer to my AVR MIDI device? \$\endgroup\$
    – user112290
    Commented Mar 14, 2017 at 9:23
  • \$\begingroup\$ You simply need a piece of software that can route a MIDI input (your keyboard) to a MIDI output (the USB-MIDI cable). Numerous pieces of software exist for your operating system of choice. \$\endgroup\$
    – uint128_t
    Commented Mar 14, 2017 at 17:12
  • \$\begingroup\$ @user112290 See my edit, I've changed my answer after some research. \$\endgroup\$
    – uint128_t
    Commented Mar 17, 2017 at 4:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.