Martin Luther brought reformation to the church not only through his translation of the Bible into German and by his preaching of the gospel, but also by his composition of music for the people of God to sing. He is the author of numerous hymns, some of which are based directly on the Psalms.
One such is this one written on the basis of Psalm 130, for which he wrote both the lyrics and the melody (1523-24). The website from which this is taken includes this interesting background to the hymn.
[This] is a version of Psalm cxxx, which Luther called a Pauline Psalm, and greatly loved. He took special pains with his version. It was sung on May 9, 1525, at the funeral of Friedrich the Wise, in the Court Church at Wittenberg. The people of Halle sang it with tears in their eyes as the great Reformer’s coffin passed through their city on the way to the grave at Wittenberg. It is woven into the religious life of Germany.
In 1530, during the Diet of Augsburg, Luther’s heart was often sore troubled, but he would say, ‘Come, let us defy the devil and praise God by singing a hymn.’ Then he would begin, ‘Out of the depths I cry to Thee.’ It was sung at his funeral.
Below is the hymn itself. At the link below you will find the tune to play with it.
Out of the Depths I Cry to Thee
Out of the depths I cry to Thee;
Lord, hear me, I implore Thee!
Bend down Thy gracious ear to me;
I lay my sins before Thee.
If Thou rememberest each misdeed,
If each should have its rightful meed,
Who may abide Thy presence?
Thou grantest pardon through Thy love;
Thy grace alone availeth;
Our works could ne’er our guilt remove;
Yea, e’en the best life faileth.
For none may boast himself of aught,
But must confess Thy grace hath wrought
Whate’er in him is worthy.
And thus my hope is in the Lord,
And not in my own merit;
I rest upon His faithful Word
To them of contrite spirit.
That He is merciful and just,
Here is my comfort and my trust;
His help I wait with patience.
Source: Out of the Depths I Cry to Thee