The origins of qawwali probably predate the birth of Muhammad. The earliest Islamic scholars discussed the spiritual effects of music, but it was only in the time of al-Gazali (1085-1111) that these principles were refined and codified. These principles were then expanded by the Chisti school of Sufism. It is this order that has been responsible for the propagation of Qawwali in India and Pakistan for the last few centuries.
Piyut is a poem sung to God or about God. Piyut is also a prayer that expresses emotions in relationship to God, including praise, glory, joy, sorryow, anger, gratitude, lamentation, celebration, respect, fear, fury, loneliness, and longing. Piyutim are a crying out for connection with God.