How many years worth of dedication to classical music does it take for a group of musicians_who play for free_to immerse themselves in the capital city and become its "community" symphony?

Forty-nine, says the D.C. Community Orchestra, which celebrates its anniversary with its "Baroque Treasures" program today at 4 p.m. at the YWCA Penney Auditorium.

Begun in 1934 as the Washington Civic Symphony, the group has managed to survive leadership changes, membership losses due to the military draft and skimpy budgets. Sponsored by the D.C. Department of Recreation and the D.C. Community Orchestra Association, it has emerged not as a staid institution sought out only by the exclusively refined but as an extroverted band of music makers not afraid to play for all the members of the city's neighborhoods.

Conductor and musical director Dingwall Fleary, who is responsible for this change, has led the group since 1979. Under Fleary, the group, comprised of both 25-year veterans and members in their teens, has entertained audiences that usually do not rub shoulders with the jet-setters of symphony.

Fleary believes the symphony's 1981-82 season, when the group rehearsed at Shaw Junior High School, was particularly rewarding. "People would come in off the street and were completely amazed that a symphony orchestra was there," he said. "That was something people could bring their children to and say, 'This is what you can do some day, this is something to aspire toward.' "

That success gives Fleary hope that more people who represent the diversity of the Washington community will join up. In other words, he chuckled, he is making a direct "plea for unattached musicians, particularly in the string sections."