At Coava Coffee Roasters, a hip cafe in a gentrifying neighbourhood in Portland, shelves are made from disused machinery, the handmade bamboo tables are eco-friendly, and the single-origin coffee is served in glass Chemex carafes. Carrie Brownstein and Fred Armisen couldn’t dream up a more stereotypically Portland scene – except for the music on the stereo, which shuffles between brash electropop and dubstep. It’s a strangely fitting place to meet Stephen Malkmus. As the former frontman of 1990s slacker titans Pavement, he’s an icon of indie rock at its scruffiest, yet his new solo album, Groove Denied, is electronic music partly inspired by a stint living in Berlin.

“I’m not known for being groovy,” admits Malkmus, a 52-year-old father of two who looks every bit the middle-aged rocker dad: salt-and-pepper mop top, white shirt, tatty white trainers. “The first song is supposed to sound like you went out clubbing in Berlin and came back and tried to make a song when you were off your head. Or an aural version of one of those pictures of [techno DJ] Ricardo Villalobos where he’s completely trashed.”

Malkmus’s wife, the multimedia artist Jessica Jackson Hutchins, spurred a move to the German capital for two years at the beginning of the decade. “Clubbing, staying out all night, that was around 1% of my life there,” Malkmus says. “My main life was going with my kids to the cool playgrounds and biking around.” Still, he did periodically investigate the city’s infamously hedonistic nightlife, thanks to a younger friend – “a total party animal” – who would escort Malkmus to what the latter calls, without any apparent irony, “age-appropriate events”.

“I don’t know, old guys in clubs,” he says with a shrug, ever cagey and as cryptic as you’d expect from someone whose most famous song runs: “Charge it like a puzzle / Hitmen wearing muzzles / Hesitate you die, look around, look around / The second drummer drowned / His telephone is found.” Malkmus prefers his sarcasm extra-dry, and he’s as prone to trailing off in mid-sentence as he is averse to meeting your gaze. But you can tell he enjoys playing the outsider role, which has its benefits when it comes to the famously strict door policy of a club like Berghain that cherishes misfits. “Obviously, they see you there,” he says deadpan. “They’re going to be biased towards letting you in.”

A couple of years ago, having worked up a set of squirrelly, esoteric tunes on his laptop in his basement, he sent the demos to his longtime label, Matador – and for almost the first time in his 30-year career, he was rejected. If it hurt, he doesn’t let on. “I was sort of grateful,” he says. “Nobody has ever said anything negative to me,” over a 30-year career that includes five Pavement albums and seven with his long-running group the Jicks, his main outfit since 2003. It had been a few years since their previous album, Wig Out at Jagbags. “It’s not like they were going to get a streaming hit from me,” he acknowledges, but he understands that Matador might have hoped for something a little more listener-friendly to reintroduce Malkmus – “rehabilitate” is the word he uses – to an increasingly distracted audience.

Fortunately, he had another card up his sleeve. A new album with the Jicks was in the works; the studio already booked. “I had been manoeuvring to do a record with them and do it in a real studio and have it sound like a rock record with a classic tone. Had they known that, they might not have also been so worried.” Sparkle Hard, the band’s seventh LP, came out last year, full of all the crunchy hooks that Malkmus’s indie-lifer fans could have wanted – and paving the way for a slightly rejigged Groove Denied to finally see the light of day.

Despite its genesis, the new album isn’t techno – not by any stretch of the imagination. Exploring wonky drum programming, gurgly synthesisers and even a – not terribly convincing – British accent, sung through cavernous, Martin Hannett-calibre reverb, Groove Denied sounds more like one man’s hermetic fantasy world commingling early 1980s synthpop, lo-fi electronics, and, yes, plenty of good old-fashioned indie-rock guitar.

Facebook Twitter Pinterest Malkmus performing with Pavement in New York in 1992. Photograph: David Corio/Getty Images

“Do you ever look at YouTube for technical advice?” Malkmus asks me, giggling wildly. “It could be a computer thing or just to find how to unlock your ski rack.” During many a late-night trip down the YouTube rabbit hole, Malkmus became obsessed with “these gurus”: experts in software like Pro Tools or Ableton, able to create a reasonable semblance of a beat in the blink of an eye. Malkmus, who describes himself as a “techno luddite, a pre-internet person”, began laying down loops on drums and guitar and then building songs from there. “And then you get like a weird, fucked-up version” of the YouTube gurus’ output, but “it doesn’t necessarily groove. It’s a little off.”

There’s a philosophical dimension here. “It’s a weird thing to do something all by yourself,” he says. “I played all the instruments. I pushed this all the way through. I don’t know how these DJs … In a band,you’re sharing the economy of the band and the feelings of it all. This is more like, ‘I’m doing this.’” The biggest lesson in making these infinitely malleable songs, Malkmus says, was learning, “Where do you stop? When is it done?” There were also lessons learned about self-editing: “There’s this reggae one where I sing in a patois, you know, that, like, should not be heard. I shouldn’t have done. Even though I was good at it, it doesn’t matter, because it can go so wrong.”

Stephen Malkmus: Groove Denied review – stark, forbidding soundscapes Read more

The idea of it all potentially going terribly, terribly wrong leads me to ask if he ever considered putting out the record under an alias. “Not really. It’s just impossible to really do that,” he says. “I mean, everybody’s a bit jealous of Daft Punk. Now there’s this band called Ghost, like the 50-millionth band named Ghost. They’re this Swedish rock band, they wear masks. That would be nice, because you also don’t age under there. People don’t really like seeing old people on screens. Facts are facts.”

• Groove Denied is out now on Domino Records.