Author Topic: DIY USB MIDI Host to MIDI - Use FTP without computer  (Read 7365 times)

0 Members and 1 Guest are viewing this topic.

Offline Spider

DIY USB MIDI Host to MIDI - Use FTP without computer
« on: October 09, 2013, 07:41:01 AM »
Finally I made some tutorial... Please ask, comment etc.

MIDI USB HOST DIY tutorial
By Spider ver. 1.0 (9 Oct 2013)


Download PDF Instruction in ENG here: http://cyfrowogitarowo.pl/archiwa/124
« Last Edit: September 02, 2014, 07:54:19 AM by Spider »

Offline utensil

Re: DIY USB MIDI Host for FTP / Use it without computer
« Reply #1 on: October 10, 2013, 12:46:53 AM »
Hi Spider, I just saw this post and got your tutorial, I'm sure I'm not the only one who appreciate this but Thanks ! I'm going to follow your tutorial and make one for myself in the next week and this will really make things easier for me.


Offline dacama

Re: DIY USB MIDI Host for FTP / Use it without computer
« Reply #2 on: October 10, 2013, 02:10:08 AM »
Hello,

But what does it do exactly? Recieves the FTP signal and send it to MIDI port?

Thank you

Offline Elantric

Re: DIY USB MIDI Host for FTP / Use it without computer
« Reply #3 on: October 10, 2013, 03:24:59 AM »
Quote
Recieves the FTP signal and send it to MIDI port?

Correct - like the Kenton USB Host to MIDI convertor or iConnectMIDI Box

Good job Spider!

Offline dacama

Re: DIY USB MIDI Host for FTP / Use it without computer
« Reply #4 on: October 10, 2013, 04:04:34 AM »
Thank you Elantric!

Offline Spider

Re: DIY USB MIDI Host for FTP / Use it without computer
« Reply #5 on: October 10, 2013, 05:14:46 AM »
But DIY solution has at this moment one big minus: You couldn't;t use it with computer. Of course it is possible and maybe one day Yuuichi Akagawa  will write newer version of their library like changed it two times on my request (he resolved problem with PC in multi MIDI USB host and added support for 5 DIN MIDI In > USB Host :)


Offline bbtshane

Re: DIY USB MIDI Host for FTP / Use it without computer
« Reply #6 on: February 25, 2014, 06:52:04 PM »
Spider,  I am having issues getting the code to run.  I keep get an error on the verify step.

Offline Spider

Re: DIY USB MIDI Host for FTP / Use it without computer
« Reply #7 on: February 26, 2014, 03:51:26 AM »
@bbtshane
send me more info, screenshots from IDE and info about libraries which you use.

Offline bob4u

Re: DIY USB MIDI Host for FTP / Use it without computer
« Reply #8 on: March 09, 2014, 05:34:20 PM »
Finally I made some tutorial... Please ask, comment etc.

THANK YOU Spider, I did it and it works !   ;D

The only thing important also for the other people:
it's not clear the use and functionality of the MIDI IN connector.
Does it merge with FTP messages?
Also is safer for MIDI IN to use a schematic using a optocoupler, e.g.:
http://theaudiostash.files.wordpress.com/2013/05/midi_in.png?w=604

Ciao!


Offline Spider

Re: DIY USB MIDI Host for FTP / Use it without computer
« Reply #9 on: March 09, 2014, 05:59:11 PM »
Use MIDI IN for:
* sending Program change message to  FTP from some floorboard (look at G-Lab GSC-4 for example)
* sending CC#66 to FTP and use it to control a hold pedal like in computer apps

Offline FreeTime

Re: DIY USB MIDI Host for FTP / Use it without computer
« Reply #10 on: March 10, 2014, 11:59:44 AM »
The reason for the optocoupler is to prevent ground loops. Have a look here for more info :
http://www.jaycar.com.au/images_uploaded/optocoup.pdf

Offline Spider

Re: DIY USB MIDI Host for FTP / Use it without computer
« Reply #11 on: March 10, 2014, 12:08:35 PM »
BTW: MIDI IN is soft THRU so it could be used for something more then for FTP.
« Last Edit: June 12, 2014, 11:00:05 AM by Elantric »

Offline Spider

Re: DIY USB MIDI Host to MIDI - Use FTP without computer
« Reply #12 on: March 10, 2014, 12:15:37 PM »
The reason for the optocoupler is to prevent ground loops. Have a look here for more info :
http://www.jaycar.com.au/images_uploaded/optocoup.pdf

Yes it is a reason! And good advice :)
« Last Edit: June 12, 2014, 10:56:03 AM by Elantric »

