My interest in Olivier Messiaen's music started in my teens, when I heard a couple of his Vingt Regards sur l'enfant-Jésus. I was intrigued, but by no means bowled over. Still, I liked it enough to ask my mum to buy me the score, and thereafter found myself increasingly captivated by its remarkable musical language. In particular, I was fascinated by the juxtaposition of deep calm and great complexity. I have always been drawn to music with large contrasts. When I play, my default position is to reach for the extremes, to seek the greatest possible emotional range. It is rare that I find a piano I can play both as loud and as soft as I want. It feels slightly juvenile, to be honest: the desire to go from a tiny whisper to banging the drum as loud as I possibly can. But there we are – those are my raw instincts, and Messiaen lets me give full rein to them.

The Quartet for the End of Time is perhaps the first of Messiaen's works in which the contrast between movements becomes truly extreme: there is a new level of violence in the music. It is not hard to imagine why this might be, given the work's famous origins, written while Messiaen was a prisoner of war at the Nazis' Stalag VIII-A camp. The struggle to not only endure the terrible conditions, but also to incorporate the experience into his Catholic faith, must have been profound. (Henri Akoka, the clarinettist for the premiere of the quartet, asked Messiaen to join him in attempting to escape; Messiaen answered: "No, it's God's will I am here.") The result is a work more emotionally engaged than any Messiaen had written previously. To me, it is the most open and vulnerable of all his compositions, its religious certainties balanced with a palpable sense of longing.

The piece is so deeply involving to hear that one can miss how odd it is. The unusual combination of piano, clarinet, violin and cello, reflecting the players he had available to him at the camp, is only a part of it. Of its eight movements, only half involve all four players: one is a solo, two are duets, and one is a trio. Even stranger, the clarinet and cello are silent for the last 10 minutes of the piece. In fact, each musician has to sit still for this long once or twice, which can make the experience of performance feel rather disjointed. This reflects a curious and disparate genesis: the duo movements are reworkings of previous compositions; the solo clarinet movement was written as a gift for Akoka as they travelled together under German guard; the trio was written for friends in captivity before the concept of writing a quartet had even entered Messiaen's mind. Only the remaining four movements were written with the quartet in mind.

So how does Messiaen hold all this together? Personally, I think the lack of a unifying inspiration has left its traces; in particular, the trio movement has always struck me as sounding slightly out of place, a bit too jocular for what surrounds it without having a clear emotional function in the broader structure (do we really need light relief in this piece? I don't think so). But that is a small point compared to the majestic shape of the whole, which rests on the interplay between complexity and simplicity.

Steven Osborne will perform in Messiaen's Quartet for the End of Time in Edinburgh. Photograph: Benjamin Ealovega

In the four movements that involve all the players, Messiaen experiments with subverting the idea of linear time – using palindromic rhythms, disturbing the sense of regular metre by adding or subtracting small note values, overlaying different-lengthed ostinati thereby creating in a few bars a process that would take several days to return to its starting point, and quoting birdsong, which seems to exist in its own realm without need of cause or effect. Contrastingly, the emotional heart of the work comes in the two duet movements for violin and cello with piano accompaniment, the cello movement occurring at roughly the midpoint, the violin at the end.

They are clearly intended to be heard as related – in fact, the original title of the final movement was Sécond Louange à l'Éternité de Jésus, referring back to the cello's Louange à l'Éternité de Jésus. These movements play with time in a different way – they are broad melodies in E major gradually unfolding within an exceptionally slow pulse. This comes to the core of Messiaen's work: the faith that motivated him to write music of such humble, heartfelt sincerity as to risk seeming naive. A fool for God, perhaps. As a metaphor for eternity, extreme slowness might seem suspect. Why should eternity be slow any more than fast? The mind recoils. And yet these melodies, so far outside of normal musical time, can truly sound otherworldly.

To play as slowly as written, performers need a great deal of trust in the music: it is easy to doubt it can sustain itself over such a vast span. One has to fundamentally alter one's sense of pulse, to pass over the individual notes and follow a broader beat that is so slow as to feel almost unbearable. It is a bit like walking in super-slow motion. In fact, it is so slow that it can be a challenge just to count to eight. But the rewards for engaging with this radical rhythmic space are profound: the music seems to touch the far edges of human experience, and yet its core too, like the gaze between a baby and its mother.

There are few pieces that offer the possibility of such transfiguration, and that it should have emerged from such horrific beginnings seems little short of miraculous. It offers a stark juxtaposition between the destructive and creative potentials of humanity, a struggle we all embody to some degree. Do we seek to transform whatever forms of violence we experience into something creative and relational, or do we spit them out and perpetuate the cycle? Perhaps Messiaen's solution was an attempt to avoid the reality of his situation, an escape into his artistic and religious worlds, but it has left us an enduring and improbable masterpiece.

• Steven Osborne, Jörg Widmann, Antje Weithaas and Alban Gerhardt perform Messiaen's Quartet for the End of Time at Greyfriars Kirk, Edinburgh on 11 August at 5.45pm.