Small USB midi host
  • Today i thought of something i would like to have but i don’t think it exists yet.
    Maybe it is something to be build in a futute midipal version.

    A small device that can act as a Usb midi host to make use of all the usb only midi controllers out there. Like my APC40 or a korg nanokeys toghether with the shruthi?... And maybe even so that you can program it like you can program live with max to use the APC as a standalone midi sequencer?

  • A bit like this? http://www.kentonuk.com/products/items/utilities/usb-host.shtml

  • yes like that!
    I didn’t know these yet. thnx

  • keep in mind that all those only work with class compliant midi devices

  • And if you already have a famous smartphone, may be this device will also work ??

  • Since i saw this video this weekend i was looking what they use to play the Tetras with a nanokey,
    http://www.youtube.com/watch?v=8OzeYdUpdEQ

    Cool to use a Shruthi with a nanokey, but a bit expensive just for this…

  • it would be really cool to build a shruthi in a case with the keys from the microkeys.
    i was wondering if there are some midi retrofit solutions i could use to hack the key scanning.

  • Has anyone else come across options for what shiftr was trying to accomplish? I had the same thoughts of using a Korg micro keys with my new Shruthi, too.

    The iConnectmidi 2+ is really close to being awesome in my opinion but it doesn’t act as a USB host. The 4+ model does but otherwise is overkill for just one or two controllers and one or two synths.

    While I’m dreaming, my ideal would be a Microkey 61 split to control my Shruthi and a sampler, probably a sampler app on an iPod touch like SampleWiz.

  • looking for this aswell.

  • this one does it… but it’s a bit expensive for something wich doesn’t really do anything.

  • Raspberry pi can do this with a class compliant midi itnerface and aconnect:

    http://alsa.opensrc.org/Aconnect

  • i realy should be getting into pi soon…

  • Collin Gunningham from Make have made one with an Arduino and a usb host shield, http://blog.makezine.com/2010/11/30/usbhacking/.
    The shield can be found on EBay for 25 euros.

  • Also on my todo list is trying to compile this for the pi:

    http://das.nasophon.de/mididings/

  • Teensy should be able to do this since it’s capable of reading usb-midi. Was looking into that myself but never got to actually purchase the teensy board. The idea of using all the tiny & cheap controllers for diy synths is really tempting.
    Check here: http://www.pjrc.com/teensy/td_midi.html

  • it acts as a usb midi device, not sure if it has usb host functionality.

  • Hmm, indeed it seems like Teensy 2.0 acts like usb midi device only. Teensy 3.0 working as usb host should be implemeted soon (or is already?) but it runs at 3.3V which will most probably be a problem.

  • why would it be?

  • Has anyone come across this yet?:
    http://www.pjrc.com/teensy/td_libs_USBHostShield.html

  • pichenettes: well, I’d use it with usb powered devices (like akai lpk etc.) and I imagine that these need 5V at least for Vin, probably also for the logic. I guess one could use logic level converter and also supply 5V but it’d be great if something like this worked in this tiny form factor. Or am I missing something? I think the same applies for the arduino mini usb host by Circuits@home (http://www.circuitsathome.com/products-page/arduino-shields/usb-host-shield-for-arduino-pro-mini)

    edit: joshuagoran: haha, yes, that’s the exact shield :)

    edit2: joshuagoran: Your link shows the 5V usb output modification! That’s something to take note on.

    edit3: so this is what I’m thinking:
    get this arduino mini usb shield: http://tinyurl.com/c5febx5
    get this arduino pro mini (adjustable 3.3 / 5V): http://tinyurl.com/covby9v
    set the arduino to run at 3.3V and take the 5V from the onboard regulator to the usb power pad (similar as with teensy in this tutorial: http://tinyurl.com/blgvc8k )

    Then it should work with mentioned Colin Cunningham’s example sketch and would be extremely compact. For more power demanding devices you’d probably need separate 5V regulation. In that case you can use regular 3.3V arduino pro mini.

    Is this correct?

  • afaik, you can use 3.3v for everything midi-related without a problem.

  • I guess the problem is to use the host to deliver power to the slave device – and an USB-powered device expects 5V.

  • @ashimoke: our thought processes are right on with each other…hopefully that can serve as some sort of validation :)

    Based on my understanding, this would do what we are trying to accomplish. Who has Arduino experience and wants to give it a go? ;)

  • Also the fact that a teenys + shield gets you dangerously close to the cost of the rasp pi model b plus there is no voltage issuesThe pi has gpio as well if you wanted to add some pots. Its about three times bigger than a teensy though :D

  • Has anyone actually implemented this with a RPi?

  • I think since the pi works with USB midi the incentive to use the gpio Is low. A pi running littlegptracker is the daw midi brain for my live rig.

  • Ahhhh, I get it. What USB interfacing do you use? I’d need a USB hub to plug in my keyboard controller and maybe a pad controller then a USB to DIN midi adapter to go out to my Shruthi and whatever else. Have you had any issues with CPU load or latency?

  • no but lgpt is really low spec software. I use a plain old dlink usb hub to both power the pi and hook up audio interface (behringer) midi (eiderol xm something) and joypad. I imagine if you were using it jsut for headless midi conversion it could be stripped down even further (most of my boot time is tied up with networking stuff)

  • Teensy 2.0 and 3.0 are USB MIDI class compliant, but are not USB hosts. Host functoionality fr 3.0 is planned but not yet implemented. Meanwhile the USB host mini-sheild for the Arduino Mini works with Teensy 3.0. In general Teensy is much nicer (better supported, more active) than Arduino hardware – and uses the same libraries and code environment.

  • Just came across this:

    http://www.keithmcmillen.com/expander/overview

    It’s designed for use with KMI controllers, but I am under the impression that it works with any class-compliant USB controller. Or, this with the 12 Step controller could be a really cool and fairly minimal way to expressively control a Shruthi (or other synth) as a bass pedal synth.

    EDIT: look one comment below before you get excited :P

  • I emailed their support a while ago, it does NOT work with any other class compliant device other than the kmi stuff.

  • ah, dang. That’s too bad. Thanks for the info!

  • but for about that price you can use:
    http://www.kentonuk.com/products/items/utilities/usb-host.shtml

  • https://github.com/YuuichiAkagawa/USBH_MIDI – here is a MIDI lib for the updated USB Host 2.0 lib – the example sketch worked off the bat with my nanoKEY 2 and Shruthi – cool stuff!

  • I have a KMI expander at home, will check it out with some usb stuff to see what happens.

    I know they say it is not compatible, but who knows, the Camera Connection Kit for my iPad was not supposed to be used for midi either…

  • I’ve been reading through this, trying to see if there are any new options for a midi/usb host. I like the idea of the RPi but can’t seem to find a midi expander/board anywhere, I’m not great with microcontrollers and electronics so the easier the solution the better, though the kenton is out of budget. Has anyone tried this? http://www.hobbytronics.co.uk/usb-host-midi I am guessing it’s mainly for arduino but I wish there was simpleton instructions!

  • i didn’t try it but that host board seems really the best option. You only need to connect this.
    http://www.hobbytronics.co.uk/datasheets/ht/USB_HOST_MIDI_Connections.pdf
    And a 5V power source.

  • So it’s just a matter of the two midi sockets and a the resistors? I’m really not knowledgable at this, despite being on a diy forum!! Thanks though, I will try and work it out

  • Maybe I can pay a member here to wire one up for me?

  • Years ago, I got one of these for my Arduino: https://www.sparkfun.com/products/9595
    (actually I got a cheap clone) and it works like a charm. Use it ever since.

    There is a really good MIDI library (which also works well on the Teensy – tested by me). I have also written a small MIDI monitor sketch, which passes all commands to a serial console. If anyone is interested, I can put it on my GitHub page, but it really is very simple to write!

    However, instead of using a Shield, shiftr sketch is easy to implement, and the standard. This basically is the circuit that is implemented on virtually every shield. The MIDI Dins are used like a normal serial line, so they get connected to the TX/RX pins. MIDI out can be directly connected, MIDI in requires an opto-coupler to filter noise etc.

    What is on my list to build this summer is actually an absolutely versatile MIDI router. What I have in mind are 4-5 MIDI ins (to reduce latency by avoiding serial Through connection), 4-5 MIDI outs (to connect several devices of course), and a USB (for USB-DIN routing), a small display and some pots (to dynamically change routing). Perfectly, all DINs can be dynamically switched between input and output. It is not high on my priority list, but like I said: my plan for summer. I can keep you updated on my progress.

  • mr_sibs: I can build one for you, but I don’t think it is worth the trouble.
    PM me if you are interested anyway…

  • Thanks @Karg the shield looks like an interesting idea, if it’s just a matter of sitting it on the arduino then that should be simple. It’s the sketch I’d struggle with, does yours cover the USB midi host part sending MIDI information from the USB device to the MIDI out? That’s all I need this gadget to do

  • “I like the idea of the RPi but can’t seem to find a midi expander/board anywhere, “ <- you would just use a (class-compliant) USB-MIDI-Interface with RPi, so you won’t need to know about electronics (but perhaps a little bit about linux).

    I’m using RPi for multimidicast (sending MIDI over LAN), too, so I can easily jam in another room.

  • Yes, all the shields typically have this functionality. As long as you have a MIDI Din connected to an Arduino, the rest is a software issue.
    However, if you are only interested in passing data from USB to the MIDI out, and not the other way around, a shield is not necessary. You can focus on the “Out”-Part in the above diagram. Or putting is even simpler, just do what is described on this single page and igonore all other steps in this instructional:
    http://www.instructables.com/id/Send-and-Receive-MIDI-with-Arduino/step3/Send-MIDI-Messages-with-Arduino-Hardware/

    With an Arduino, you are really flexible in these things, can use any digital pin, and can even do stuff like transpose all midi notes, etc.
    After telling me which pin on the Arduino you want/have used for what in the instructable is D1, I can write a small sketch for you. Do not worry about that.

    Just make sure you get an Arduino with a 8U2 or 16U2 chip for the USB stuff (i.e. an Uno, Due or MEGA), and things will be very easy and convenient to use afterwards.

  • FYI, the Raspberry Pi option doesn’t need a MIDI shield, just a $5 USB MIDI cable and one aconnect line in the startup script. Admittedly, for those not familiar with Linux, there’s a little tweaking you need to do for the initial setup that can be frustrating, but once you’ve got it all set it’ll just work on startup without having to do anything and without the need for a keyboard or display hooked up.

  • Thanks @bleo that sounds very easy! I still might try the arduino or USB Host option above simply because they will be much smaller (size is key here otherwise I’d just get a proper keyboard!)

  • I agree with bleo, Raspberry is also a valid option.
    However, the Raspberry will typically give you more power for the buck, and better options for end-user periphery, while the Arduino will be cheaper, smaller, and typically better for hardware tweaks (more in outs, direct hardware access, real-time system, etc).
    For a midi converter, I would go for the Arduino.

  • I would always prefer a Arduino solution if it’s only about converting USB<->MIDI.

    Raspberry Pi is nice when you have several uses for it (mine acts as a HTPC until I insert a MIDI-device), but it is much more complex and therefore much more fault-prone. An Arduino will boot in one second or so, while you may wait a minute for the RPi to come up. An Arduino will probably always boot, while you may have to deal with SD-Card corruptions on RPi, and so on.

  • The new raspberry pi model a is TINY and comes with one usb port. It was smaller than my cheaper midi interface at least!

  • Also running arch linux the pi boots in under 10secs fwiw.

  • @herrprof won’t it need two USB inputs, one for the midi device (keyboard), one for the USB/MIDI socket converter?

  • whoops yea! But youll need a powered hub for most things anyways. Plus it can power the pi itself!

  • Ah I see, so get a powered hub, that powers the Pi and other devices I can use with it

  • When backpowering the Pi with a powered hub you should a) make sure that the hub is delivering enough power on one port, since from the USB specification it should be never more than 500mA (what maybe would be enough for Type A, but definitely not for Type B) and b) be aware that you are bypassing the fuse protection from the Pi. You can read more about backpowering at http://elinux.org/RPi_Hardware#Power

  • Maybe this one is next candidate :)

    CHIP 9$ Computer especially pocket version might be usefull

  • this one is £15 and by itself, in a 5cm by 10cm box with a 5v regulator, worked great.

    http://www.hobbytronics.co.uk/usb-host-midi

    I tested it with the shruthi and every parameter seem to work!
    make sure you get the midi host option!

  • Nice Find! Is it true it can only do midi channel 1-8 though?

  • I normally have my master keyboard on ch10 and seems fine!
    I velcroed the usb thingy to the shruthi and they seem happy together.

    shruti MIDI.jpg
    3264 x 2448 - 829K
  • Nice. I’m wondering if you could just power this hobbytronics board off the Shruthi’s spare 5v connector, in the ‘input expansion’ bit?

  • It probably will be fine for the board itself, the problem is that whatever you plug into the board gets powered by the shruthi’s 5v regulator, I would be careful before plugging a big illuminated midi controller.

  • Good point. A bit risky, perhaps. I saw the even smaller version and started to wonder about the possibilities.

  • @Alexwfm: nice find! i’ve been looking for something like this for a while!

  • bleo, I think the Pi would be a much simpler solution which doesn’t need a lot of hassle. Although what you’ve mentioned about the start-up script is something I’m not familiar with. Please bear in mind that I’m familiar with Linux but I’ve never used an aconnect line and I’m not sure how much of a hassle it’ll be. What’s confusing me is that you’ve mentioned it’s just a line and on the other hand you said it could be frustrating. Could you please elaborate it a little?

    Regards,
    A. Jackson

  • its just a matter of determine the aconnect command you want to execute on startup. Once you have that here is a guide

  • Doh. replied to a page 1 post.

  • @alexwfm – I’ve ordered the hobbytronics bit, too. I’d like to chain it with some other MIDI kit – do you know if there is any provision for MIDI Thru (ie merging the USB MIDI with signals appearing at the Rx input of the hobbytronics thing), or is it just in&out to the usb?

  • Just got the RPi MIDI host working. Provides 4 USB (RPi2) to two midi in/outs.
    Here I am plugging in an KMI QuNexus and a MidiSport 2x2 into the RPi and routing the information from the QuNexus to MIDI Port A Out on the MidiSport. The RPi is powering both devices. I’m pretty sure you could use one of those cheap midi/USB cable interfaces too.

    1. Starting with a stock RPi, powered on, running Raspbian Jessie and connected to network/internet.

    2. Either pull up the terminal on the RPi or ssh into it over a network.

    3. Plug in both devices into the USB ports on the RPi

    4. I needed the driver for my MidiSport so I had to type:

    sudo apt-get install midisport-firmware

    to download and install the driver. The QuNexus is class compliant so it works as-is.

    5. type:

    aconnect -o

    to see the output devices connected to the RPi.
    you should see client numbers followed by the names of the devices.
    I have something like:

    client 20: ‘QuNexus’
    client 24: ‘MidiSport 2x2’

    6. type:

    aconnect ‘QuNexus’:0 ‘MidiSport 2x2’:0

    this tells aconnect to send midi from QuNexus port 1 to MidiSport port 1
    you could also type:

    aconnect 20:0 24:0

    and it will do the same.
    play some notes and it should be working. The problem is that every time you startup the RPi, you will have to re-connect the devices using aconnect. This is fixed by writing a bash script with the same aconnect command and set it to run at startup. I just do:

    #!/bin/bash
    aconnect ‘QuNexus’:0 ‘MidiSport 2x2’:0

    Here is a link that shows how to set it to run at startup:

    http://www.raspberry-projects.com/pi/pi-operating-systems/raspbian/scripts

    I hope this helps.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion