Lawrence Doss - Arduino based DIY MIDI control surface

Started by Elantric, April 10, 2016, 11:29:35 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Elantric



DIY Control surface for basic functionality using Arduino and a MIDI to USB converter. This has been done for my DAW - Mixcraft

Elantric

#1


Arduino based MS70CDR MIDI controller - Part 2

This is the version 2 of the Arduino based MS70CDR MIDI controller.

http://lawrencedoss.blogspot.com/
My tryst with the Zoom G3X
While my tryst with the zoom 70CDR continues, I happened to see some demos of the Zoom G3X and when I did dig deeper found that this processor in fact is loaded with features. So began my tryst with this Zoom G3X.
At the onset this processor is loaded with the same kind of effects (though not so many) like the MS70CDR (which I love by the way), this has some nice Amp modelling and some decent dirt pedals.
As in my previous blog, the major drawback for me in the MS70CDR were these things...
1.       No easy way to TAP TEMPO the tempo and use the TUNER
2.       No way to use my existing pedals / 70 CDR  in such a way that I could get dotted eighths
3.       Had to use a Amp modelling pedal like the Tech 21 series to get a decent sounding tone when running into the PA /mixer
To address these drawbacks, when I saw the Zoom G3X, I jumped at it.
And when I found out that the same MIDI signals can be used (which I used in the 70CDR), I couldn't but help, pick this thing up...
Now come the hacks J
I took the old 70CDR Arduino board and tweaked the code and viola, the Zoom G3X now does all I want it to.
1.       Change patches via MIDI
2.       Use TAP tempo and Tuner
3.       Dooooooooooooooootttted eighths delay ...
4.       There is one more thing I love  - Ability to switch ON / OFF individual pedals in a PATCH (I am writing code [50% done] to control this thingy via MIDI...


Here are some pics and a demo video of my small pedal board with the MIDI controller and foot switch.






Elantric

#3
Excellent
http://www.instructables.com/member/CarraN/



Arduino Based Boss GP-10 Program ChangerShow All 6 Images
Most of us who tried to control the Boss GP-10 by USB midi found that there is no plug'n'play solution to achieve it. A deep search on web of this topic can be a real headhache, some solution appear though. Here we'll see a solution that uses an arduino UNO and a USB shield (the one in the picture, other not tested). Total coast doesn't be more expensive than 20-26$ depending on where you buy/hack (mine taken from Aliexpress) and the type of the case (plastic, metal, whatsoever...) You must include four contact switch and dc female plug for powering.

This project include a schematic and arduino code. It was initialy writen for a Zoom MS70cdr pedal as it works with actually. Thanks to Lawrence Doss who kindly share his code. I suppose it works on several other usb midi devices but you'll probably need to tweak some code for.



STEP 1: BOSS GP-10 ARDUINO MIDI PROGRAM CHANGE

Boss GP-10 Arduino Midi Program Change
BOSS_gp-10_pgChange.txt
material:

1. arduino UNO - chinese one they're cheaper

2. usb shield (as the one in the picture)

3. four contact footswitches

4. spare electrical cable

5. a box to fit all

6. a usb cable between usb shield and GP10 /

another one to program the arduino (different type)

7. a usb male to female adapter (like in the picture)

8. spare arduino's male pins (must be min. 4 in line)

.

tools:

1. soldering device

2. iron

3. drilling tools if you want to fix all in the box

4. some hot glue always help!

.

Step 1:

solder cables with the pins and the instant switches (see schematic), plug'em in arduino's 2 to 5 female pins

load the code thru your Arduino ide (mine is version 1.8)

connect the usb shield over the Arduino board and connect it to GP10

plug your Arduino board to power transformer (wait a moment)

test the thing with a cable bridge between pin 6 and the pins 5 -4 -3 -2, one after the other

.

Step 2:

if it works disconnect it all, fix it all in your case (some drill work needed here)

drill a hole for power plug and another for usb female adapter, ensure it all fits in your box

.

Step 3:

connect it all again and enjoy!

You normally do have 1 switch to add plus one preset, 1 other to minus one and the other two, plus ten and minus ten preset. For any other kind of controls just adapt your ino sketch.


https://cdn.instructables.com/ORIG/FZG/EI8M/J08ECK9E/FZGEI8MJ08ECK9E.txt


-----
//#include <SPI.h>
#include <usbh_midi.h>
USB Usb;
USBH_MIDI Midi(&Usb);
int switchPin[5] = {2,3,4,5,6};
int ledPin[5]={7,8,9,10,11};
int currentPreset;
int maxPresetNumber = 98; // for Zoom MS70cdr change by this = 50
bool pinState[5];
int programChange[4] = {+1,-1,+10,-10};
/***********************************************************************************/
void setup()
{
  for(int i=0; i<5; i++)
  {
    pinMode(ledPin, OUTPUT);
    pinMode(switchPin, INPUT_PULLUP);
  } 
  if (Usb.Init() == -1)
  {
    digitalWrite(ledPin[5], HIGH);
    while(1);               // Halt
  }
  currentPreset = 0;
  SendMIDI(currentPreset);
}
/***********************************************************************************/
void SendMIDI(byte programChange)
{
  Usb.Task();
  if( Usb.getUsbTaskState() == USB_STATE_RUNNING )
  {
    byte Message[2];                 // Construct the midi message (2 bytes)
    Message[0]=192;                 // 0xC0 is for Program Change
    Message[1]=programChange;               // Number is the program/patch
    Midi.SendData(Message);          // Send the message
    delay(10);
  }

}
/***********************************************************************************/
void ledsOff()
{
for(int i=0; i<5; i++)
  {
    digitalWrite(ledPin, LOW);
  }
}
/***********************************************************************************/
void loop() //+1 -1 +10 -10 presets mode
{
  for(int i=0; i<4; i++)
  {
   pinState=digitalRead(switchPin);
    if(pinState != HIGH)
    {
      currentPreset = currentPreset + programChange;
      ledsOff();
      digitalWrite(ledPin, HIGH);
      delay(500);
    }
    else
    {
      NULL;
    }
  }

  if(currentPreset > maxPresetNumber)
  {
    currentPreset = 0;
  }
  if(currentPreset < 0)
  {
    currentPreset = maxPresetNumber;
  } 
  SendMIDI(currentPreset);
}
/***********************************************************************************
void loop() //for Zoom MS70cdr
{
  void loop() //4 presets mode
{
  for(int i=0; i<4; i++)
  {
    pinState=digitalRead(switchPin);
    if(pinState != HIGH)
    {
      SendMIDI(41 +i); //presets from 41 to 44
      ledsOff();
      digitalWrite(ledPin, HIGH);
      delay(200);
    }
    else
    {
      NULL;
    }
  }
}
}
************************************************************************************/
void blinkLed()
{
  digitalWrite(ledPin[4], HIGH);
  delay(60);
  ledsOff();
  delay(60);
  digitalWrite(ledPin[4], HIGH);
  delay(60);
  ledsOff();
  delay(60);
  digitalWrite(ledPin[4], HIGH);
  delay(60);
  ledsOff();
  delay(60);
  digitalWrite(ledPin[4], HIGH);
  delay(60);
  ledsOff();
}

sixeight

I am suprised this actually works, as the Boss GP-10 is not class compliant. A regular USB host shield is used with a standard Arduino library. I don't see any fancy code that is trying to fool the USB stack.

??? ??? ??? This really should not work!!!

alexmcginness

Looks good but looks exactly like a PHD in computer programming required as well.
VG-88V2, GR-50, GR-55, 4 X VG-99s,2 X FC-300,  2 X GP-10 AXON AX 100 MKII, FISHMAN TRIPLE PLAY,MIDX-10, MIDX-20, AVID 11 RACK, BEHRINGER FCB 1010, LIVID GUITAR WING, ROLAND US-20, 3 X GUYATONE TO-2. MARSHALL BLUESBREAKER, SERBIAN ELIMINATOR AMP. GR-33.

Elantric

QuoteThis really should not work!!!

I said the same thing when I saw Condor's Android Katana controller



Apparently Patch changes are supported, but more than that it may choke.

Would not use it for guitar to 5 pin MIDI OUTPUT

carranen

Hi, I'm the guy who actually made this instructable. Sorry for the delay...  After searching a lot over internet I come to the idea that it was about speed between those different devices which made it work or not, but I'm not 100% sure about it...  Sadly, since I changed the firmware of my MS70 and it seems it doesn't work anymore! Maybe the guys from zoom locked down this ability...
So I wonder if someone on this forum experimented this too...
cheers

sixeight

Quote from: carranen on November 26, 2017, 03:18:01 AM
Hi, I'm the guy who actually made this instructable. Sorry for the delay... 

Welcome to vguitarforums. Great work on the instructable. Has been a very useful proof of concept for many here, proving Boss devices do work with Arduino.

QuoteAfter searching a lot over internet I come to the idea that it was about speed between those different devices which made it work or not, but I'm not 100% sure about it... 

AFAIK the speed of usb midi is fixed to the same speed as five pin midi.

QuoteSadly, since I changed the firmware of my MS70 and it seems it doesn't work anymore! Maybe the guys from zoom locked down this ability...
So I wonder if someone on this forum experimented this too...

I use a Raspberry Pi to connect to the MS70CDR. I have no problems connecting to the v2 firmware.