BARCELONA, Spain — Caetano Veloso, the bossa nova elder statesman, was holding court here on Saturday evening, floating his baritone voice and easy guitar over an amphitheater audience that swayed and sang along as he offered a slightly raunchy paean to his native Brazilian sounds.

A few dozen feet away, on another stage, Earl Sweatshirt, the young California rapper and member of the Odd Future hip-hop clan, was doing his own conducting. “Make some noise,” he instructed his audience, growling, “if you’re ready to go to hell for, like, three minutes.” The polyglot crowd spit back his rhymes, profanities included, with enthusiasm.

It was the final big night of Primavera Sound, an expansive music showcase here that has gradually become one of the top tickets of the European festival season and a template for promoters worldwide. Its 14th edition began in earnest on Wednesday at the Parc del Fòrum, a seaside complex, and ended with a trickle of free shows on Sunday at the Parc de la Ciutadella. In between, some 50,000 people a day saw nearly 300 acts — electronica to soul to postpunk — in concerts that stretched from afternoon to sunrise. The international lineup featured arena stars like Nine Inch Nails and up-and-comers like FKA Twigs on a dozen stages. The audience traveled from across Europe and, increasingly, North America. Walking through the grounds was a mini-United Nations of fandom, reflecting a global music industry and an orderly Euro youth culture, an acknowledgment that taste can translate across borders.

The festival is sometimes called the Coachella of Europe, a nickname it has earned, with some caveats, said Martin Mills, the founder and chairman of the Beggars Group, a roster of international record labels. “This doesn’t have the pretensions, if you like, of Coachella,” Mr. Mills said of that springtime festival in Indio, Calif., known as much for celebrity spotting and minting fashion and marketing trends as for its musical coups. Mr. Mills, whose independent labels represent acts like Vampire Weekend and the National, was attending Primavera for the third time, catching up with his own bands and others. “Next year, I’ll be coming again,” he said on Saturday. “It feels like a very real music place here, and it’s also a place that artists like to come to as fans.”