in 1740 he moved to berlin to become the harpsichord player for frederick the great. frederick played the flute, and it was bach's job to provide the keyboard accompaniment. this left him with plenty of time to compose music. bach married johanna maria dannemann in 1744. they had a number of children, but only three lived to be adults. his son, also johann sebastian bach, became a painter in rome, but died at the age of 30. life in berlin became difficult for bach during the seven years' war. frederick was often away and so there was little musical activity in the court. he was paid with paper money which did not keep its value, and so he had to be careful with his spending. there was also criticism of his playing style, it was becoming "affected", too modern for the conservative tastes of frederick's court.