GR-55 Bidirectional SysEx

Started by ForestCat, January 31, 2015, 06:57:58 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

ForestCat

I know a lot of the GR-55 fervor has calmed down, but I'm really hoping one of the guys (gumtown, marc, etc) who were deep in the trenches w/ its Sysex implementation might be able to answer this authoritatively...

Is there a way (without grabbing an entire patch, buffering, parsing, etc.) to grab the current value of a given parameter ?

The idea being, that, for a basic example , you want to assign Filter COF to a x-axis, and Filter Rez to the y-axis of an ipad-based x-y pad (MidiStuff, TouchOSC, Lemur, whatever).

Ideally, you might want to have the GR-55 patch's pre-programmed values correspond to the center of the x-y pad, so that when you are done noodling expressively(hopefully...) w/ the x-y pad, you center it(or some other gesture) to bring you back to the GR-55 patch's original values.  I hope that makes sense, but, according to my wife, I don't always get my point across clearly, lol, so please ask if clarification is needed.
Thanks for any help on this


Elantric

#1
Lots of info on GR-55 MIDI Sysex is here:

Complete Roland GR-55 MIDI Implementation
https://www.vguitarforums.com/smf/index.php?topic=3348.0

Control GR-55 with TB MIDi Stuff (iPhone / iPad)
https://www.vguitarforums.com/smf/index.php?topic=5798.msg60019#msg60019

Marc Benigni's GR-55 TouchOSC Navigator for iPad
https://www.vguitarforums.com/smf/index.php?topic=3205.0


---

This blog by Craig Kickbush explains all details for creating a TB MIDI Stuff Wired Bidirectional MIDI  GR-55 control using MIDI system exclusive messages with iPad 4, TB MIDI Stuff, iRig MIDI and Roland GR55
https://craigkickbush.wordpress.com/2013/09/23/bidirectional-system-exclusive-messages-with-ipad-4-tb-midi-stuff-irig-midi-and-roland-gr55/

( Luckily I save a copy below)

Craig Kickbush wrote>

Ok, sorry it's taken a while...I will explain as simply as I can what you need and how to do this. There are more ways than one to do this and there are also other apps (Lemur for example) that can do this but this is what I use.



You need the TB Midi stuff app for ipad/iphone from the app store.
A midi interface for your ipad (I use an iRig Midi but you might be able to use a generic midi to usb cable and use the Apple camera kit). I have the iPad 4 so had to get a lightning to 30 pin adaptor for the iRig midi. This device also has an app for applying updates etc, just search iRig midi in the app store.
There are some GR55 templates available from here

https://www.vguitarforums.com/smf/index.php?topic=5798.25

Log in and DOWNLOAD these TBMIDI Stuff  GR-55 Templates below
*  GR 55 - 01 Amplifier.tbms (170.24 kB)
*  GR 55 - 02 FX Assigns.tbms(116.13 kB)

you may have to register with vguitarforums to download) but bear in mind they are set up to run in Guitar mode. If you want to change the sysex messages to bass mode you'll have to go in and edit every single control, but you can at least test it in guitar mode to see if it's working for you. But these templates are already set up with bidirectional messages built in.


And that's it really. Just load up a template in TBmidistuff (through iTunes) and away you go. Unfortunately there's not a lot of documentation on TBMidistuff, but they do have a forum and the developer is very helpful, and he's on vguitarforums.com if you want to ask him stuff. Be prepared to spend a lot of hours if you want to create your own template! The good thing is you can copy controls from one template to another, so it can get you started.

What is basically happening here is we're sending a sysex message to the GR55 (sysex being able to access a parameter directly, not having to make a midi assignment (GR55 allows you to make up to 8 assignments, but sysex makes that unnecessary)). Along with this message we're also sending a "request" message, which tells the GR55 to tell us the current value of the parameter we're controlling. So TBmidi stuff on the iPad then receives a message from the GR55 and updates it's control based on the info from the GR55. Obviously for this to work you need to connect midi BOTH WAYS (ie, ipad midi out > GR55 midi in | GR55 midi out >ipad midi in).

———————————————————————————————————-

