If you’ve always thought the line about “four and twenty blackbirds baked in a pie” was a bit of nonsense children’s verse, an exhibition now at the J. Paul Getty Museum will set you straight. In “The Edible Monument: The Art of Food for Festivals,” you’ll learn not only that such pies existed — with live birds encased — but also how to make pastry for them.

“That was a spectacle pie,” said Marcia Reed, chief curator of the Getty Research Institute, who organized the exhibition. “There were pies that blew up, too. It was table entertainment.”

Not far away, in another Getty gallery, there are different surprises in “Eat, Drink, and Be Merry: Food in the Middle Ages and Renaissance,” including what Christine Sciacca, the assistant curator who put together the exhibition, said she believed might be the earliest image of a pretzel in art. Dated 1030-40, it appears in a Last Supper, along with the bread, the wine and a fish, in an illuminated-manuscript page from Regensburg, Germany.

These shows are all but created for foodies. “The Edible Monument” is a cornucopia of 140 rare books and prints that depict the elaborate artworks made for court festivals, banquets and civic celebrations in the 16th through 18th centuries. Organized by aristocrats or by cities, these feasts featured sculptures made of sugar, flowers and fruits, as well as tables groaning with bread, cheese and roasts.

“It was all set out, and people were allowed in at a point, to run and grab what they could get,” Reed said. The “1 percent of those times” watched as peasants raided the display.

“I don’t know that it was cruel entertainment because the people enjoyed it,” Reed said. “There was good food, like meat, that was not part of what they usually ate. And there would be music and dancing.”

The oldest piece in “The Edible Monument” dates to 1530: “Procession of Pope Clement VII and the Emperor Charles V After the Coronation at Bologna on the 24 February MDXXX,” a series of engravings that were then pasted together to make a 50-foot scroll. At the end, people are eating an ox roast stuffed with other animals, whose heads are visible.

There’s also an illustrated cookbook by Bartolomeo Scappi (circa 1500-77), Pope Pius V’s acclaimed private chef. Dated 1570, it shows that people of the time did not eat simply. “They ate complicated kinds of fowl and fish and roasts,” Reed said. “They even had flavored water,” laced with hints of asparagus, violet or chrysanthemum, for example.

The objects in “Eat, Drink, and Be Merry” demonstrate a focus on food even when most art was religious. Most texts in the exhibition are about the Eucharist, but often contained calendars showing harvesting, hunting and food preparation. Bible stories, too, dealt with food. A 16th-century image of the parable about a rich man and a beggar named Lazarus shows poultry decorated with one of its own feathers. Sometimes the works comment on morals. The Last Supper scene, for example, offers a subtle warning against gluttony: The only one eating is Judas.