My unabridged dictionary says a hornpipe was "an instrument formerly popular in Wales, consisting of a wooden pipe with holes at intervals and a reed mouthpiece - so called because the bell at the open end was sometimes made of horn.
2. a lively and vigorous dance, usually by a single person, and originally accompanied by hornpipe playing, popular among sailors