The slavery songs orginated from African American music, to express their feelings. African American music has always been characterized by the ever-changing circumstances of their life. Music was infused into their everyday life and passed on from generation to generation. Africans brought to the United States as slaves brought their musical traditions with them. Many of their activities were rooted in songs. As African American slaves were Christianized, their songs evolved to incorporate Christian hymns and psalms, resulting in the spiritual, which also served as a way to express the community's new faith, as well as its sorrows and hopes.
These slave songs sung by the enslaved African American evolved into new musical form “Negro Spirituals”. Thus music was used to during slavery by the enslaved African American people to express their feelings and to communicate through code songs , map songs to escape.The first collection of slave songs, “Slave Songs of the United States”, was formally presented in 1867, edited by William Frances Allen, Carlos Ware, and Lucy M. Garrison

Slave song timeline
Protest Song, timetoast.com