Church music
Church music is Christian music written for performance in church, or any musical setting of ecclesiastical liturgy, or music set to words expressing propositions of a sacred nature, such as a hymn.

History
Early Christian music
The only record of communal song in the Gospels is the last meeting of the disciples before the Crucifixion. Outside the Gospels, there is a reference to St. Paul encouraging the Ephesians and Colossians to use psalms, hymns and spiritual songs.Later, there is a reference in Pliny the Younger who writes to the emperor Trajan (53–117) asking for advice about how to prosecute the Christians in Bithynia, and describing their practice of gathering before sunrise and repeating antiphonally "a hymn to Christ, as to God". Antiphonal psalmody is the singing or musical playing of psalms by alternating groups of performers. The peculiar mirror structure of the Hebrew psalms makes it likely that the antiphonal method originated in the services of the ancient Israelites. According to the historian Socrates of Constantinople, its introduction into Christian worship was due to Ignatius of Antioch (died 107), who in a vision had seen the angels singing in alternate choirs.During the first two or three centuries, Christian communities incorporated into their observances features of Greek music and the music of other cultures bordering on the eastern Mediterranean Sea. As the early Church spread from Jerusalem to Asia Minor, North Africa, and Europe, it absorbed other musical influences. For example, the monasteries and churches of Syria were important in the development of psalm singing and the use of strophic devotional song, or hymns. The use of instruments in early Christian music seems to have been frowned upon. In the late 4th or early 5th century, St. Jerome wrote that a Christian maiden ought not even to know what a lyre or flute is like, or to what use it is put. Evidence of musical roles during the 6th through 7th centuries is particularly sparse because of the cycle of invasions of Germanic tribes in the West and doctrinal and political conflict in the East as well as the consequent instability of Christian institutions in the former Roman empire.
The introduction of church organ music is traditionally believed  to date from the time of the papacy of Pope Vitalian in the 7th century.

Gregorian chant
Gregorian chant is the main tradition of Western plainchant, a form of monophonic liturgical chant of Western Christianity that accompanied the celebration of Mass and other ritual services. This musical form originated in Monastic life, in which singing the 'Divine Service' nine times a day at the proper hours was upheld according to the Rule of Saint Benedict. Singing psalms made up a large part of the life in a monastic community, while a smaller group and soloists sang the chants.
In its long history, Gregorian Chant has been subjected to many gradual changes and some reforms. It was organized, codified, and notated mainly in the Frankish lands of western and central Europe during the 12th and 13th centuries, with later additions and redactions, but the texts and many of the melodies have antecedents going back several centuries earlier. Although a 9th-century legend credits Pope Gregory the Great with having personally invented Gregorian chant by receiving the chant melodies through divine intervention of the Holy Spirit, scholars now believe that the chant bearing his name arose from a later Carolingian synthesis of Roman and Gallican chant.
During the following centuries the Chant tradition was still at the heart of Church music, where it changed and acquired various accretions. Even the polyphonic music that arose from the venerable old chants in the Organa by Léonin and Pérotin in Paris (1160–1240) ended in monophonic chant and in later traditions new composition styles were practiced in juxtaposition (or co-habitation) with monophonic chant. This practice continued into the lifetime of François Couperin, whose Organ Masses were meant to be performed with alternating homophonic Chant. Although it had mostly fallen into disuse after the Baroque period, Chant experienced a revival in the 19th century in the Catholic Church and the Anglo-Catholic wing of the Anglican Communion.

Mass
The mass is a form of music that sets out the parts of the Eucharistic liturgy (chiefly belonging to the Catholic Church, the Churches of the Anglican Communion, and also the Lutheran Church) to music.  Most masses are settings of the liturgy in Latin, the traditional language of the Catholic Church, but there are a significant number written in the languages of non-Catholic countries where vernacular worship has long been the norm. For example, there are many masses (often called "Communion Services") written in English for the Church of England. At a time when Christianity was competing for prominence with other religions, the music and chants were often beautiful and elaborate to attract new members to the Church.Music is an integral part of mass. It accompanies various rituals acts and contributes to the totality of worship service. Music in mass is an activity that participants share with others in the celebration of Jesus Christ.Masses can be a cappella, for the human voice alone, or they can be accompanied by instrumental obbligatos up to and including a full orchestra. Many masses, especially later ones, were never intended to be performed during the celebration of an actual mass.
Generally, for a composition to be a full mass, it must contain the following invariable five sections, which together constitute the Ordinary of the Mass.

