Help- using an arduino to make a midi controller

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

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:

 /* 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) {
       encoder0Pos--;
     } else {
       encoder0Pos++;
     }
     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?

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 :confused:

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.

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.

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.

That would be great. Thank you very much Matt. You need to have MIDI input in your computer. If you don't, you can buy any MIDI > USB converter, they're like $4. That would give you limitless possibilities.
Or you can simply ask bassman what are the exact messages and what do we do wrong. You're his customer so he should tell you.

If you get the kit from bassman, don't limit yourself with only Kaoss Pad. Once you have a MIDI controller in your guitar, you can do everything. Play drums, modify the distortion level or even control lights on stage (using some MIDI > DMX converter). So you are only limited by your imagination. When I see people with XY Pad in their guitars who are only using couple of Kaoss Pad programs, it's just a waste of potential.

Glad I can help, I'll tell you as soon as I get my hands on it :slight_smile:

Hey all
Sorry for the late reply. I got no notification of the conversation continuing!

Here's my plan. I haven't received the controller yet, but I have a touch screen ready to go. I have a MIDI to USB cable, if someone can show me how to record MIDI that is outputted then when I get the kit I can find out what code is being sent.

Cheers,
Phi

I found out what the problem was.

You have to send a "on" and "off" signal to the touch pad

so here is the "on" signal you send before you send the touch pad values:

midiCC( 0xB0,92,127)

and here is the off signal

midiCC( 0xB0,92,0)

hope this helps guys.

Yes, that is something I mentioned early in the forum....... but good to hear that it's finally working!

The hold switch bypasses the off command, by the way.

It's a great feeling when things finally work right :slight_smile:

P.s. What software do you guys use to programme the Arduinos and to read MIDI?

I also found the sollution to this problem couple days ago but I forgot to post it here.
Matt: Arduino IDE. And there's no need to read MIDI, because that's what MIDI devices do (like KP or Whammy). But if I need to see what messages are being sent by my device, I use application called MIDI monitor.

EDIT: Btw. Chris, how are the works going?

touch pad is being read, now I just need to think about how im gonna write code that turns off the pad when im no longer touching it, but also doesnt just turn it off after every midi signal is sent, as that sounds crap.

Send turn pad off if y == 0 and x == 0 (in the main loop).

Is it possible to control a Whammy Pedal using just the Kaoss Pad, not a X/Y controller?

with the KP3 it should be possible, but KP2 I don't know.