In Ezekiel 28:13-19 in the Bible, it looks like the leading cherub of worship (who later had some real problems), was created with tambourines and pipes built into him. The workmanship of thy tabrets (Tambourines) and pipes was prepared in thee in the day which thou wast created. So music and flutes existed in a spirt realm before they got here. I have spoken to two people who have seen angels playing side blown and end blown flutes.
We also find in Genesis 4:21 that Jubal (the 7th generation after Adam and Eve) was the father of the Lyre, a harp and the Ugab a Shepherd’s flute). Shepherds had a lot of time in the field and that's where King David learned to play his harp.
Aside from divine inspiration, we also see flutes in nature.