A musical instrument is a device created or adapted to musical sounds. In principle, any object that produces sound can be a musical instrument—it is through purpose that the object becomes a musical instrument. The history of musical instruments dates back to the beginnings of human culture. The purpose of early musical instruments was ritual: a hunter might use a trumpet to signal success on the hunt, or a shaman might use a drum in a religious ceremony. Cultures later developed the processes of composing and performing melodies for entertainment. Musical instruments evolved in step with changing applications.