USB hub support


#1

hello,
following up on usb hubs, it seems the last message from johannes (feb 12 2016) (re)states, that usb hubs currently are not supported by the axoloti core and that its low priority.
as i would find it extremely useful to connect several midicontrollers, how about sponsoring someone with the skills to implement it? i don´t have the skills and time to do it myself, but would be willing to chip in some money, if someone wants to pick up. if more people find this idea attractive, then we could raise the pay and more likely find someone?
what do the others think?


USB Hub support in the future?
USB Midi Controllers
#2

@hwk Ive moved this to its own topic as this comes up occasionally
(also the USB Midi Controllers thread, is not a place for 'requests')

as a side note... hub support not only requires firmware changes to support the hub. but also for axoloti to support multiple devices... e.g. current midi targets are fixed to DIN, usb device,usb host... but adding a hub means N devices could be attached to the host.
this raises some 'interesting' questions about configuration, since the UI does not currently know about the device connected to the axoloti... and even if it did, the devices you attach to axoloti could be different when you 'build' the patch vs when you run it.
so how you would configure it, becomes an interesting question.

(there are some existing cases, where this is already interesting - but multiple devices support via hubs would make it a more 'pressing' issue)

also... its worth highlighting, some midi hubs may already be supported....
these are hubs that present themselves as multiple midi ports, rather than multiple usb devices.
(I suspect dedicated midi hubs fall into this category, e.g. midi man midisport 2x2 but I don't have any to test with)


#3

FWIW this is how it works with an iCON 3 port box that I just tested.


#4

Hubs are not supported by the firmware framework sourcecode from STMicro, while there are commercial libraries for the chip that support hubs. But I did a search again, and found open source code that adds hub support to the STMicro framework: https://github.com/mori-br/STM32F4HUB
Still a substantial adventure to implement and test, but this code appears to make the effort quite a bit more realistic.

As @thetechnobear say, this also challenges the model of how midi is exposed to patches. Probably needs some sort of MIDI routing configuration that is independent of patches.
In some cases you may just want to merge all incoming midi data. But some Midi controller devices could have overlapping messages. If you connect 2 NanoControls with identical midi mapping, they need to be recognized separately not merged. This can also be solved by programming the NanoControl to use a different map, but not all controllers can do this, for example, a Launchpad.
The right balance need to be found between keeping simple things simple and bumping into hard limitations because of simplistic routing assumptions.

That 'd be multiport usb-midi devices, unrelated to usb hubs.

I'm open to a model where people chip in to pay someone else to do the development. I will certainly contribute to the effort of testing!


#5

I'm not sure you need this, isn't this what channels are for? Of course it would be nice to have 16 channels from every device without the need to remap but isn't that just being lazy? If it's easyer to implement then I'm content with just getting the midi in and managing the routing with channels and mapping myself.
If you have a midi-merge box, doesn't it present itself as one device that transmits on different channels, you don't see it as multiple devices, and a midi hub could work the same.


#6

hello,
thanks for all the information coming up here!
in my case its a korg nanocontrol and an iRig midikeyboard, which i want to use simultaneously.
connecting both to an usb hub and that to an ipad works like a treat, but the hub doesn´t work on the axoloti for reasons i now understand better.
since the korg and the iRig both are usb only, i´d need a usb to midi converter to accomplish, what i want (and in fact help myself at the moment routing the keyboard thru a computer and a midi interface), but being able to connect a hub would certainly make things more portable.
maybe the github code for the stm, that johannes mentioned, could facilitate such an option in the future?
my offer to (at least partially) sponsor such a development still stands.


#7

Often that is a valid solution indeed, if the controller uses only a single channel. Another problem situation arises when dealing with Midi Polyphonic Expression, that uses all channels for one instrument.

Yes, the main reason I have not made any effort towards hub support was the absence of usb hub handling code now found on github. Still I can't prioritize spending time on this development, but if someone develops this, I'll contribute to testing. You're absolutely welcome to organize funding and find a developer for this feature, as an independent initiative.


#8

My point is maybe you don't need to cover ever use-case all the way to support a feature, midi polyphonic expression is probably not the most common use so maybe it's ok to only have one usb device in that case but have the opportunity to use multiple in other cases. I'm planning on using an arduino with a usb host shield as it supposedly handles usb hubs and that way connect multiple usb midi devices to the host port, like with a hub, and to the axo it will look like a single usbdevice with multiple channels.


#9

Yes I get that point, many use cases can indeed be served without modifications in the patch/midi handling.


#10

no, but sysex is a common requirement and that cannot be channelised.
similar, it would require quite a hack to start rewriting midi channels, as you have no idea which channels are in use or not. (both input and output)

this not a huge problem, since you could instead use midi ports, which are not so widely used (though, still you are messing then with some controllers which do expose multiple ports)

its actually not a huge issue for the patcher, just raises some questions about how controllers need to be configured.

(I suspect it may be as much of an issue finding a place to implement 'workarounds' without complications for both midi, and also other HID devices plugged into a hub)


#11

Hello,

I know USB hubs aren't supported on the host port. I was wondering if this is a hardware limitation or if this could work in the future ? I'm asking because I was planning on building a similar solution with a Teensy and a USB host board, but I'd find it more practical to do it all on the Axoloti.


#12

(merged to existing usb hub thread)

So far no progress on the usb hub support.


#13

Thanks, will go with the Teensy solution for now !


#14

Any updates on this?


#15

I can't wait for this feature.. it would be so nice to connect a pair of q nexus and a nano kontrol for a travel setup.

As far as i spy the github repository it will be in the next release :smiley:


#16

Thank ggggggod. I mad a couple midi controllers for changing parameters and stuff but couldn't for the life of me get them to work as 5pin midi controllers and my usb port was already occupied by my keyboard. I'm so freaking excited now, i put like a mountain of work into this synth project I'm working on and simply CANT WAIT to show others how it's turned out!


#17

Totally agree this will make axoloti so much more awesome!!


#18

Is there any docs about how to try the experimental version that includes this?