The Samaveda (Sanskrit: सामवेदः, sāmavedaḥ, from sāman "song" and veda "knowledge"), is the Veda of melodies and chants. It is an ancient Vedic Sanskrit text, and part of the scriptures of Hinduism. One of the four Vedas, it is a liturgical text which consists of 1,549 verses. All but 75 verses have been taken from the Rigveda. Three recensions of the Samaveda have survived, and variant manuscripts of the Veda have been found in various parts of India.
While its earliest parts are believed to date from as early as the Rigvedic period, the existing compilation dates from the post-Rigvedic Mantra period of Vedic Sanskrit, between c. 1200 and 1000 BCE or "slightly rather later," roughly contemporary with the Atharvaveda and the Yajurveda.
Embedded inside the Samaveda is the widely studied Chandogya Upanishad and Kena Upanishad, considered as primary Upanishads and as influential on the six schools of Hindu philosophy, particularly the Vedanta school. Samaveda has the root of music and dance tradition of this planet. 
Michael Witzel states that there is no absolute dating for Samaveda and other Vedic texts. He estimates the composition of the samhita layer of the text chronologically after the Rigveda, and in the likely range of 1200 to 1000 BCE, roughly contemporary with the Atharvaveda and the Yajurveda.
There were about a dozen styles of Samavedic chanting. Of the three surviving versions, the Jaiminiya preserves the oldest surviving tradition of Samavedic chanting.
The Samaveda is the Veda of Chants, or "storehouse of knowledge of chants". According to Frits Staal, it is "the Rigveda set to music". It is a fusion of older melodies (sāman) and the Rig verses. It has far fewer verses than Rigveda, but Samaveda is textually larger because it lists all the chant- and rituals-related score modifications of the verses.
The Samaveda text contains notated melodies, and these are probably the world's oldest surviving ones. The musical notation is written usually immediately above, sometimes within, the line of Samaveda text, either in syllabic or a numerical form depending on the Samavedic Sakha (school).
R. T. H. Griffith says that there are three recensions of the text of the Samaveda Samhita:
The Samaveda comprises two major parts. The first part include four melody collections (gāna, गान) and the second part three verse "books" (ārcika, आर्चिक). A melody in the song books corresponds to a verse in the arcika books. The Gana collection is subdivided into Gramageya and Aranyageya, while the Arcika portion is subdivided into Purvarcika and Uttararcika portions. The Purvarcika portion of the text has 585 single stanza verses and is organized in order of deities, while Uttararcika text is ordered by rituals. The Gramageya melodies are those for public recitations, while Aranyageya melodies are for personal meditative use such as in the solitude of a forest. Typically, the Purvarcika collection were sung to melodies described in the Gramageya-Gānas index, and the rules of how the verses mapped to verses is described in the Sanskrit texts such as the Puspasutra.
Just like Rigveda, the early sections of Samaveda typically begin with Agni and Indra hymns but shift to abstract speculations and philosophy, and their meters too shifts in a descending order. The later sections of the Samaveda, states Witzel, have least deviation from substance of hymns they derive from Rigveda into songs. The purpose of Samaveda was liturgical, and they were the repertoire of the udgātṛ or "singer" priests.
The Samaveda consists of 1,549 unique verses, taken almost entirely from Rigveda, except for 75 verses. The largest number of verse come from Books 9 and 8 of the Rig Veda. Some of the Rigvedic verses are repeated more than once. Including these repetitions, there are a total of 1,875 verses numbered in the Samaveda recension translated by Griffith.
Staal states that the melodies likely existed before the verses in ancient India, and the words of the Rigveda verses were mapped into those pre-existing melodies, because some early words fit and flow, while later words do not quite fit the melody in the same verse. The text uses creative structures, called Stobha, to help embellish, transform or play with the words so that they better fit into a desired musical harmony. Some verses add in meaningless sounds of a lullaby, for probably the same reason, remarks Staal. Thus the contents of the Samaveda represent a tradition and a creative synthesis of music, sounds, meaning and spirituality, the text was not entirely a sudden inspiration.
The portion of the first song of Samaveda illustrates the link and mapping of Rigvedic verses into a melodic chant:
Two primary Upanishads of Hinduism are embedded inside the Samaveda – the Chandogya Upanishad and the Kena Upanishad. Both are notable for the lifting metric melodic structure, but it is Chandogya which has played a historic role in the evolution of various schools of Hindu philosophy. The embedded philosophical premises in Chandogya Upanishad have, for example, served as foundation for Vedanta school of Hinduism. It is one of the most cited texts in later Bhasyas (reviews and commentaries) by scholars from the diverse schools of Hinduism. Adi Shankara, for example, cited Chandogya Upanishad 810 times in his Vedanta Sutra Bhasya, more than any other ancient text.
The Chandogya Upanishad belongs to the Tandya school of the Samaveda. Like Brhadaranyaka Upanishad, the Chandogya Upanishad is an anthology of texts that must have pre-existed as separate texts, and were edited into a larger text by one or more ancient Indian scholars. The precise chronology of Chandogya Upanishad is uncertain, but it is the youngest layer of text in the Samaveda, and it is variously dated to have been composed by 8th to 6th century BCE in India.
The Chandogya text combines a metric, melodic structure with a wide range of speculations and philosophical topics. The text in eighth and ninth volumes of the first chapter, for example, describes the debate between three men proficient in Udgitha, about the origins and support of Udgitha and all of empirical existence. The text summarizes their discussion as,
What is the origin of this world?
Space, said he. Verily, all things here arise out of space. They disappear back into space, for space alone is greater than these, space is the final goal.
This is the most excellent Udgitha. This is endless. The most excellent is his, the most excellent worlds does he win, who, knowing it thus, reveres the most excellent Udgitha (Om, ॐ).
Max Muller notes that the term "space" above, was later asserted in the Vedanta Sutra verse 1.1.22 to be a symbolism for the Vedic concept of Brahman. Paul Deussen explains the term Brahman means the "creative principle which lies realized in the whole world". The text discusses Dharma and many other topics:
There are three branches of Dharma (righteous life, duty): Yajna (sacrifice), Svādhyāya (self study) and Dāna (charity) are the first,
Tapas (austerity, meditation) is the second, while dwelling as a Brahmacharya for education in the house of a teacher is third,
All three achieve the blessed worlds. But the Brahmasamstha – one who is firmly grounded in Brahman – alone achieves immortality.
The Kena Upanishad is embedded inside the last section of the Talavakara Brahmanam recension of the Samaveda. It is much shorter, but it too delves into philosophical and spiritual questions like the Chandogya Upanishad. In the fourth chapter, the Kena Upanishad states, for example, that all beings have an innate longing for spiritual knowledge, for self-awareness. This knowledge of Atman-Brahman is Tadvanam (transcendental happiness, blissfulness). In the final paragraphs, Kena Upanishad asserts ethical life as the foundation of self-knowledge and of Atman-Brahman.
The Kauthuma recension has been published (Samhita, Brahmana, Shrautasutra and ancillary Sutras, mainly by B.R. Sharma), parts of the Jaiminiya tradition remain unpublished. There is an edition of the first part of the Samhita by W. Caland and of the Brahmana by Raghu Vira and Lokesh Chandra, as well as the neglected Upanishad, but only parts of the Shrautasutra. The song books remain unpublished.
A German edition of Samaveda was published in 1848 by Theodor Benfey, and Satyavrata Samashrami published an edited Sanskrit version in 1873. A Russian translation was published by Filipp Fortunatov in 1875.  An English translation was published by Ralph Griffith in 1893. A translation in Hindi by Mridul Kirti called "Samveda Ka Hindi Padyanuvad" has also been published recently.
The Samaveda text has not received as much attention as the Rigveda, because outside of the musical novelty and melodic creativity, the substance of all but 75 verses of the text have predominantly been derived from the Rigveda. A study of Rigveda suffices.
The Indian classical music and dance, states Guy Beck, is rooted in the sonic and musical dimensions of the Sama Veda, along with the Upanishads and Agamas. The Samaveda, in addition to singing and chanting, mentions instruments. The rules and suggestions for playing various instruments form a separate compilation, called the Gandharva-Veda, and this Upaveda is attached to the Samaveda. The structure and theory of chants in the Samaveda have inspired the organizing principle for Indian classical arts and performances, and this root has been widely acknowledged by musicologists dealing with the history of Indian music.
Our music tradition [Indian] in the North as well as in the South, remembers and cherishes its origin in the Samaveda... the musical version of the Rigveda.