If you are interested in this, I would recommend looking up the Extempore programming language/environment and some of Andrew Sorensen's live coding performances. Even if live coding is not your thing, it's definitely interesting.
Faust: https://news.ycombinator.com/item?id=13012880
audioKit: https://news.ycombinator.com/item?id=9903760
pure data: very difficult to search for
common lisp et al: https://news.ycombinator.com/item?id=12518768