In “Jesus bleibet meine Freude” we have the confession of a Christian soul attaching to Christ. There are many German songs from this period about the joy given by God in times of misery and sorrow. This is the result of many years of war in Germany. The 30-years war (1618-1648) had resulted in the death of about a third of the population.
(From exorientelux’s comment under VOCES8 video)