It was difficult because the crews of frigates were highly trained and would obliterate or scare away most pirates. Figures such as blackbeard and Bartholomew Roberts were the exception, because they already had a powerful ship through some stroke of luck. On that note, a brig taking a frigate was nearby unheard of. The only instance of a brig capturing a frigate in open battle was the capture of the Spanish frigate El Game by the brig HMS Speedy. Underhanded tactics such as cutting-out expeditions may yield better results. From Wikipedia: "The skirmish is notable for the large disparity between the size and firepower of El Gamo and her opponent, the British brig Speedy; the former was around four times the size, had much greater firepower and a crew six times the size of Speedy, which had a reduced crew of 54 at the time of the engagement." It can be done, but you gotta be some of the best out there. :p