PDA

View Full Version : Looking to make a MIDI controller for a guitar pedal that has a USB port



brand0nized
01-22-2015, 08:18 AM
Hello all! New to the forum here and new to programming.

I'm looking to make a MIDI controller to control different functions on a guitar pedal that has been shown to be able to be controlled by MIDI commands (Zoom MS-70CDR to be exact). I've seen a couple of youtube videos from people who've programmed their own controllers, and I'd like to make my own in the spirit of DIY.

Some questions:
1.) Will the Teensy 3.1 do the job?
2.) How do I know if I need a USB host shield? (I've seen one video that uses one and another that doesn't to control the pedal)
3.) What are some resources to start learning about programming for MIDI?

PaulStoffregen
01-22-2015, 10:48 AM
The USB port on the Zoom MS-70CDR appears to a USB device.

If it is, you would need something like the USB host shield. You'd also need MIDI support in the UHS library. I do not know if UHS supports MIDI devices. There's no mention on MIDI on the UHS documentation (https://github.com/felis/USB_Host_Shield_2.0#documentation), so my guess is this doesn't look like a good sign. Maybe Andrew will notice this post and comment?

MuShoo
01-22-2015, 11:37 AM
From what I can tell, I doubt you'll be able to do this without using USB Host. As far as I'm aware, USB Host mode doesn't really exist (or at least, isn't complete) on the Teensy yet. I've no idea if you'd be able to get the USB Host Shield working with a teensy (and it'd probably be a bit large) -- the adafruit one uses SPI, so it's certainly POSSIBLE (I think), but it might not be EASY, depending on how the library for that shield was written.

brand0nized
01-22-2015, 04:43 PM
From what I can tell, I doubt you'll be able to do this without using USB Host. As far as I'm aware, USB Host mode doesn't really exist (or at least, isn't complete) on the Teensy yet. I've no idea if you'd be able to get the USB Host Shield working with a teensy (and it'd probably be a bit large) -- the adafruit one uses SPI, so it's certainly POSSIBLE (I think), but it might not be EASY, depending on how the library for that shield was written.

What makes you believe that this could work without a USB shield?

The PJRC website shows a USB host shield that is compatible with teensy 3.1 (https://www.pjrc.com/teensy/td_libs_USBHostShield.html), but it'll have to run at 3.3v, but midi needs to be 5v?

Is there a different arduino board you would recommend to program this controller?

brand0nized
01-22-2015, 04:46 PM
The USB port on the Zoom MS-70CDR appears to a USB device.

If it is, you would need something like the USB host shield. You'd also need MIDI support in the UHS library. I do not know if UHS supports MIDI devices. There's no mention on MIDI on the UHS documentation (https://github.com/felis/USB_Host_Shield_2.0#documentation), so my guess is this doesn't look like a good sign. Maybe Andrew will notice this post and comment?

I'm confused with that you're trying to say here. Are you saying that teensy 3.1 is incapable to communicating midi commands to a USB device?

MuShoo
01-22-2015, 05:21 PM
I never said that I thought you'd be able to make it work without a Host Shield. I said I "doubt you can make it work without using usb host."

MIDI over USB doesn't matter what voltage MIDI needs - it matters what voltage USB needs. You'll notice that on the link Paul provided, there's a whole section devoted to how USB needs at least 4.4v, and there's a way to provide a separate higher-voltage supply for said USB devices.

Basically, if you're brand new to all of this, starting your project in this particular fashion is probably just going to make you frustrated - you'll need to do some rather precise, tiny hardware mods for the USB Host SHield that Paul linked, and possibly some very heavy-duty software modification to it as well (to allow for MIDI data). I would suggest getting a Teensy, and just messing around with making a 'regular' usb MIDI *device* out of a Teensy - not trying to control this very strange, and not-well documented piece of USB hardware.

If you're dead set on controlling this strange, not-well-documented USB-MIDI guitar pedal - go with whatever board you've seen other people use in these videos. At least with that, you know that it works, and hopefully won't be already starting with a number of 'disadvantages' by having to reinvent the wheel just to make it work with a Teensy.

Nantonos
01-22-2015, 09:54 PM
I'm confused with that you're trying to say here. Are you saying that teensy 3.1 is incapable to communicating midi commands to a USB device?

USB has the concept of a device and a host. ("Device" is being used here as a technical term, not in the general sense). You can connect one or more USB devices to a USB host. You can't connect a USB device to another USB device. Typically, a USB Host is something like a computer or laptop.

So, you absolutely can use Teensy to make a USB device that sends MIDI over USB. You also can use Teensy to make a USB device that receives MIDI over USB. (And various combinations, like both send and receive; or recieve over USB and send over DIN).

What you can't easily do, and may not be able to do at all, is create a USB host that recieves and sends MIDI from/to a USB device. There is some hardware (USB host shield for Arduino Pro Mini) that can do the hardware part; the trick is writing the USB host software.

So - if you want to make a MIDI controller that plugs into a computer and talks to your MIDI-compatible pedal that also plugs into your computer, you are all set. If you want your controller to plug directly into your pedal, its a hard problem.

Lawrence_doss
07-24-2015, 07:49 AM
Friends,
Check this out...
http://lawrencedoss.blogspot.in/2014/08/my-tryst-with-hacking-zoom-ms-70cdr.html
Regards,
Lawrence

divabanana
11-16-2015, 08:13 PM
I used this http://www.hobbytronics.co.uk/usb-host/usb-host-board-v2 for exactly this task.
You can get it pre-loaded as a midi device and the USB +V is taken straight from the +5v you give the module so as long as your PSU is able to give enough mA you can easily bus power the pedal along with whatever else you want to connect (in fact I'm using a backlit 16x2 LCD with it too).

With a TeensyLC, this USB host board and the midi library I can control the Zoom pedal (patch up, patch down, toggle tuner on and off, set upper and lower patch numbers to cycle through and using the JChristensen button library I even have a mode where you can navigate to a patch number but only change to it with another button press and can easily toggle between these modes).

Send me an email if you want more details.

houtson
11-16-2015, 09:17 PM
I use the same Hobbytronics usb host module to use a usb midi controller (korg nano keys) without a computer - super easy to integrate with teensy the midi library

adrian
11-16-2015, 09:27 PM
why not try a midi to usb cable and use serial midi out from the teensy? I did that to send serial midi to a usb host, so maybe it won't work sending to a usb device? I don't know. But those cables are like $5 and you need about 2 resistors and a $3 DIN plug to get a serial midi out on a teensy. That hobbytronics host board looks interesting, divabanana. Thanks for that. Looks like the ticket.

EDIT Using a midi to usb cable to send to a usb device is 99% doomed to failure ...I'm leaving the post here as a monument.

Ph0noX
01-19-2016, 10:18 AM
I use the same Hobbytronics usb host module to use a usb midi controller (korg nano keys) without a computer - super easy to integrate with teensy the midi library

@divabanana
@houtson

Thanks! Hobbytronics USB Host module looks like the way to go! Could you please post some instructions on the integration with Teensy (midi library)?

houtson
01-19-2016, 10:19 PM
@divabanana
@houtson

Thanks! Hobbytronics USB Host module looks like the way to go! Could you please post some instructions on the integration with Teensy (midi library)?

Hi,
Integration is super easy: supply the USB Host board with 5V and GND from the Teensy board and connect the Teensy RX1 input (pin 0) to the USB Host boards TX pin. You will then get midi data appearing on the Teensy Serial Port.

In software have a look at the MIDI examples in the library (http://www.pjrc.com/teensy/td_libs_MIDI.html) and you should be good.

There is an example which also uses the Audio Board here http://www.hobbytronics.co.uk/midi-player-tutorial

Ph0noX
01-21-2016, 07:35 AM
Hi,
Integration is super easy: supply the USB Host board with 5V and GND from the Teensy board and connect the Teensy RX1 input (pin 0) to the USB Host boards TX pin. You will then get midi data appearing on the Teensy Serial Port.

In software have a look at the MIDI examples in the library (http://www.pjrc.com/teensy/td_libs_MIDI.html) and you should be good.

There is an example which also uses the Audio Board here http://www.hobbytronics.co.uk/midi-player-tutorial

Thanks Houtson! seems like the only way this would not work is nuclear fallout (and me not being in my shelter;-)!:p