Offline lord-g

Re: DIY USB MIDI Host to MIDI - Use FTP without computer
« Reply #13 on: September 02, 2014, 07:51:38 AM »
How Nice!
Good Job man, i will do one like this!!!
Thank You

Spider
Can this conversor control the BOSS GP-10?
« Last Edit: September 02, 2014, 08:00:44 AM by lord-g »

Offline Elantric

Re: DIY USB MIDI Host to MIDI - Use FTP without computer
« Reply #14 on: September 02, 2014, 10:56:19 AM »
Quote
Can this converter control the BOSS GP-10?


See link below for alternative strategy to add 5 pin MIDI I/O to Boss GP-10 using $35 Raspberry Pi computer
http://www.vguitarforums.com/smf/index.php?topic=11998.0
« Last Edit: September 16, 2015, 11:48:16 AM by Elantric »

Offline lord-g

Re: DIY USB MIDI Host to MIDI - Use FTP without computer
« Reply #15 on: September 02, 2014, 11:07:15 AM »
No

See link below for alternative strategy to add 5 pin MIDI I/O to Boss GP-10 using $35 Raspberry Pi computer
http://www.vguitarforums.com/smf/index.php?topic=11998.0

Elantric
Thank You
« Last Edit: September 16, 2015, 11:07:12 AM by Elantric »

Offline AaronMusic

Re: DIY USB MIDI Host to MIDI - Use FTP without computer
« Reply #16 on: September 16, 2015, 11:02:11 AM »
Finally I made some tutorial... Please ask, comment etc.

MIDI USB HOST DIY tutorial
By Spider ver. 1.0 (9 Oct 2013)


Download PDF Instruction in ENG here: http://cyfrowogitarowo.pl/archiwa/124

Hello and thanks for the tutorial. I followed it using the recommended boards and installed the required libraries.
But I ran into some compilation errors including:
D:\Docs\Arduino\libraries\USB_Host_Shield_2.0-master/SPI.h:54:22: fatal error: avr32/io.h: No such file or directory
D:\Docs\Arduino\libraries\USB_Host_Shield_2.0-master/SPI.h:54:22: fatal error: avr32/io.h: No such file or directory

I'm using the latest Arduino IDE, ver 1.6.5 on two PCs with the same results, (WinXP and a Win 8.1)
The standard Arduino example sketches compile and run fine from both PCs. (Blink, etc.)
USB_MIDI_converter.ino and bidrectional_converter.ino give the same error messages.

Any suggestions?  Thanks, Aaron


Offline Spider

Re: DIY USB MIDI Host to MIDI - Use FTP without computer
« Reply #17 on: September 16, 2015, 11:58:36 AM »
All new libraries should be where Arduino IDF libraries are. And use simple names for folder like USB_Host_Shield_2 not USB_Host_Shield_2.0-master. On GitHub use Download as a ZIP button.

Offline AaronMusic

Re: DIY USB MIDI Host to MIDI - Use FTP without computer
« Reply #18 on: September 16, 2015, 02:32:42 PM »
All new libraries should be where Arduino IDF libraries are. And use simple names for folder like USB_Host_Shield_2 not USB_Host_Shield_2.0-master. On GitHub use Download as a ZIP button.

Thanks for the quick reply. The problem is that the headers are not in the libraries. The two missing files (so far) are SPI.h and avr32/io.h.

Arduino IDE, ver 1.6.5 installs libraries from the ZIPs from within the IDE and puts them in the default document directory in its own sub-directry, ie. D:\Docs\Arduino\libraries. (and requires them to be there) I downloaded all of the libraries as full ZIPs.

The calls for the missing files are from "includes" within files in those libraries, not from the main sketch. So the compiler is reading the libraries, it's just that SPI.h and avr32/io.h are not in there. 

I'm wondering if this a problem in the newer version of the Arduino IDE. What version did you use?

I found the following on https://communities.intel.com/message/227889
.......................
"The avr directory (avr32/io.h) is Atmel processor specific; there is no Intel equivalent. In these forums, at least one include was converted (dummied out). io.h has not been converted, and will need some work by a forum member. "
.............
Re: How to find avr/io.h: No such file or directory
rmm200 Acolyte Mar 14, 2014 8:12 AM (in response to Wang_Xin)

The process is simple:

