midi message and shift registers?

hi there,

i have recently been messing around with midi program changes to switch on/off LEDS
just by using simple digital read and writes which is working fine.

However i wanted to expand the ouput pins and got hold of some shift registers to work with. I have looked at bits
of code where LEDs strobe up and down the 8bit LED layout.

Now i want to manually control the shift register bits according to the program change, just using 1 shift register for now.

I am getting a bit confused on how to control shift register bits on and off in contrast to the condition of the midi program change message.

I know digitalread and write can set pins high or low, but how do i control shiftregister bits high or low? because i saw an example where it uses code like setRegisterPin(0, HIGH);
yet is there a way of reading the condition of that setRegisterPin bit to switch it to low if it receives the same program change message?

kind of confusing to put down what i am trying to get help with as i havent used shiftregisters with arduino much.

thanks

Are you using a library to talk to the shift register? Are you using a '595?

library? which library would that be? and yes it is the 595

You have a byte that you send out to the shift register.
To set outputs you set bits in that byte.
To turn off outputs you clear bits in that byte.
You can read the byte to see what you have just set.
Look at bit set and clear or do it the grown up way with logic operators bitwise AND and bitwise OR.