Context:Sam pulled up a chair to the piano , but *it* was broken, so he had to sing instead.

Is "it" the same as "the piano"?
yes