Algorithmic Music with Bayesian Networks