1) Download Arduino IDE 1.05. It can coexist with Arduino 1.53 (different directories).
2) Navigate to Arduino 1.05\hardware\tools\avr\avr\include\avr - this contains everything you will need to convert
3) Navigate to Arduino 1.53\hardware\arduino\x86\cores\arduino and create a directory avr
4) Copy io.h from 2) to 3)
5) Copy nested includes sfr_defs.h, portpins.h, common.h, and version.h as well
6) Now it gets harder - compile your sketch and correct all compile errors. Comment out all sections that don't apply to Galileo.
7) You are sure to need avr\pgmspace.h also. A corrected (commented out) version was posted to this forum.

What do you think?  Thanks, Aaron

Offline Spider

Re: DIY USB MIDI Host to MIDI - Use FTP without computer
« Reply #19 on: September 16, 2015, 02:48:26 PM »
I use Arduino IDE 1.05 on OS X and yes... new IDE doesn't work.

Offline AaronMusic

Re: DIY USB MIDI Host to MIDI - Use FTP without computer
« Reply #20 on: September 17, 2015, 11:43:34 AM »
I use Arduino IDE 1.05 on OS X and yes... new IDE doesn't work.

Thanks for the info. I downloaded Arduino IDE 1.0.5 and installed it on another WinXP machine. I installed the three libraries and compiled the USB_MIDI_converter.ino. It compiled without errors. I'll assemble boards later and test it with the FTP and a MIDI monitor and synth. I'll also write a follow up covering a few details I discovered so far that may help others.

Thanks again for your tutorial and your help. Cheerio, Aaron

Offline Spider

Re: DIY USB MIDI Host to MIDI - Use FTP without computer
« Reply #21 on: September 17, 2015, 11:47:30 AM »
Use sketch called Multi for FTP.
For bidirectional communication (sostenuto CC in for example) use "bidirectional" sketch.

Offline AaronMusic

Re: DIY USB MIDI Host to MIDI - Use FTP without computer
« Reply #22 on: September 18, 2015, 01:12:36 PM »
Use sketch called Multi for FTP.
For bidirectional communication (sostenuto CC in for example) use "bidirectional" sketch.

I tested today with FTP and a hardward synth. All works well. Thanks to Spider for the tutorial, to Yuuichi Akagawa for the library and everyone else who went before. I'll post a few notes to smooth over a few bugs I found along the way.

I used the USB_MIDI_converter.ino sketch because I only need MIDI in one direction. But I imagine any of the sketches (except dump) would do this as well.

I have two goals for this project:

1. Play the FTP into a hardware synth without using a laptop. That's now accomplished.

2. Modify the MIDI stream coming from the FTP and change how it handles legato. I like the FTP better than any other MIDI pickup system I've tried but I would like a better/different implementation of legato for my playing style. I wrote some code to do this for wind controllers years ago using a different microprocessor so I have a head start on this goal. I'll post results on this if folks are interested.

Thanks again for all the help.  Cheerio, Aaron

Offline Spider

Re: DIY USB MIDI Host to MIDI - Use FTP without computer
« Reply #23 on: September 18, 2015, 01:31:09 PM »
You should use Multi if you want use separate MIDI channels for strings. In HW mode legato and other modes are determined by patch. So one could be set to triggered other to auto and third as stepped.

Offline AaronMusic

Re: DIY USB MIDI Host to MIDI - Use FTP without computer
« Reply #24 on: September 19, 2015, 09:03:43 PM »
You should use Multi if you want use separate MIDI channels for strings. In HW mode legato and other modes are determined by patch. So one could be set to triggered other to auto and third as stepped.

Thanks for the comment. I'm not sure I understand what you're saying. Yuuichi Akagawa's READ ME says:
for single device > File->Examples->USBH_MIDI->USB_MIDI_converter
for multiple device (with USB hub)> File->Examples->USBH_MIDI->USB_MIDI_converter_multi

That seems to suggest that either you need to use multi when you have multiple MIDI devices (with different IDs) in the same stream, or he's added code to handle multiple USB devices in the USB protocol. Not clear which he means.

I haven't read thru his code functions yet so I don't yet know how he's parsing either the USB or the MIDI stream. However I'm only using one FTP.  I am using it in hardware mode and in mono mode which sends each string on a different MIDI channel. But even if you assign strings to different splits it's still only one device, yes? I'm new to FTP and haven't dug into this yet.

In any case, while using the single version: USBH_MIDI->USB_MIDI_converter, I'm getting the same MIDI stream on 6 channels as I do when running it thru the laptop.

However my ultimate goal is to intercept the MIDI stream in the Arduino, discard the FTP's interpretation of legato (auto, stepped, etc.), modify the Note_On, Note_off sequences and handle legato passages in the hardware synth. So I still have to read a lot of his code to see where to modify it.

I appreciate both corrections to my understanding and suggestions in this project. Thanks again, Aaron