Writer, journalist and politician. He became a member of the Federal Democratic Republican Party very young and, after the Bourbon Restoration, he aligned himself with Emilio Castelar.
At the beginning of the 20th century, Roca became a member of Solidaritat Catalana, as a representative of Nicolás Salmerón’s republicanism. In 1909 he was a town councilor in Barcelona and, in 1910, he joined the new party Unió Federal Nacionalista Republicana.
As a journalist, Roca participated in Lo Gai Saber and collaborated in La Renaixença. He also wrote in illustrated, satirical anarchist newspaper La Campana de Gràcia and illustrated, satirical, pro-republican and anti-clerical magazine L’Esquella de la Torratxa, of which he was the director between 1878 and 1908.
Roca wrote several plays and zarzuela librettos, some of them in collaboration with Eduard Vidal i Valenciano.