Yankee Doodle was a British pub song. The Americans borrowed the tune with their own words. Sometimes the words were used to trick the British sometimes they were used to convey messages to those undercover on their side. All my notes were left at school for the next teacher.
A doodle dandy was the term the common people gave to the English men all dresses up fancy (with feathers in their hats). The British mocked the Americans soldiers because of their ill fitting none military dress.
Will see what I can find
Yankee Doodle Dandy is a song by George M Cohan written to use in his broadway ahow. It is modern.
Macaroni was the term that came to be used to describe a military officers designation of rank and honors - thinking gold braid, ribbons, stars, bars, that sort of thing. I don’t know if they used it that way back pre-revolution.