The first known appearance of the tune “In dich hab ich gehoffet,” found with Psalm 4 in “Davids Himlische Harpffen,” Nürnberg, 1581.
This tune is commonly ascribed to Sethus Calvisius. It first appears in Gregorius Sünderreitter’s Davids Himlische Harpffen, Nürnberg, 1581, p. 11, a scan of which is available here, but it seems unlikely to me that the tune originated with that work, because rather than appearing with Psalm 31, of which “In dich hab ich gehoffet, Herr” is a paraphrase (here Psalm 31 has an entirely different text and tune), it appears in connection with Psalm 4 with the heading “Im thon/ In dich hab ich gehoffet HERR” (“To the tune, ‘In Thee, Lord, Have I Put My Trust'”). It seems, therefore, to be a preexisting tune already associated with Reusner’s text.