Algorithmic musical phrase generator