The liturgical function of a chorale prelude was to introduce the hymn about to be sung by the congregation, usually in a Protestant, and originally in a Lutheran, church. Although it was typically a polyphonic setting, the melody would be plainly audible. There was sometimes an obbligato line above or below the melody.
As an independent genre, the chorale prelude began with the works of Dieterich Buxtehude, who wrote 30. Numerous examples also exist from the 19th and 20th centuries, including some by Johannes Brahms and Max Reger. Works in the form continue to be composed in the present day.