Was just wondering, and the American Heritage site yields this: Goes back to Middle English. Verb (“You can stop yawping, Dr. Dean”) and noun. As the latter:
1. A bark; a yelp. 2. Loud or coarse talk or utterance: ‘I sound my barbaric yawp over the roofs of the world.’ (Walt Whitman).”
I’ve never thought Whitman meant it as a reference to coarseness; rather as a sign of irrepressible exuberance, a refusal to be unheard.