Kyrie ("Lord have mercy")
Gloria ("Glory be to God on high")
Credo ("I believe in one God"), the Nicene Creed
Sanctus ("Holy, Holy, Holy"), the second part of which, beginning with the word "Benedictus" ("Blessed is he"), was often sung separately after the consecration, if the setting was long. (See Benedictus for other chants beginning with that word.)
Agnus Dei ("Lamb of God")This setting of the Ordinary of the Mass spawned a tradition of Mass composition to which many famous composers of the standard concert repertory made contributions, including Bach, Haydn, Mozart and Beethoven.The Requiem Mass, or the Mass of the Dead, is a modified version of the ordinary mass.  Musical settings of the Requiem mass have a long tradition in Western music.  There are many notable works in this tradition, including those by Ockeghem, Pierre de la Rue, Brumel, Jean Richafort, Pedro de Escobar, Antoine de Févin, Morales, Palestrina, Tomás Luis de Victoria, Mozart, Gossec, Cherubini, Berlioz, Brahms, Bruckner, Dvořák, Frederick Delius, Maurice Duruflé, Fauré, Liszt, Verdi, Herbert Howells, Stravinsky, Britten, György Ligeti, Penderecki, Henze, and Andrew Lloyd Webber.
In a liturgical mass, there are variable other sections that may be sung, often in Gregorian chant. These sections, the "proper" of the mass, change with the day and season according to the church calendar, or according to the special circumstances of the mass. The proper of the mass is usually not set to music in a mass itself, except in the case of a Requiem Mass, but may be the subject of motets or other musical compositions.  The sections of the proper of the mass include the introit, gradual, Alleluia or Tract (depending on the time of year), offertory and communion.

Carols
A carol is a festive song, generally religious but not necessarily connected with church worship, often having a popular character. Today the carol is represented almost exclusively by the Christmas carol, the Advent carol, and to a lesser extent by the Easter carol.
The tradition of Christmas carols goes back as far as the 13th century, although carols were originally communal songs sung during celebrations like harvest tide as well as Christmas. It was only in the late 18th and 19th centuries that carols began to be sung in church, and to be specifically associated with Christmas.  Traditionally, carols have often been based on medieval chord progressions, and it is this that gives them their characteristic sound. Some carols like "Personent hodie" and "Angels from the Realms of Glory" can be traced directly back to the Middle Ages, and are among the oldest musical compositions still regularly sung.
Carols suffered a decline in popularity after the Reformation in the countries where Protestant churches gained prominence (although well-known Reformers like Martin Luther authored carols and encouraged their use in worship), but survived in rural communities until the revival of interest in carols in the 19th century. The first appearance in print of "God Rest Ye Merry, Gentlemen", "The First Noel", "I Saw Three Ships" and "Hark the Herald Angels Sing" was in Christmas Carols Ancient and Modern (1833) by William Sandys. Composers like Arthur Sullivan helped to repopularize the carol, and it is this period that gave rise to such favorites as "Good King Wenceslas" and "It Came Upon the Midnight Clear", a New England carol written by Edmund H. Sears and Richard S. Willis.

