Does "bar" mean the same thing in these two sentences?

It was an excellent kick but the ball hit the bar.

The orchestra omitted the last twelve bars of the song.
different meanings