About this book#
Principles of Computer Music is a free online textbook that teaches the technical principles and creative practice of musical computing from a computer science perspective in Python.
This textbook was written by Chris Donahue as a companion to CMU’s Intro to Computer Music Course (15-322/622).
© 2026 Chris Donahue. All rights reserved. Do not copy or redistribute without permission. See LICENSE for details.
Organization#
This text is roughly organized into two parts:
Part 1: Foundations (Chapters 0-10): Foundational material for computer music.
Part 2: Topics (Chapters 11-19): Specific topics that build upon the foundation.
Status#
This text is a work in progress. It is being updated regularly during the first offering of the revamped course in Fall 2026. Afterwards, the completed text will be stamped as the first edition.
Part 1 is about 75% complete, while Part 2 is 0% complete. I am hoping that both will be completed by the end of 2026.
Feedback#
We welcome feedback on this book from students and readers. Share your thoughts through the textbook feedback form, which includes an optional email field if you would like us to follow up. If you believe you have found an error in the text, please report it the same way. Corrections are tracked on the Errata page.
Acknowledgements#
This book was heavily inspired by Brian McFee’s Digital Signals Theory, and the formatting builds upon McFee’s executable book project template. This book was also inspired by years of reading Julius Orion Smith’s online textbooks and course materials.
David Liu, music technology undergrad at CMU and TA for the course, played a key role in formatting and publishing the textbook content online.
This book would not exist without the efforts of Roger Dannenberg, who carved out a path for computer music at CMU through his research and by creating the original Introduction to Computer Music course and eponymous textbook.
Special thanks to Tom Cortina for supporting Chris’s journey in teaching this course.
AI disclosure#
Important
AI Disclosure: To allow for a full supporting text to be written on a short summer timeline, this text was written with heavy support from AI. Every word has been thoroughly reviewed by the author (Chris Donahue).
This book was written with support from AI, specifically Claude Opus 4.6 through 5. At a high level, most of the technical content and organization were written by Chris, while most of the prose and figure code were generated by Claude. The authorship process for each chapter was as follows:
Chris wrote a detailed outline, specifying all of the content and organization
Chris added his lecture slides and code from previous years of the course as additional references
Claude was instructed to generate a chapter draft based on the outline, slides, and
AGENTS.mdfileChris read every word of the chapter draft and made manual changes and/or left feedback
Claude was asked to address any feedback
This iterative process continued until Chris was satisfied with the chapter
For transparency, the original handwritten outlines for each chapter are preserved in the textbook’s GitHub repo, and the git history was carefully managed so that each change of agency between Chris/Claude is codified with a commit.
Dedication#
For Jayhee Min, who found beauty in music.