4. If you want to do any custom templates of your own, you really need the GR55 floorboard editor (Mac or PC) (not for the actual editor itself, but if you run it in "debug" mode (Settings/preferences/midi/debug on/off) it will tell you the system exclusive messages you need to program TB midi stuff [it appears briefly on the bottom row, so you might have to do it a few times to get it all). Note this program is only to get the sysex codes for your own templates, you don't need it to make tb midi stuff actually work. And to get the codes you don't even need the GR55 connected to the computer.

There's a ton of reference infomation at vguitarforums

And here's the anatomy of a Roland sysex message:
F0 = sysx header
41 = Roland manufacturer
10 = device ID (fixed at 10h )
00 00 53 = GR-55
11 = data request
18 00 00 01 = data address (18 is temporary patch memory and 01 is 2nd byte in patch file)
00 00 00 10 = data size request (which 10h = 16 bytes)
CS = CheckSum
F7 = sysx End Of File

I highly recommend getting one of the templates and have a look at the codes to see how it all works before trying to build any custom ones. Hope this helps or at least puts you in the right direction.

https://craigkickbush.wordpress.com/2013/09/23/bidirectional-system-exclusive-messages-with-ipad-4-tb-midi-stuff-irig-midi-and-roland-gr55/





Get Craig Kickbush's  TB MIDI STUFF GR-55 Templates here
https://www.vguitarforums.com/smf/index.php?topic=5798.msg70970#msg70970

gumtown

Simple answer is Yes, single parameter values can be extracted from the GR-55 via sysx data request, by using data start address and data block size (single GR-55 parameters are 1, 2 or 3 bytes in size).
Free "GR-55 FloorBoard" editor software from https://sourceforge.net/projects/grfloorboard/

ForestCat

#3
Thank you, gentleman.  I loaded Craig's template, set up a rather wiry monitoring system to observe the MIDI traffic, and was able to identify where/when the GR-55 was responding to sysex queries.  Should be able to work w/ that.

One question:  Does anyone here who was remotely involved w/ The Missing Link have any recollection of whether it was able to convert MIDI data at it's DIN IN to OSC over WiFi?  I was working w/ this a few years ago, and I swear it was, but I had to abandon it because it was locked to port 12345, while Lemur was locked to 8000, and neither developer would budge.  I'm revisiting the whole thing, trying to use wireshark to snag any packets coming from 192.168.1.100, and zilch.  I have used the TouchOSC config template to set the routing, seems to be working in that I can redirect usb MIDI to DIN MIDI, but no luck w/ OSC Out.  It is a real shame that the product was abandoned so completely that not even the forum, the only source for any troubleshooting info, remains.  Some real basic stuff via Wayback Machine, a couple of youtube demos, but nothing remotely like the info I need, which I remember was on that forum...

mbenigni

QuoteThe Missing Link have any recollection of whether it was able to convert MIDI data at it's DIN IN to OSC over WiFi?

Unfortunately I can't remember any details three years after the fact, but I do remember that I was discussing bidirectional communication via the ML with my contact at Jabrudian (Hans?) at that time, and he indicated that a firmware update was in the works to make this possible.  That firmware was never released, and of course the product is now discontinued, so what you see is what you get.  Anyway, it seems like a safe bet that the issues you're describing are related to the limitations in firmware that we were trying to sort out then.

Macciza

What is the issue with the port number?
Lemur is only locked to 8000 on iPad for incoming messages.
'70s Strat, Brian Moore iM, VG-8, VG-99, FC-300, VL-70m, StringPort, SoftStep, Sentient6, iMac QC i7 27".

ForestCat

The issue is that The Missing Link's capability to change it's outgoing OSC udp port from the default 12345 w/ /config/targetPort, etc is broken, and always has been.  It is stuck on 12345, and, since it is abandonware, that is that. The sourcecode has been made public, but it's an older version than I already have, and I don't want to chance bricking the thing w/ a bad compile, etc.  RE: Lemur, There is absolutely NO good reason that a program should have its incoming udp port locked to some arbitrary value like 8000, or whatever. 
I sent an email to Liine yesterday:
"Hi,
        A couple of years ago, I was attempting to use the Missing Link (osc-MIDI <> MIDI-osc converter) w/ Lemur.  I ran into a dead end in that:
a) Lemur only recognizes incoming OSC on port 8000
b) The functionality to change the transmitting osc port on the Missing Link is broken, and the product is no longer sold/supported.
     I'm revisiting it now because it is the only practical h/w-s/w solution for what I'm trying to do.
Would you consider adding the ability to set Lemur's receiving OSC port?  I have to believe it would be a truly minimal coding effort, and would be a godsend to those in situations similar to my own.  Thanks.
P.S.  I'll be first in line to beta test :-)"

Liine's response to my query today:
"Hi!
Thanks for getting in touch. Customising incoming OSC port has been on
the feature wishlist for a while. I can't promise anything, but it's
always great to hear from people and realworld use-cases."

"A while" is at least 2 1/2 years, which is when I last approached them about this.

