MIDI->Arduino->PC?

So, I have a regular old keyboard with MIDI out, and I have used the MIDI Input circuit (based off of one found on these boards) to connect it to my Arduino Diecimila. I have also installed the Roland Serial Midi driver, and I now have no idea on how to proceed. I think I need to make a sketch, but I'm not sure what to do.

First you have to know what you want to do with the MIDI signals once you get them inside your Arduino. In that way it is much easier to find out how to do it.

i just want them to go to the computer and be processed by the roland serial-> MIDI driver, so I'm not sure if I just send raw data to that. If I do, then what would I have to do? I think it would be a simple sketch, but I'm completely lost as to what to do. http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1187962258/ is the schematic i based mine off of.

processed by the roland serial-> MIDI driver

So does this driver take in serial and turn it into MIDI? If so what baud rate does it use? If it is not the same rate as the MIDI signal then you can't do it because the serial port on the Arduino connected to the computer is the same port as you are receiving data on from the MIDI interface. These have to run at the same speed. If that's it just read a byte from the serial port and send it out again.

It seems to me that you don't need an Arduino just a MIDI interface for your computer.

Well, my pc has no MIDI in, and i don't have a MIDI->USB cable, so that's what I'm trying to use the arduino for.

In that case you are not actually using the Arduino for anything at all, you might as well just get the USB to serial chip bit of the setup.

Ok, so I was able to get this piece of code to work, and i get blinking whenever i press a key, now how do i translate that into working on the computer? MIDI-OX shows nothing.

//variables setup

byte incomingByte;
byte note;
byte velocity;


int statusLed = 13;   // select the pin for the LED

//setup: declaring iputs and outputs and begin serial
void setup() {
  pinMode(statusLed,OUTPUT);   // declare the LED's pin as output
  pinMode(2,OUTPUT);
  pinMode(3,OUTPUT);
  pinMode(4,OUTPUT);
  pinMode(5,OUTPUT);
  pinMode(6,OUTPUT);
  pinMode(7,OUTPUT);
  pinMode(8,OUTPUT);
  pinMode(9,OUTPUT);
  
  //start serial with midi baudrate 31250 or 38400 for debugging
  Serial.begin(31250);        
  digitalWrite(statusLed,HIGH);  
}

//loop: wait for serial data, and interpret the message
void loop () {
    // read the incoming byte:
    incomingByte = Serial.read();

    // wait for as status-byte, channel 1, note on
    if (incomingByte== 144){ // note on message starting starting
      // yeah, we're getting something
      blink();
      blink();
      blink();
    }

}

void blink(){
  digitalWrite(statusLed, HIGH);
  delay(100);
  digitalWrite(statusLed, LOW);
  delay(100);
}

You change all your code to this:-

void setup() {
Serial.begin(31250);       // MIDI 
}

void loop() {
 if(Serial.available() > 0) {
   Serial.print(Serial.read(), BYTE);
    }
 }

This will ONLY work if your serial input driver can be set to MIDI speeds.