Generating Music With SageMath And Sonic Pi - Examples
We will explore some examples to make music using the libraries included in Sage and python data structures
1 Bach's Prelude in C
Here's a translation of the Mathematica code at mathematica.SE, which is quite nice. (Listen to Bach)
2 Sound of Cellular Automaton
Using the idea of mathematica code using Cellular Automata, we modify the Cellular Automata's interactive example (Listen to CA: 61 iterations, Rule 90)
3 HMM Emitting Notes
We may even use the notes of pleasant compositions to train Markov Models, which can later keep producing notes probabilistically. E.g. a 3 symbol model looks like: (Listen to HMM)