Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

USB MIDI in (USB host mode) #4

Open
probonopd opened this issue Jun 6, 2024 · 11 comments
Open

USB MIDI in (USB host mode) #4

probonopd opened this issue Jun 6, 2024 · 11 comments
Assignees
Labels
enhancement New feature or request

Comments

@probonopd
Copy link
Contributor

It would be nice to have a USB MIDI in so that we can attach USB MIDI controllers (keyboards) that do not have a DIN-style MIDI connector. For this, the Pico would need to run in USB host mode.

@AnotherJohnH
Copy link
Owner

A blocker for this is I use my own SDK "Platform" that does not have USB host support.

Two solutions...

  1. Port picoX7 to another raspberry Pi Pico SDK that already has USB host support. All the hardware dependencies are deliberately kept to just picoX7.cpp which should help.
  2. Add USB host support to the "Platform" SDK.

TBH I'm not going to do 1. but do have a USB MIDI controller that is nicer than my actual MIDI controller. I'll have a look at the rp2040 dataset to see what's involved in adding support for USB host mode.

@AnotherJohnH
Copy link
Owner

... ah yes the world of USB has not simplified itself since I last visited many years ago!

But be e a good challenge and would open up some interesting possibilities for other RPi-Pico based projects.

@AnotherJohnH
Copy link
Owner

Currently attempting to add USB device support as a precursor to adding USB host support. If successful this should provide an easy way to control the picoX7 as a MIDI slave from a DAW. But as you state USB host support would allow direct connection to a USB-MIDI controller.

USB is complicated and MIDI-over-USB a whole other complication on top of that, so this may take a while and I might run out of enthusiasm.

However currently have the picoX7 appearing as a low level USB device, which is a good start.

@AnotherJohnH AnotherJohnH self-assigned this Jun 11, 2024
@mwedmark
Copy link

Shortcut, steal with pride:
https://github.com/diyelectromusic/picodexed/tree/main/src

@AnotherJohnH
Copy link
Owner

Some small progress, picoX7 now seems to work to some degree as a proper MIDI IN device. as of patch
Code is provisional and needs refinement. Timing seems "lumpy"

@AnotherJohnH AnotherJohnH added the enhancement New feature or request label Jun 29, 2024
@probonopd
Copy link
Contributor Author

So you attach a MIDI controller (keyboard) using a USB OTG adapter cable to the USB jack on the RPi Pico, and power the RPi Pico via pins GND and VBUS?

@AnotherJohnH
Copy link
Owner

Sorry (again) should have been clearer with my "seems to work" comment. MIDI in works but only as a USB device not as a USB host. i.e. MIDI out from my laptop over USB to the picoX7 works.

@probonopd
Copy link
Contributor Author

Thanks for the clarification. Do you plan to add USB host mode as well eventually?

@AnotherJohnH
Copy link
Owner

Yep, hope to, but my current priority is to add support for the Pico-2 and the Pimoroni pico Audio.

@mwedmark
Copy link

mwedmark commented Sep 9, 2024

Sound great! I just bought a Pico2 and have the bigger brother picodemo so that combination would be cool to try. I guess that extra processing power will get many more tones poly. Maybe even support with 2 instances would be possible? ;-)

@probonopd
Copy link
Contributor Author

Possibly https://github.com/rppicomidi/midi2usbhost/tree/main/C-Code could be helpful? It is C code that does what we need.

@probonopd probonopd changed the title USB MIDI in USB MIDI in (USB host mode) Oct 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants