For a piece that’s so generally revered, Bach’s Goldberg Variations can respond very badly to reverence. I’ve sat through tastefully-manicured “classical” readings that have made the legend that it was composed as a cure for insomnia seem all too plausible.

There was never any risk of that with the young American jazz pianist Dan Tepfer. The crowd for this Jazzlines gig was small: there must have been about 100 people, huddled on stage in a semicircle around Tepfer’s piano. No bad thing: the atmosphere was intimate, and as Tepfer explained the artistic logic of his take on the piece – the idea that improvisation within a formal structure is at the heart both of Bach’s processes and of jazz - it felt as if we were all in on something special.

Tepfer’s approach was straightforward. He played it from memory with a clarity, a beauty of touch, and a playful, imaginative humour that put you in mind of a less mannered, more open (who else?) Glenn Gould. Taken alone as a classical recital, this would have been a wonderfully fresh and intelligent journey through the Goldbergs.

But after the theme and each variation, he improvised: pulling out, dismantling and reassembling bass lines, shifting a fragment of melody to left or right, or maintaining Bach’s flow of semiquavers while lighting up the space around them with fluorescent harmonies. The swaggering French overture of Variation XVI was remade in a decadent swirl of lounge-piano lushness; elsewhere only the tiniest hint of swing or a blue note broke the surface of a spartan beauty reminiscent of late Stravinsky.

Tepfer hummed, sang and muttered to himself as he improvised. It didn’t matter. Whether as Bach pure and simple or Tepfer’s reinvention, his intelligence and imagination carried the day – sustaining an atmosphere of rapt immersion over an unbroken 90-minute span of music.