Now I'm contacting random iOS developers, trying to hire someone to write me a quick utility to run in the background and do a port redirection.  No joy.  So I just downloaded python on my jailbroken iPad, I'll see if I can learn enough to maybe do it myself, which, or course, takes me farther away from my goal of actually playing my guitar at some point before I die of old age, lol.  These tcp/udp utilities abound in the Windows world.  Thank you again Apple for your paranoid deathhold on iOS and the developers who code apps for it.  Most of these guys are terrified at the thought of selling someone an .ipa with "forbidden" powers, God forbid, outside of iTunes. Hopefully I can reach the network layer with python.  I don't have enough lifetimes left to learn objective c++...


Elantric

ForrestCat - check your PM Inbox for the Misssing Link developer contact info

mbenigni

#8
QuoteSo I just downloaded python on my jailbroken iPad, I'll see if I can learn enough to maybe do it myself, which, or course, takes me farther away from my goal of actually playing my guitar at some point before I die of old age, lol.

Welcome to my nightmare.  :)

QuoteI don't have enough lifetimes left to learn objective c++...

You are a wise man.  A few years back I decided that developing a quick iOS video game would be the ticket to get me out of the crushing mortgage/day job trap (I was actually a few years too late to hit the "get rich quick" window) and learned Objective C++, along with all those bizarro iOS development tools.  It took a couple of months (of not actually playing my guitar) but felt like a lifetime.  Objective C++ is not a pretty language (subjectively speaking.)

ForestCat

lmao. My brother has this great saying:  "Drill a hole?  Fix the drill...".  I'm still working on the prerequisites for the prerequisites for the prerequisites for the prerequisites for the prerequisites for the "simple" thing I needed to do five years ago. "Bored" is not a word that exists in my vocabulary.  I have enough projects in progress to keep me amused for the conceivable remaining life of the universe...

Marc, do you (or anyone reading this) still have an iOS development setup, even an older one?  Could you see if the following will compile? It's a generic POSIX udp port redirector I found on the web. All I have is a hacked iOS7 sdk w/ the Cydia toolchain on my ipad, and clang++ whines about the recvfrom() function.  Thanks, man.

*****************************
#include <stdio.h>
#include <stdlib.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <net/if_dl.h>
#include <sys/syscall.h>



int main(int argc, char *argv[]) {
   if (argc!=3 && argc!=5) {
      printf("Usage: %s our-ip our-port send-to-ip send-to-port\n",argv[0]);
      printf("Usage: %s our-ip our-port             # echo mode\n",argv[0]);
      exit(1);
   }

   int os=socket(PF_INET,SOCK_DGRAM,IPPROTO_IP);

   struct sockaddr_in a;
   a.sin_family=AF_INET;
   a.sin_addr.s_addr=inet_addr(argv[1]); a.sin_port=htons(atoi(argv[2]));
   if(bind(os,(struct sockaddr *)&a,sizeof(a)) == -1) {
      printf("Can't bind our address (%s:%s)\n", argv[1], argv[2]);
      exit(1); }

   if(argc==5) { a.sin_addr.s_addr=inet_addr(argv[3]); a.sin_port=htons(atoi(argv[4])); }

   struct sockaddr_in sa;
   struct sockaddr_in da; da.sin_addr.s_addr=0;
   while(1) {
      char buf[65535];
      int sn=sizeof(sa);
      int n=recvfrom(os,buf,sizeof(buf),0,(struct sockaddr *)&sa,&sn);
      if(n<=0) continue;

      if(argc==3) { sendto(os,buf,n,0,(struct sockaddr *)&sa,sn);
      } else if(sa.sin_addr.s_addr==a.sin_addr.s_addr && sa.sin_port==a.sin_port) {
         if(da.sin_addr.s_addr) sendto(os,buf,n,0,(struct sockaddr *)&da,sizeof(da));
      } else {
         sendto(os,buf,n,0,(struct sockaddr *)&a,sizeof(a));
         da=sa;
      }
   }
}

supernicd

I can't figure out exactly what you're trying to accomplish, or why you would want to bring OSC into the equation, since the GR-55 doesn't speak it. :)

QuoteThe idea being, that, for a basic example , you want to assign Filter COF to a x-axis, and Filter Rez to the y-axis of an ipad-based x-y pad (MidiStuff, TouchOSC, Lemur, whatever).

Ideally, you might want to have the GR-55 patch's pre-programmed values correspond to the center of the x-y pad, so that when you are done noodling expressively(hopefully...) w/ the x-y pad, you center it(or some other gesture) to bring you back to the GR-55 patch's original values.

