The singer Jorge Drexler is known for his skill at combinations.
Like Caetano Veloso, one of his idols, he combines South American folk with the great modern songwriting tradition of Leonard Cohen and Joni Mitchell. He started as a doctor in his native Uruguay but is now, at 48, an established star based in Spain.
His moment of fame in the United States, the Oscar-winning song “Al otro lado del rio” that features in the 2004 film “The Motorcycle Diaries,” offered just a glimpse of the sensibility that has earned him an ardent following in the Latin world.
Since his latest album, 2010’s “Amar la trama,” Drexler, who returns to Boston for a Berklee Performance Center show on Oct. 6, has taken his love of combinations to another level.
He’s been spending time on Twitter, experimenting with micro-poetry governed by intricate syllabic patterns and rhyming rules.
And he has released a mobile app that generates songs based on choices that the user makes in real time and variables like location and time of day. As befits the project’s mathematical, aleatory theme, the app is called “n.”
The project’s genesis, Drexler says on the phone while on vacation in northern Spain, occurred thanks to exchanges with a group of pals online.
One song lets the user choose the lyric from options that unfold line by line. A second unlocks sections of an orchestra as the user moves in space.
“I was in a little beach town,” he says. “We were having a dialogue on Twitter made up of verses with transposed elements. And I thought, we have these machines that capture our location and movements, everything you can imagine. They carry our fantasies, photos of loved ones, our secrets. What will we ask these machines to do?”
He thought of the possibilities for combinatorial music — a tradition that goes back to Mozart, who is credited with a system in which the roll of a pair of dice determined the measures that went into a minuet or trio.
The idea led him to develop three interactive songs. One, “Habitacíon 316,” lets the user choose the lyric from options that unfold line by line. The second, “Madera de deriva” (“Driftwood”), unlocks sections of an orchestra as the user moves in space.
“I wrote a song about learning through drifting,” Drexler says, “and the song itself learns through drifting.”
The third song, “Décima a la décima,” follows a specific poetic structure through lines that the user selects—and that are performed by 10 different singers, including Drexler, René Pérez from Calle 13, and other Latin folk and pop interpreters. The point where the song starts depends on the hour of the day.
In all, the song offers 10 to the power of 10 different combinations. All the raw material, of course, had to be written and recorded.
“It’s the most complex thing I’ve ever written,” Drexler says. “It took a year and a half, and at the end I was almost ill with having to accumulate all that information. Then imagine combining 100 verses with 10 singers. The programming was crazy.”
Drexler says “n,” which is free, has had several hundred thousand downloads since its launch last year. He has worked a combinatorial element into his stage show, inviting audience members to come onstage and build a song in real time on an iPad. Drexler memorizes all the different lines and does his best to deliver.
“People see the excitement of the challenge,” he says. “They understand that you’re taking a risk, and they follow you.”
This without-a-net exercise connects the structure of “n” with Drexler’s typical method, which involves writing songs at the last minute to suit the moment and place.
“Whenever I give a concert I write until the last minute, almost with one foot on the stage,” he says. “Then I improvise on stage with a basic chord structure. That has always happened with songs — they’re a form of transmitting news and stories. John Lennon used to write songs for demonstrations. It’s the power of now.”
From someone who only recently bemoaned the short attention spans and screen-dependence of our time, Drexler has become quite the technology buff, with his fondness for Twitter and his app-developer cred.
But there are limits. For one, he’s happy to be working on a new album again. “I want to do something immediate,” he says, “not work on infinite variations of one song.”
Drexler says he appreciates new technology most when it enables and expands what a song can achieve: immediacy, connection, and poetic expression that works within, and indeed thrives on, time and structure constraints.
“The song is a short genre,” he says. “And it’s meant to be understood by a big number of people. If you’ve ever written a chorus, you’re pretty well trained for Twitter.”
What he won’t do, in either song or social media, is just issue superficial comments or blather on about banal events in his day.
“I’m looking for beauty, and to offer beauty,” he says. “Of course, I too would love to know what Leonard Cohen is having for breakfast. But I would be very disappointed if he told me without beauty.”Siddhartha Mitter can be reached at firstname.lastname@example.org.