What's the history of sea shanties?

by meatrepeat

I've recently been playing a lot of Assassin's Creed: Black Flag, where sea shanties sung by your crew make up a vital (if likely sometimes anachronistic) part of the audio landscape.

It made me wonder about the history of sea shanties. Do they have a distinct lineage? Were they a global practice or a culturally specific one? Until how recently were they still common aboard a ship?

Aurevir

Sea shanties are actually a derivative of work songs in general, which are designed to provide a steady rhythm for a group of men performing a task in common. On sailing ships, this would be something like hoisting a sail or raising the anchor by use of a capstan. They arose relatively late in the age of sail, the role having previously been filled by much simpler chants or counts. After sail began giving way to steam, the shanty lost its purpose and fell out of widespread use.

I'm only familiar with their existence in Western sailing culture, where they would have been commonplace on any ship above a certain size. While one could conjecture that a similar practice would exist among any peoples operating large sailing vessels, it's entirely possible that sailors outside Europe and America had completely different systems for coordinating their labor- hopefully someone with real naval history chops will be able to speak to that.