Christian hymnody
Thomas Aquinas, in the introduction to his commentary on the Psalms, defined the Christian hymn thus: "Hymnus est laus Dei cum cantico; canticum autem exultatio mentis de aeternis habita, prorumpens in vocem." ("A hymn is the praise of God with song; a song is the exultation of the mind dwelling on eternal things, bursting forth in the voice.") The earliest Christian hymns are mentioned round about the year 64 by Saint Paul in his letters. The Greek hymn, Hail Gladdening Light was mentioned by Saint Basil around 370. Latin hymns appear at around the same time, influenced by Saint Ambrose of Milan. Early Christian hymns are known as canticles and are often based on Biblical passages other than the psalms; they are still used in Catholic, Lutheran, Anglican and Methodist liturgy, examples are Te Deum and Benedicite. Prudentius, a Spanish poet of the late 4th century was one of the most prolific hymn writers of the time.
Early Celtic hymns, associated with Saint Patrick and Saint Columba, including the still extant, Saint Patrick's Breastplate, can be traced to the 6th and 7th centuries.  Catholic hymnody in the Western church introduced four-part vocal harmony as the norm, adopting major and minor keys, and came to be led by organ and choir.
The Protestant Reformation resulted in two conflicting attitudes to hymns. One approach, the regulative principle of worship, favored by many Zwinglians, Calvinists among others, considered anything that was not directly authorized by the Bible to be a novel and Catholic introduction to worship, which was to be rejected. All hymns that were not direct quotations from the Bible fell into this category. Such hymns were banned, along with any form of instrumental musical accompaniment, and organs were ripped out of churches. Instead of hymns, Biblical psalms were chanted, most often without accompaniment. This was known as exclusive psalmody. Examples of this may still be found in various places, including the Churches of Christ and the "free churches" of western Scotland.

The other Reformation approach, favored by Martin Luther, produced a burst of hymn writing and congregational singing. Luther and his followers often used their hymns, or chorales, to teach tenets of the faith to worshipers. The earlier English writers tended to paraphrase biblical text, particularly Psalms; Isaac Watts followed this tradition, but is also credited as having written the first English hymn which was not a direct paraphrase of Scripture.
Later writers took even more freedom, some even including allegory and metaphor in their texts.
Charles Wesley's hymns spread Methodist theology, not only within Methodism, but in most Protestant churches. He developed a new focus: expressing one's personal feelings in the relationship with God as well as the simple worship seen in older hymns. The Methodist Revival of the 18th century created an explosion of hymn writing in Welsh, which continued into the first half of the 19th century.
African-Americans developed a rich hymnody out of the spirituals sung during times of slavery. During the Second Great Awakening in the United States, this led to the emergence of a new popular style. Fanny Crosby, Ira D. Sankey, and others produced testimonial music for evangelistic crusades.  These are often designated "gospel songs" as distinct from hymns, since they generally include a refrain (or chorus) and usually (though not always) a faster tempo than the hymns.  As examples of the distinction, "Amazing Grace" is a hymn (no refrain), but "How Great Thou Art" is a gospel song.  During the 19th century the gospel-song genre spread rapidly in Protestantism and, to a lesser but still definite extent, in Catholicism. The gospel-song genre is unknown in the worship per se by Eastern Orthodox churches, which rely exclusively on traditional chants, and disallow instrumental accompaniment.
Along with the more classical sacred music of composers ranging from Mozart to Monteverdi, the Catholic Church continued to produce many popular hymns such as Lead, Kindly Light, Silent Night, "O Sacrament Divine" and "Faith of our Fathers".

Modern
Many churches today use contemporary worship music which includes a range of styles often influenced by popular music. This style began in the late 1960s and became very popular during the 1970s. A distinctive form is the modern, lively black gospel style.

See also
Christian music
Church music in Scotland
Contemporary worship music
Evensong
Liturgical music
Lutheran hymn
Religious music

References
Sources
A.C. Zenos, ed., "The Ecclesiastical History of Socrates Scholasticus", in A Select Library of Nicene and Post-Nicene Fathers of the Christian Church. Second Series, ed. Philip Schaff and Henry Wace. Grand Rapids: W. B. Eerdmans Publishing Company 1957.

Further reading
Hutchings, Arthur. Church Music in the Nineteenth Century, in series, Studies in Church Music. New York: Oxford University Press, 1967. 166 p.
Robin Sheldon, ed. In Spirit and in Truth: Exploring Directions in Music in Worship Today. London: Hodder & Stoughton, 1989. x, 198 p. ISBN 0-340-48715-1

External links
 Media related to Church music at Wikimedia Commons