It seems like the invention of music instruments came about accidentally. It is speculated that the invention of musical instruments depended on the materials available, and the stimulus came from the battlefield. No one knows where music came from, but there are many scientists who can guess and make educated judgements, like Neville Fletcher, a retired scientist at the Australian National University in Canberra.
Fletcher thought that human noise makes combined poetry with their instruments to create a story through song. Traditionally, poetry had rhythms to them, suggesting that these were extended and songs were sung. No one really knows what happened, but at some point in time, music was created.
Archaeologists have discovered objects resembling flutes that are approximately 67,000 years old. They might have been made by neanderthals. Objects that were clearly flutes were found in China, and they dated to 7,000- 9,000 years ago. Other instruments like harps and lyres were made between 2,600- 2,500 B.C., and were found in the city of Ur, the home of the biblical Abraham.
Fletcher also said that 10,000 years ago, the didgeridoo was created by Australian aborigines. It is suggested that the first instrument was made when termites hollowed the centres of a small eucalyptus plant. When someone blew into this, it made a loud noise. After striking the log with sticks, other cultures noticed different sounds could be made. They modified the length and created such instruments like the xylophone.
By using this technique, other instruments were created like church bells. Perhaps a bronze helmet was struck with a sword and this created a sound that people developed further. On the topic of war, instruments that require wood and strings might have been derived from bows and arrows, eventually leading to violins, guitars and other instruments. It seems that warfare and music went hand in hand. With the further development, perfection and appreciation for music, we have what we have today.