how to programmed the push button

I want to make a midi control by using arduino . I use a scheme like this .
how I programmed the push button.

http://cdn.instructables.com/FMG/DPTV/H9G16E7D/FMGDPTVH9G16E7D.LARGE.jpg

is there who can help me.

Well the switches take each pin low, so you want to configure each switch with the internal pullups. Then each switch will be high normally, and low when pressed.

//in setup()
pinMode(pinXXX, INPUT_PULLUP);


//in loop()

if digitalRead(pinXXX)  //high
  {
     // do whatever for not pressed state
  }
else  //low
  {
     // do whatever for pressed state
  }