Bend sensors, switches and arduino BT

Hi, I'm currently trying to create a wireless Midi controller based around an arduino BT, and including 1 switch (MIDI on/off), 3 bend sensors (1 for note pitch, 2 for control changes), 1 LDR.
Obviously, i'll be using the built in bluetooth module on the board.
Now, i have 2 issues:
First i followed the instruction on this website
http://itp.nyu.edu/physcomp/Labs/MIDIOutput
which helps you setup a MIDI output with 1 analogue in and 1 digital in, as I understand that my setup is very similar, ecxept i'll have to adapt my output to work with the bluetooth chip rather than the Midi socket.
BUT, it seems to me the arduino code provided on the website is wrong, as it doesn't define the analogue inputs, or their value. Instead it seems the switch is only controlling an LED on pin 30! anyway, here's the code, if someone would be kind enough to see if that's actually right?

// The switch is on Arduino pin 10:
#define switchPin 10
// Middle C (MIDI note value 60) is the lowest note we'll play:
#define middleC 60
// Indicator LED:
#define LEDpin 13

// Variables:
char note = 0; // The MIDI note value to be played
int AnalogValue = 0; // value from the analog input
int lastNotePlayed = 0; // note turned on when you press the switch
int lastSwitchState = 0; // state of the switch during previous time through the main loop
int currentSwitchState = 0;

void setup() {
// set the states of the I/O pins:
pinMode(switchPin, INPUT);
pinMode(LEDpin, OUTPUT);
// Set MIDI baud rate:
Serial.begin(31250);
blink(3);
}

void loop() {
// My potentiometer gave a range from 0 to 1023:
AnalogValue = analogRead(0);
// convert to a range from 0 to 127:
note = AnalogValue/8;
currentSwitchState = digitalRead(switchPin);
// Check to see that the switch is pressed:
if (currentSwitchState == 1) {
// check to see that the switch wasn't pressed last time
// through the main loop:
if (lastSwitchState == 0) {
// set the note value based on the analog value, plus a couple octaves:
// note = note + 60;
// start a note playing:
noteOn(0x90, note, 0x40);
// save the note we played, so we can turn it off:
lastNotePlayed = note;
digitalWrite(LEDpin, HIGH);
}
}
else { // if the switch is not pressed:
// but the switch was pressed last time through the main loop:
if (lastSwitchState == 1) {
// stop the last note played:
noteOn(0x90, lastNotePlayed, 0x00);
digitalWrite(LEDpin, LOW);
}
}

// save the state of the switch for next time
// through the main loop:
lastSwitchState = currentSwitchState;
}

// plays a MIDI note. Doesn't check to see that
// cmd is greater than 127, or that data values are less than 127:
void noteOn(char cmd, char data1, char data2) {
Serial.print(cmd, BYTE);
Serial.print(data1, BYTE);
Serial.print(data2, BYTE);
}

// Blinks an LED 3 times
void blink(int howManyTimes) {
int i;
for (i=0; i< howManyTimes; i++) {
digitalWrite(LEDpin, HIGH);
delay(100);
digitalWrite(LEDpin, LOW);
delay(100);
}
}

secondly, i can't understand how to send the data via bluetooth, like i would to a MIDI socket connected to some of the pins... Is there a pin dedicated to the bluetooth chip? If not how do i route the data from the ATmega to the bluetooth chip? How do I program this? I am totally new to all this, so I haven't a clue as to how to do this...
Help!