Go Down

Topic: Help- using an arduino to make a midi controller (Read 52541 times) previous topic - next topic


I suspect that there is some little MIDI message that allows us to take MIDI control of the XY pad. That's why I asked Phi (via PM) if he could send me the MIDI messages that Gareth's kit send to KP (there is a program called MIDI monitor, it monitors every received MIDI message).
The best way would be to have MB-1 at home for one day to check everything. We could also ask some people on youtube who own that guitar to tell us every single message sent by the XY pad. But unfortunately most of youtube users don't respond to the messages sent to them.
For now, I've run out of ideas.

Btw. Chris, can you tell me how do you read rotary encoder position? I've tried couple of codes which I found online but none of them is fully working. They skip one or two positions from time to time. So I would be grateful if you could help me with this.



Oct 30, 2010, 12:48 am Last Edit: Oct 30, 2010, 01:01 am by zygmoont Reason: 1
Weird. I've just noticed that KP2 receives MIDI message only on program 77 and only if my finger is over the center of the Y axis. Very weird.

EDIT: programs 10, 14, 19 also seem to work. But my finger also has to be somwhere above the middle of the Y axis. But they don't work as they should I think.

Now I know absolutely nothing.


thats better then nothing, if you wouldn't mind, could you post me that section of your code? see if its any different.



It's nothing special really.

void midiCC(char command, char value1, char value2){    
 Serial.print(command, BYTE);
 Serial.print(value1, BYTE);
 Serial.print(value2, BYTE);

  midiCC(0xB1, 12, sendX);  
  midiCC(0xB1, 13, sendY);

SendX and SendY are between 1 and 127 (using map()).

Make sure that in the MIDI mode, when you hold memory 4 - the number is 12 and for memory 5 - 13. Memory buttons 4 and 5 specify the MIDI X- and Y-axis, and they need to be set to MIDI CC 12 and 13.

Can you help me with that rotary encoder, I mentioned above? None of the codes I found isn't working properly, they're inaccurate.


mine is 0xB0, so ill give yours a go and yes i can help with the encoder, i am actually just using one of the example codes for the encoder, It does work but you need two pull down resistors (10k resistors connected to ground) to stop the voltage floating. ill elaborate when i get the chance, im a bit busy today.


The difference between 0xB0 and 0xB1 is that 0 means channel 1 and 1 means channel 2 (goes up to 15 which means channel 16). So if you use 0xB0, make sure that you have MIDI channel of KP set to 1 (using program/bpm in MIDI Edit mode but you already know that).
And check these programs 10, 14, 19, 77 and tell me if they work.
And I would be grateful if you could tell me which example code you are using.


i tried your code, I didnt even get a response on the channels you got.


Oct 30, 2010, 02:22 pm Last Edit: Oct 30, 2010, 02:29 pm by djccfm Reason: 1
hang on, It did work, but with my original code which used , it is not behaving at all how we want it. BUT it does prove that it is possible and therefore it must be a mistake of ours.


for the encoder, I have encoder pin A connected to 3 on the board, and i have encoder pin B connected to pin 4, then pin a and B are also connected to ground via a 10k resistor, the center pin on the encoder I have connected to +5V the code I used and modded was this one:

Code: [Select]
/* Read Quadrature Encoder
 * Connect Encoder to Pins encoder0PinA, encoder0PinB, and +5V.
 * Sketch by max wolf / www.meso.net
 * v. 0.1 - very basic functions - mw 20061220

int val;
int encoder0PinA = 3;
int encoder0PinB = 4;
int encoder0Pos = 0;
int encoder0PinALast = LOW;
int n = LOW;

void setup() {
  pinMode (encoder0PinA,INPUT);
  pinMode (encoder0PinB,INPUT);
  Serial.begin (9600);

void loop() {
  n = digitalRead(encoder0PinA);
  if ((encoder0PinALast == LOW) && (n == HIGH)) {
    if (digitalRead(encoder0PinB) == LOW) {
    } else {
    Serial.print (encoder0Pos);
    Serial.print ("/");
  encoder0PinALast = n;

hope this helps


Thanks. This code is pretty good, however the position still likes to jump a little bit. I added delay at the end and the result is pretty satisfying. Still not perfect though.
Have you programmed the LED already? What pattern is it using? I've decided to go with 2 LEDs, one changes the colour smoothly and the other one is blinking, depending on the finger speed. I haven't programmed the second one yet.


I havent even touched the LED really, I just want the touch pad working before i start to focus on the rest.

any ideas as to what is going on with this pad?

Super Matt 1896

Wouldn't it be good if there were clearly set instructions that worked for everyone?
P.S. anyone gotten in touch with Gareth? or Bassman? i've emailed both of them ages ago, but not a reply have i received from either :/


None of them responds. I've tried to contact them too.
We just need to know the exact message that KP receives. So, as I said, we need to find someone with either MB-1 or Gareth's kit to record the data coming from the XY pad, for example using MIDI Monitor.

Super Matt 1896

That's a good idea, just send a PM to all those folks on YouTube with KP Guitars, asking if they can do some work for us or if we can borrow their guitars to help us figure it all out.

Super Matt 1896

GOOD NEWS EVERYBODY!! i got in touch with Bassman and he said he'll tell me when i can buy on of his kits off him. So when if i eventually get it i'll be glad to help you guys, but i'm a noob to all this i admit, so you'll have to talk me through everything.

Go Up

Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

via Egeo 16
Torino, 10131