It’s not unusual for an arts festival to take on the character of its host community, but the degree to which the Montreal Jazz Festival has become part of the fabric of the city itself is impressive.The closing days of the 31st annual edition illustrated this synchronicity, with several square blocks of the city’s downtown given over to a celebration of music and culture more inclusive than any similar North American event. While paying gigs headlined by the bigger names are certainly the fest’s calling card, the underdogs were able to use the showcase for financial gain. Daniel Champagne, manager of the festival’s CD sales tent, estimates that about two-thirds of the sales generated during the fest were for showcased performers. While large scale competitors like the Jazz and Heritage Festival in New Orleans and New York City’s jazz festivals offer plenty of musical diversions, none draws in the casual fan as well as Montreal — in large part because of the wide array of free performances booked for the 12-day event, which ended Tuesday. Budget-minded patrons could sample literally dozens of performances over the course of the fest’s final weekend, a program that took in good old-fashioned entertainment and improvisational performances that focused as much on the head as the hips. Performances ranged from the straight-ahead blues of Blackburn — a large, party-oriented ensemble keyed by the Chicago-styled playing of guitarist Brooke Blackburn — to the headier offerings of a quartet led by pianist Amanda Tosoff, who’s rapidly establishing herself as one of her generation’s most inventive keyboard stylists. Visitors could also easily stumble on off-the-radar, gratis gigs that popped up around the site, like the one that Quebec City-based torch singer Annie Poulain — possessed of a voice mellow and incisive — staged Saturday afternoon on a midway barely large enough for a crowd to gather. A visit to the tent after a warm, affable solo performance by Allen Toussaint — who guided the audience through a tour of his work, which mined such classics as “Workin’ in a Coal Mine” and “A Certain Girl” — showed an uptick in his sales. The same could probably not be said for Lou Reed, Laurie Anderson and John Zorn, whose bracing, decidedly experimental set Friday evening was met with a largely hostile, uncomprehending response despite (or, perhaps, because of) its challenging, intellectually bracing nature. Not all of the festival’s more adventurous performers were met with diffidence. The premiere of local composer David Brunet’s dizzyingly vivacious orchestral piece was received rapturously, despite hairpin turns that included tribal drumming, surf guitar and dark, dissonant passages that recalled Tom Waits, Harry Partch and Raymond Scott. More song-oriented locals got their due as well, from guitarist Michel Morissette — whose lithe, West Coast-inflected fingering wafted winsomely through the open air of the central plaza — to singer-songwriter Neema, whose Sunday night performance proved one of the weekend’s truly unexpected pleasures, thanks to an unabashed romanticism that she tempered with a weariness redolent of Leonard Cohen (whose “Avalanche” she covered midset). She’s overdue for a big push stateside.