The 1st Chabad Rebbe, Rabbi Shneur Zalman of Liadi, expressed the following in a chassidic discourse:[1]
The Bal Shem Tov once said of a war between two nations that lasted seven years.
The purpose of this war was to elevate the sounds of the war trumpets and the screams of the warriors and from them create a song—and for one tzadik to serve G-d with this song.
[1] Sefer HaMa-amorim, 5565 Pg. 202