My friend and former colleague, the composer and academic Stanley Glasser, who has died aged 92, was head of music at Goldsmiths College, London, for more than 20 years, and forged one of the most forward-thinking university music departments. Its electronic music studio, which he helped to establish, bears his name. He believed that contemporary music, composition and ethnomusicology all had vital contributions to make to modern university teaching and research.

As a composer, Stanley was prolific in many fields, and pioneering in some of them. He was, it is said, the first South African to compose electronic music. His deep love of African music vaulted the colour barrier that was in place in his home country for more than 40 years. His output included concert music, incidental, commercial and educational music, and even a comic opera.

Stanley – often called by his nickname, Spike, especially in his early years – was born and brought up in Johannesburg, the son of Assia (nee Kagan) and Joe Glasser, who were Lithuanian Jews. Joe was an entrepreneur, running a successful clothing factory. Assia was a housewife and also worked for the Red Cross in Johannesburg.

Stanley began playing the piano at four or five years old, but always hated playing in public. He attended King Edward VII high school, Johannesburg, where he was in a band, the Victory Rhythm Boys, then studied economics at the University of the Witwatersrand, graduating in 1949. He started composing in his mid-teens.

Facebook Twitter Pinterest Stanley Glasser was head of music at Goldsmiths College, London, for more than 20 years

In 1950 he came to the UK to study composition in London with Benjamin Frankel and from 1952 with Mátyás Seiber. He then studied music at Cambridge University, graduating in 1958. Returning to South Africa, he was for four years a lecturer in music at Cape Town University.

In 1959 he was musical director of King Kong, the first African stage musical, by Todd Matshikiza, based on the life of the boxer Ezekiel Dlamini. A huge hit in South Africa on its premiere in Johannesburg, it was less of a success when it came to London in 1961. In 1963, Stanley was forced to leave his home country following a relationship with a woman of colour, which fell foul of South African laws at the time.

Stanley’s deep love of African music surfaced in his own output as a composer. Some of his pieces had links with Goldsmiths: these include the choral cantata Zonkizizwe (All the People in the Zulu language), written to celebrate the centenary of the college in 1991.

His best-known work is probably Lalela Zulu (Listen to Things Zulu), written for the King’s Singers in 1977, performed by them internationally and recorded in 1998.

Stanley was head of music at Goldsmiths from 1969 to 1991. Following his retirement, he was made an honorary fellow; and before his final years were clouded by Alzheimer’s disease, he continued to be a frequent presence there.

Stanley is survived by Liz, his second wife, and their children, Daniel and Simon, and by Adam and Sue, the children from his first marriage, to Mona Vida Schwartz, which was dissolved in 1965.