Nature, music, and number are all somehow intertwined ... one can be transformed into another.
Making Music with Computers, Bill Manaris and Andrew R. Brown
To help us focus, the book has a few guiding principles:
Fun over rigour: We'll take inspiration from science and nature, but also take some artistic license along the way.
Composition over sound design: The focus will be on creating musical structures, with sound generation delegated to instrument samples.
Simple building blocks: We'll build things from the ground up. As we go we'll encapsulate our learning into a set of modules we can plug together to make more sophisticated music.
To help us get started, the book begins with short primers on each of its three subjects:
Generative: Here we define what we mean by "generative", and cover how generative processes can be applied to creating art and music
Music: Here we explain the building blocks of music: melody, harmony and rhythm.
Next, we move on to programming the basic building blocks of music:
Finally, we go on to develop systems that create music based on different generative ideas:
- TODO: List chapters
All the code examples in this book are runnable. You should be able to hear the
results (or see them in the console) when hitting the
Run bottom in the
bottom-right corner of each code snippet.
To avoid repeating big chunks of code we've already seen, once a concept has
been introduced, we'll import relevant functions from the
Gen.js library (it's present on
every page as the
gen global). The actual implementation might differ from the
presented examples as the library evolves, but the principles should remain
## Gen.js Library
A lot of the ideas are encapsulated in the Gen.js library. If you want to skip over how things are implemented and just make music, we'll cross-reference each of the code examples with their Gen.js counterpart. The full list of available functions can be found in the API Reference.