Sonic Pi is an awesome piece of software created by programmer Sam Aaron and the Sonic Pi team. Using its ruby-based programming language, you can create music powered by the tools that come with computation (loops, randomization, and tons more).
Every year, I partner with Jodie Ricci of Harvard's Project Zero to work with students on an interdisciplinary math / music / coding learning experience. Students analyze existing compositions, look at music through the lens of data, explore procedural music generation, and ultimately create their own compositions.jacent to this text, you'll find a jazzy piece created by a student during this experience. The entirety of what you hear is produced by nothing more than some thoughtful lines of code!