I wrote a simple library (just an include file really with few functions) to enable creation of simple sound effects programmatically. It can be found here
https://github.com/SFML/SFML/wiki/SynthBTW. I am old timer getting back to programming for fun but it has been many years since I wrote any real code so any comments and imporevement suggestions are very welcome.