MIDI lib, controlling volume on ch 1 with pot

Thanks for the response Grumpy Mike.

I have fixed the switch, it now sends the appropriate noteOn/ noteOff messages, although I can't help but notice some latency(for now I'll blame hairless). I also realised that I was using pull up configuration instead of pull down. I can now play middle C all day.

void control () {

  val1 = digitalRead (SWITCH);

  if (val1 == HIGH) {
    noteCounter = noteCounter + 1;
    if (noteCounter == 1) {
      SendMIDI(0x90, MIDI_ROOT_NOTE, 127);
    }
  }
  else {
    SendMIDI(0x90, MIDI_ROOT_NOTE, 0);
    noteCounter = 0;
  }
}

I also tried using note on at 0 velocity, but I'm not sure whether this is a correct implementation of running status.

Sending MSB and LSB for channel volume to their respective cc channels, I admit, is beyond me at this point. Are there any forum entries, tutorials or video tutorials that you (forum users) could refer me to that explains the process?