MIDIUSB on Arduino Nano clone

Hi guys,
I'm planning on building a usb MIDI controller and I found this Arduino library:

And I was wondering if it would work with this Arduino Nano clone:
http://www.ebay.co.uk/itm/132144848179

Thanks,
Will

No, it wont. The MIDIUSB library only works with boards that have a USB connection on the main microcontroller, like the Leonardo, and most ARM boards. Boards like the UNO, Mega and Nano have a second chip to convert the Serial (UART) connection of the main microcontroller to USB.
On the UNO, there's a second microcontroller that does this (ATmega16U2) so you can actually program this chip to act as a USB MIDI interface instead of a serial port, you could use the HIDuino firmware, for example.
On other boards, like the Nano, this USB-to-Serial chip isn't a general purpose microcontroller, but just a USB to UART Interface IC that can't be programmed. (An FTDI chip for example, or a Chinese alternative, like the CH340G.)

If you want easy USB MIDI, I'd recommend a Teensy, or if size isn't an issue and if you need more I/O, an Arduino Due.

You can use my MIDI controller library to keep programming easy. It works on pretty much all Arduino and Teensy boards, like the Arduino Uno, Mega, Zero, Due, Leonardo, Micro, Teensy 3.2, ...

Pieter

Hi,

This may sound stupid but i'm new to this sort of thing,
would it work with this board:

Thanks,
Will

If the image is correct, it uses the same CH340G, so it won't work.
If the description is right, and if (that's a big if) it really comes with a genuine ATmega16U2, it should work.
However, getting it to talk USB MIDI is really cumbersome, and programming (especially debugging) is going to be a nightmare.

I'd strongly recommend to buy a Teensy, Due or a Leonardo for this purpose.

Pieter

Ah, ok

Thanks,
Will

Not entirely true any more. There is the serial (over USB) to MIDI conversion route which is available. One can search for Hairless MIDI, and plethora of instructions on how to use it.

I do wonder about latency differences between the more native MIDI (as in what is possible with teensy and it's ilk) vs the serial-MIDI bridge approach (using Hairless MIDI).

While I've not made a project using it, bute I've been meaning to do one for a MIDI foot-pedal using that approach.

I wouldn't call that USB-MIDI.

It's sending MIDI data over a USB CDC link to a software application that creates a virtual MIDI interface and routes the data to it.

Having used this approach for a MIDI controller, I wouldn't recommend it at all. If you want to build a MIDI over USB project, you should get a board that supports USB-MIDI natively.
You can get ATmega32U4-based Leonardo/Micro/Pro Micro clones from China for as little as $4, and on the official Arduino Store, a Micro is $2 cheaper than the Nano, so price is not an argument.

An Arduino Nano is not fit for USB-MIDI projects.

Reviving an oldish thread.

Thanks @PieterP. Basic note-on, note-off (pre-programmed) works reasonably well with this arrangement. However, since I am yet to put key-debounce, LED status update logic, clean up the code to make it module, I still haven't got a feel for the latency and how usable this approach is in real-life. Is your concern really the "latency" or "reliability" (for example some midi-events being lost/dropped) or something else ?

I am actually undertaking this project right now. I do have a Leonardo but currently used in another project, which I was hoping not to have to scavenge as it is working well. I have quite a few of the el-cheapo CH340 based Arduino clones (both UNO R3 and Mini Pro v3), and was hoping to avoid ordering another Leonardo or R2-UNO!

falcon74:
Is your concern really the "latency" or "reliability" (for example some midi-events being lost/dropped) or something else ?

For a simple foot switch, the latency won't be noticeably different, and I don't know why there would be reliability issues either.

I was talking about ease of use and ease of development. Using MIDI over USB on an UNO is cumbersome to develop, because you have to swap ATmega16U2 firmwares every time you want to upload. Using Hairless to emulate MIDI over USB is cumbersome to use because every computer you use it on needs to have Hairless installed, and you have to run the program every time you want to use it.

If your goal is to build a device that talks MIDI over USB, get an Arduino that supports it, like an Arduino Leonardo, Micro, Due, Zero, or a Teensy ... NOT an Arduino Nano, UNO or Mega, or anything else that doesn't have native USB support.

Got it, thanks for the reply. Yes, what you are saying makes sense. However, dealing with lot of parts/components clutter at home so was trying to avoid more Arduino boards.