Terrence Malick is still quite a way upriver with this new movie, a love triangle tragi-rhapsody starring Ryan Gosling, Michael Fassbender and Rooney Mara. It’s set in the music scene of Austin, Texas, and features startling VIP-area cameos from Iggy Pop, John Lydon, Patti Smith and also Val Kilmer, who I think is playing himself, having some sort of on-stage freakout, taking a chainsaw to an amplifier and needing afterwards to be helped into a small car. Slightly smaller than he is, in fact.

Malick is still very much in his middle-to-late phase, with all the tics and mannerisms, the golden-hour sunsets, the murmuring voiceovers over fragmented moments, wide-angle compositions and disorientated off-centre closeups on thoughtful faces. People pirouette impulsively around and give each other piggy-backs in the street. Everything is presented as if it is a memory flashback or two-hour perfume ad themed around doomed sexual obsession. Yet there are some inspired visual flourishes and it is a film with its own weird stamina and momentum: sometimes exasperating, sometimes mesmeric.

Song to Song is similar to his elegy for doomed romantic love, To the Wonder, but also – unfortunately – to his frankly self-parodic previous film, Knight of Cups. He is still pretty preoccupied with the trials of the super-rich, the super-beautiful, and now indeed the super-famous. The few non-beautiful famous people featured are the homely souls from real life found in docu-realist stretches, or the main characters’ parents, who are often stricken, or worried, or catatonic with ill health.

As in Knight of Cups, Malick has LA party scenes, many scenes involving swimming pools, for which he has a Hockneyesque taste. There are expensive but featureless apartments and hotel rooms, and as before he has a fetish for unfinished housing estates and building sites in the middle of nowhere. The novelty is the music setting, which has allowed him to shoot scripted scenes at real festivals, attempting perhaps to siphon off some of that authentic excitement into his fictional gas tank.

Gosling plays BV, an up-and-coming singer-songwriter who is having a love affair with Faye, a woman on the fringes of the music world, played with a certain pop-eyed elfin intensity by Mara. But she is also having an affair with BV’s sleazy but charismatic and charming producer Cook, played by Fassbender – a character not so far from the one he played in Steve McQueen’s Shame. Cook is in dispute with BV over his writer’s credit on the first album, and he goes on to have an overlapping affair with a former waitress, Rhonda (Natalie Portman), involving a three-way with Faye. Meanwhile, Rhonda has a relationship with Zoey (Bérénice Marlohe); BV has a brief situation with Amanda, an elegant, older woman distinctly resembling his mother – and played briefly but interestingly by Cate Blanchett. Cook’s relationship with Rhonda is to lead to a horrible situation that leaves her mother (Holly Hunter) utterly distraught.

It is all shown with unwavering conviction and force; an inner monologue of regret and pain and bittersweet acceptance of life experience, all displaced outward into poetic imagery. Malick’s sheer belief in what he is dramatising gives these slightly preposterous elements a kind of integrity, and Gosling does have a very emotional scene with his elderly father. Yet the strange thing is that it never becomes melodramatic precisely, because the narrative itself has no conventional shape or fixity. The events are all blended and mulched into the familiar Malickian swirl of images, inchoate feelings, prose-poetic fragments.

As for the music itself, it is neither here nor there. We certainly never see Gosling on stage or in the studio, singing one of his character’s actual songs. It’s sometimes very difficult to see how distinct, separate things are happening or changing, and so the workaday concept of feelings being hurt gets lost in a cloud. The characters seem to respond to things that they are remembering, rather than to things in the here and now. I suspect that Blanchett’s role has been mostly lost in the edit. It would be interesting to see how Richard Linklater would direct this story.

We do indeed go, as Faye says, from song to song and from kiss to kiss, and it is indeed indulgent. But Malick is capable of keeping his top-heavy gyroscope of emotional rapture spinning away almost indefinitely.