MARBLEHEAD – Julie Hahnke likes to quote an expression that says, “seven years it takes a piper to make,” but she quickly explains how her obsessive compulsive personality prompted her to master the bagpipes in two years.The Marblehead resident, who formerly lived in Swampscott, has played the distinctive musical instrument since 2001. The pipes and the formal piping regalia she wears have taken Hahnke to weddings and other joyful occasions and to somber ones, including three funerals for military personnel killed in battle.”It’s an honor but such a sad honor,” she said.A woman with many interests, Hahnke was born in Pennsylvania, graduated from Dartmouth College, and worked as a business strategy consultant before shifting her attention to writing children’s fantasy novels and teaching kids about writing and history.An avid sailor, she got her introduction to bagpiping while judging a sailing race in Halifax, Nova Scotia.”I heard so much piping during that time – there is an eerie sound to the music,” she said.Hahnke committed to the intensive practice required to master the pipes and applied her love for history to her studies. Mastery over the instrument took her to international piping competitions, where she discovered roughly one out of three pipers are women.The demand for her talents can be intense or slow to a snail’s pace. She is particularly busy this month with Wednesday finding her on the Marblehead’s streets taking part in Veterans Middle School’s history walk.She arrived at St. Francis de Sales Church in Charlestown in time to participate in morning ceremonies marking the Battle of Bunker Hill. Following the ceremony, key speaker and Navy nurse corps advisor Mary Jo Majors rushed over to Hahnke saying, “I have to have my picture taken with a women piper.”Hahnke thinks of herself as part musician, part historian: She plays the pipes wearing traditional clothing and adornments. Her Glengarry cap is adorned with the badge of a Canadian regiment that won battle honors in World War I. The muted colors in Hahnke’s kilt mirror the coloring found in traditional kilt patterns created with vegetable-based dyes. She wears a fur sporran resembling a purse and an Argyle jacket and garters topped off by ghillie brogues – traditional shoes resembling the ones designed to endure Scotland’s muddy terrain.Last week, Hahnke piped Rev. William Simpson into a Rotary Club of Lynn lunch in his honor and, on Wednesday, she played “The Caisson Song” to honor Army veteran John Lawson of Lynn.”It’s just fascinating to see someone play that well,” said an appreciative Lawson.Hahnke said she feels privileged when she pipes at funerals, but said she works at keeping her emotions in check, especially for military funerals.”I can’t cry and play at the same time,” she said.