The notes say this "was written after a trip to Killiecrankie, and an early suggestion for the finish of the Dance was that the First Man or Lady should lose a shoe at the end of the Petronella turn on bar 40!" See for example <<https://www.scottishhistory.org/blog/soldiers-leap-killiecrankie/>>.

The patterns of the dance are split into four parts:  
Bars 1 - 8: The Approach  
Bars 9 -16: The Ambush  
Bars 17 - 24: The Skirmish  
Bars 33 - 40: The Escape