Is this still your goal?  If so, and you're working with Lemur, I might have some suggestions that don't involve compiling Xcode projects or OSC-->MIDI converter hardware.
Strat w/ GK-3, Godin LGXT
VG-99, GR-55, GP-10
---------------------------------------------------------------

Elantric

#11
QuoteI can't figure out exactly what you're trying to accomplish, or why you would want to bring OSC into the equation, since the GR-55 doesn't speak it.

I agree

IMHO If its Wireless remote you seek - you could accomplish more using

Raspberry Pi mounted near GR-55 with a $5 Wi-Fi Dongle

Run Lemur on Ipad  - and use MIDI over Wifi connection to RPI

http://support.liine.net/customer/portal/topics/532086-lemur-connectivity/articles

PI as a wireless midi controller interface
http://webcache.googleusercontent.com/search?q=cache:4VIi-mfMZy8J:www.raspberrypi.org/forums/viewtopic.php%3Ff%3D38%26t%3D52227+&cd=1&hl=en&ct=clnk&gl=us

mbenigni

Quote from: ForestCat on February 03, 2015, 08:37:17 AM
I'm still working on the prerequisites for the prerequisites for the prerequisites for the prerequisites for the prerequisites...

Man, it's almost scary to read someone else saying this same thing.  I told a friend, years ago, that mine was a life spent preparing to prepare to prepare.  At the time, I was mostly referring to my practice regimen.  Things only got worse when I let technical distractions take hold.   ::)

QuoteI have enough projects in progress to keep me amused for the conceivable remaining life of the universe...

I can relate, except that I'm frustrated, etc. as often as I'm amused.

QuoteMarc, do you (or anyone reading this) still have an iOS development setup, even an older one?  Could you see if the following will compile? It's a generic POSIX udp port redirector I found on the web. All I have is a hacked iOS7 sdk w/ the Cydia toolchain on my ipad, and clang++ whines about the recvfrom() function.  Thanks, man.

I'm afraid I don't.  The mac mini I was using at the time (ca. 2009) is still in a pile in my basement somewhere, but the software is significantly further out of date than what you describe.  It would take ages for me to answer your question.  Hopefully someone else here is better able?

mbenigni

P.S.  I generally agree, unless you're already very far along with an OSC implementation, that you're better off steering clear entirely.  If I had it to do over again, I'd probably go with an interface other than the Missing Link.  Especially now that it's discontinued/ unsupported.

mbenigni

#14
P.P.S.  Since you are among the few who do have a Missing Link, consider downloading my template - if you haven't already - and playing with it for a while.  You might find it useful, despite having to develop a workflow/mindset to deal with the lack of bidirectional communication.

*By workflow/ mindset, I'm referring to something you might be able to apply to your own existing solution:  developing patches whose "starting states" are consistent and familiar to you, so that your "live" edits are more easily reversed.  For instance, in the example from your OP:

QuoteIdeally, you might want to have the GR-55 patch's pre-programmed values correspond to the center of the x-y pad, so that when you are done noodling expressively(hopefully...) w/ the x-y pad, you center it(or some other gesture) to bring you back to the GR-55 patch's original values.

...you'd just make a point to set the target parameters to 0/ 0, or 50%/ 50% - whatever is appropriate and easily managed with the on-screen controls - before saving the patch.  I actually have a personal template (as opposed to using the Roland Init template) that's optimized for my own expectations and needs, which helps me deal with the fact that I'm "flying blind" when I first load a patch.

ForestCat

You guys might be right.  Wouldn't be the first time I walked out my back door and around the planet to get to my mailbox across the street, lol.  OK, objectives, in no particular order:

1. iPOD touch on guitar, running Lemur, TBMS, etc.,  communicating w/ GR-55 via DIN MIDI.

1. Compact, w/ absolute minimum setup/breakdown time, wires, boot times, due to the nature of the types of events/venues I play, generally multi-act/artist, w/ EXTREMELY limited time allowances. Otherwise, I'd be using a laptop w/ rtpMIDI/Bidule/Live and we wouldn't be having this discussion, lol.

2. ROCK STEADY Reliability/Roadworthiness.  30-pin wired solutions are out.  Missing Link seemed to fit the bill nicely other than the udp port setting bug.

I AM NOT MARRIED TO OSC! :-)

The only other non-computer-dependant wireless iOS coreMIDI solution I was aware of is the iConnect stuff, which is:
A. Bigger
B. More wires

In summary, I'm 98% of the way there w/ Lemur/Missing Link.  When I use a pc w/ puredata to intercept the crap on port12345 and redirect it to 8000, then bidirectional communication w/ Lemur/Missing link works.  For example, a Behringer FCB1010(or whatever) can be plugged into the ML, and trigger scripts in Lemur, which then do perverse things to the GR-55, etc.

