Watch videos of students making music using code from the book.
Teach Your Students How to Use Computing to Explore Powerful and Creative Ideas
In the twenty-first century, computers have become indispensable in music making, distribution, performance, and consumption. Making Music with Computers: Creative Programming in Python introduces important concepts and skills necessary to generate music with computers. It interweaves computing pedagogy with musical concepts and creative activities, showing students how to integrate the creativity and design of the arts with the mathematical rigor and formality of computer science.
The book provides an introduction to creative software development in the Python programming language. It uses innovative music-creation activities to illustrate introductory computer programming concepts, including data types, algorithms, operators, iteration, lists, functions, and classes. The authors also cover GUIs, event-driven programming, big data, sonification, MIDI programming, client–server programming, recursion, fractals, and complex system dynamics.
Requiring minimal musical or programming experience, the text is designed for courses in introductory computer science and computing in the arts. It helps students learn computer programming in a creative context and understand how to build computer music applications. Also suitable for self-study, the book shows musicians and digital music enthusiasts how to write music software and create algorithmic music compositions.
A supplementary website (http://jythonMusic.org) provides a music library and other software resources used in the text. The music library is an extension of the jMusic library and incorporates other cross-platform programming tools. The website also offers example course and associated media resources.
Introduction and History
Connecting Music, Nature, and Number
Computer Music History
Algorithms and Programming
The Computer as a Musical Instrument
Software Used in This Book
Music Is Sound and …
Variables and Assignment
Input and Output
Organization and Data
Adding Notes with Lists
Case Study: Ludwig van Beethoven—"Für Elise"
Setting the Instrument
Case Study: Harold Faltermeyer—"Axel F"
A Complete Example
MIDI Drums and Percussive Sounds
Top -Down Design
Input and Output
Transformation and Process
Gestures, Emotion, and Musical Structure
Modifying Musical Material (Mod Functions)
The Software Development Process
Case Study: Computer-Aided Music Composition
Iteration and Lists
Case Study: Arpeggiators
Python List Operations
Iterative Musical Processes
Randomness and Choices
Randomness and Creativity
Indeterminism and Serialism
Python Random Functions
Harnessing (or Sieving) Randomness
Python Relational Operators
Python Boolean Values
Python Logical Operators
Sonification and Big Data
Case Study: Kepler—"Harmonies of the World" (1619)
File Input and Output
Python while Loop
Interactive Musical Instruments
Building Musical Instruments
Graphical User Interfaces
Case Study: Random Circles
Case Study: A Simple Musical Instrument
Case Study: An Audio Instrument for Continuous Pitch
A Simple Methodology for Developing GUI s
Case Study: A Virtual Piano
Scheduling Future Events
MIDI Devices—Connecting to Pianos, Guitars, etc.
OSC Devices—Connecting to Smartphones, Tablets, etc.
Music, Number, and Nature
Origins and Representations
Case Study: Music from Math Curves
Case Study: The Harmonograph
Case Study: Kepler’s Harmony of the World, No. 2
Exploring Powerful Ideas
Fractals and Recursion
Fibonacci Numbers and the Golden Ratio
Case Study: The Note Class
Case Study: A Slider Control
Appendix A: MIDI Constants
Appendix B: Music Library Functions
Appendix C: GUI Library Functions
Appendix D: Other Functions
A Summary appears at the end of each chapter.
"Bill Manaris and Andrew Brown have created this marvelous book that will engage and inspire you to learn more about the science and art of creating music through computation. … Bill and Andrew offer an accessible path into a wonderful world that is both as modern as your new laptop and as ancient as Plato. In that world of music and mathematics, they construct a sandbox of computational tools. They encourage you to create, compose music, and play with patterns and data."
—From the Foreword by Mark Guzdial, Georgia Institute of Technology
"Making Music with Computers by Bill Manaris and Andrew Brown is a perfect accompaniment to programming music with the computer language Python. Written clearly, succinctly, and including many appropriate diagrams, this book is a must for anyone desiring to create their own applications for composing and making music. First rate in every way."
—David Cope, Computer Composition Pioneer and Professor Emeritus, Music Department, University of California, Santa Cruz
"This is an impressive text. Its material is accessible to a reader who may know little to nothing about either music or computing/programming. The text has the characteristics of an agile, graceful delivery, quite a breadth of topics, and numerous apt, helpful, and often imaginative example programs.
Early chapters clearly and economically explain the elements of music, its terminology and notation, and the elements of compositional structure (notes, phrases, parts, and scores). Evidence of the musical reach of the book is given by the authors’ précis to the middle chapter: ‘Randomness and creativity, indeterminism, serialism, stochastic music, and ... generative music.’ Eventually they exemplify such topics as sonification, as put to the purpose of giving an alternative representation of a large data set, also interactive music generation, and the creation of musical compositions as inspired by natural phenomena such as the flocking behavior of birds, or inspired by mathematics, such as fractals.
The authors use the programming language Jython with a focus on music; they provide the software libraries to do this via downloads. The explication of Jython is effortless, even breezy, also unfussy, but with a thoroughness that positions the reader well to start wedding the computer to one’s musical interests. By the end of the text the authors have discussed the use of functions, software design principles, recursion, GUIs and event-driven programming, and the defining of classes.
Special mention should be given to the book’s examples. There are numerous, tidy, complete, and working Jython programs throughout the text, which the reader can duplicate and run. They serve both as exemplars of Jython programming, which the reader can learn from and emulate as well as be inspirations for composing one’s own computer-generated music."
—William A. Greene, Professor Emeritus, Computer Science Department, University of New Orleans