If somebody knows of a _bulletproof_  Raspberry/Arduino WiFi CoreMidi to DIN MIDI solution, bypassing OSC, which supports bi-directional sysex, AND won't run me into months of forum surfing trying to make it work, you have my undivided attention....

supernicd

So you would like it to be wireless from the guitar to the 55?  Or you don't care (nice to have only)?
Strat w/ GK-3, Godin LGXT
VG-99, GR-55, GP-10
---------------------------------------------------------------

gumtown

#17
Rewind and take a few steps right back to the start - what is it that needs to be wireless?
I am guessing it's an iPad on a mic stand being used to control the GR-55 directly below it?

Life might be easier and full of more guitar playing without the wireless part too.

BTW: If you need to deploy your app from your development IOS, you still need to pay an annual $100 Apple Developer subscription fee to upload you app to AppStore, and the software won't build into a final useable app until it is 'signed' from the same subscription account.
Free "GR-55 FloorBoard" editor software from https://sourceforge.net/projects/grfloorboard/

ForestCat

I guess a picture is worth a thousand words...


This guitar requires a fairly substantial rack & at least a laptop to even play a note, and I'd never bring it out for a small gig.  I've had it since 1974, been "building" it ever since, and it is, in a word, irreplaceable.  What I'm doing is "virtualizing" the h/w controls on the 'Paul into another ipodTouch for use on my other guitars for the live gigs I was talking about.  So no, we're not talking about an iPad on a stand.  This is an integral part of the instrument itself, and yes, needs to be wireless, since the 30 pin dock connector is too easy to knock loose.

On a positive note, just got done corresponding w/ the ML programmer, and I _think_ I've got the ML sending OSC on udp port 8000.  A cautious "yeeeehaaah!" is in order...

Elantric

Many of us here own Missing Links - if you have a Eureka moment with the updated ML Firmware - consider sharing?

mbenigni

Congrats on getting ahold of the ML developer - I hope this all works out for you.

I'll see your cautious "yeeeehaaah!" and raise you an enthusiastic "WOAH!"  That Les Paul is seriously cool.  (Do you happen to have any videos - YouTube or otherwise - of yourself putting that guitar through its paces?)

supernicd

QuoteI guess a picture is worth a thousand words...

Holy guitar from a future decade, Batman.  Wow, that looks complicated. :)

Hopefully the ML approach will work since it seems like you're already somewhat vested.  Let us know how it goes.
Strat w/ GK-3, Godin LGXT
VG-99, GR-55, GP-10
---------------------------------------------------------------

ForestCat

Thanks, guys.  It's always a nice treat when anyone "gets it", lol

It's a work in progress, a fragile, mostly-working prototype, suffering from a severe case of feature-creep.  I'm one of those OCD type who has zero ability to call a thing finished once I realize I can take it further.



One thing to note:  This thing sports both 13 & 24 pin interfaces, since I own a functional GR-700 & 300.  That's what most of the knobs & small toggles are for.

Marc, re videos, I don't have anything showcasing a fraction of what it can do, since I'm too busy working on it or writing music to do any decent videos, which are insanely time-intensive to do right.  Of course, there are the usual crowd-shot cell phone things w/ abysmal audio.  Here's something that might be worth watching (on something w/ decent bass response if at all possible :-) ).  It's kind of an ambient piece, pure, realtime guitar synth, nothing sequenced or overdubbed, utilizing some string splits/layers, some of the control surfaces & bidule macros.  Bear in mind, there's an FC-300 among other things on the floor controlling the sostenuto, etc.  Nothing flashy.


Something more uptempo. This utilizes more guitar, and features the GR-55, looped in Live (again, stuff on the floor).  The fsr drum triggers are loading a looping MIDI sequence in Live.  They are not working that well, having a miserable time with debouncing/scaling velocity. 





Vade

Guitar, studio, music all working together and looking/sounding great. Keep us posted and good luck on getting the latest leg up and running.
Drachen; Fender FTP Strat w/internal GK-3, Godin xtSA w/FTP, Boss GP-10, VoiceLive 3, Scarlett 18i8, ZBox IQ01, On-Lap 1502i, D:fine 4088, 4E Dual Axis Exp Pedal, VoiceSolo FX-150, Yamaha DXR 10, Gem. M2 Flute, Special 20 Harmonicas. Fender Deluxe Reverb Mahogany Cane.

https://soundcloud.com/vadie

mbenigni

ForestCat, everything about that last post made me smile.  :)  Great stuff!