Preface

The book in your hands is the result of more than a decade of independent and collaborative effort by the two authors and their computer music associates. Combining computers and music has a long and fruitful heritage. The ideas which underpin the connection between calculating and composing date back centuries. In the 21st century, computers and music are more closely aligned than ever before. In particular, computers have become indispensable in music making, distribution, performance, and consumption.

This book introduces important concepts and skills necessary to make music with computers. It interweaves computing pedagogy with musical concepts and creative activities. It does this while maintaining a natural, steady increase in computational skills that are motivated by creative musical contexts.

This book is intended primarily for introductory computer science courses and for courses in the intersection of computing and the arts. However, it is naturally suited for self-study. It assumes little musical and programming experience; it introduces topics and concepts as they arise through motivating, and hopefully inspiring examples.

Creative Programming

“Making Music with Computers” is an introduction to creative software development in the Python programming language. It uses music-making as a vehicle to introduce computer programming and computational thinking to non-traditional audiences. This book helps computer science educators teach students how to synthesize the creativity and design of the arts with the mathematical rigor and formality of computer science.

Initially inspired by Randy Pausch’s “head-fake” approach*, we utilize exciting and innovative music-creation activities to ultimately teach introductory computer science concepts. Our goal is to keep this “game” going throughout the book, just long enough so that the students learn to express themselves algorithmically.

The book covers all concepts found in a traditional “Intro to Computer Programming” (CS1) course. These concepts include data types, variables, assignment, arithmetic operators, input/output, algorithms, selection (if statements), relational operators, logical operators, iteration (loops), lists (arrays), functions, modularization (functions), classes (object-oriented programming). Additionally, the book covers graphical user interfaces (GUIs), event-driven programming, big data, MIDI programming, client-server programming (via OSC messages), recursion, fractals, and complex system dynamics (boids).

Target Audience

This book addresses two trends in computing education: (1) the growing use of the Python language for teaching introductory programming, and (2) the increasing infusion of computational thinking into liberal arts courses, especially interdisciplinary offerings in computing and the arts. It does so by presenting computer music topics in an accessible way for our two main target audiences:

  • First- and second-year university students, as well as advanced high school students, who are interested in computer music and wish to learn computer programming in a creative context; and
  • Musicians of all levels and backgrounds who wish to expand their creative horizons by modeling musical processes through computer programming, and by applying these processes to create novel and intriguing musical material for composition and live performance.

Navigating the Book

The book may be navigated using one of three narratives, objects first, procedures first, or à la carte:

  • Objects first (chapters 1–3, followed by chapters 8–11, with just-in-time introduction of for loops, functions, and if statements). This approach works well with inexperienced students, as it is creatively rich. It includes building graphical user interfaces (GUIs) and interactive musical instruments, and thus motivates hard-to-grasp programming concepts (such as loops, functions, and if statements). To quote one of our students, “students want to do the work, because it is fun.” In particular, chapters 1-3 introduce object-based programming (using Notes, Phrases, Parts, and Scores). Chapter 8 introduces GUI objects, event-driven programming, and important human-computer interaction (HCI) ideas, such as how to develop usable interfaces through paper prototyping, usability testing, and iterative refinement. Chapter 9 introduces MIDI and OSC (open sound control) input/output objects, thus enabling programs to connect to traditional musical instruments (e.g., guitars, pianos, etc.) and physical controllers (e.g., MIDI control surfaces, smartphones, touch-sensitive tablets, etc.). Finally, chapters 10 and 11 introduce Python classes, music from math equations, the harmonograph (a way to visualize and sonify complex, yet beautiful repetitive patterns found in nature, such as planetary orbits), animation, fractals, the golden ratio, recursion, Zipf’s law, and chaotic systems (boids). This material is full of musical and other creative possibilities.
  • Procedures first (chapters 1–11). This is a traditional narrative, which interweaves computational and musical concepts incrementally, from beginning to intermediate level of expertise. In addition to the above topics, it includes randomness and creativity, data sonification, image processing, musical canons (musical puzzles, of which JS Bach was a master), minimalism, and stochastic music, to name a few. It also provides a thorough introduction to programming in Python, including data types, variables, assignment, arithmetic operators, input/output, algorithms, selection (if statements), iteration (loops), lists (arrays), file input/output, modularization (functions), event-driven programming (callback functions), and object-oriented programming (classes).
  • À la carte (explore topics as desired/needed). This approach is best suited for self-learners, and for musicians (and programmers) who already know some Python (and music), and who wish to explore techniques to enhance their potential for creative expression. If you belong in this group, then the table of contents is your best friend. Study it carefully, looking for items that seem attractive, and go from there. If you are lacking some Python background (to fully appreciate the provided examples, without having to read the whole book up to that point), either you can look up Python topics in the book index, or search the Internet (the latter being full of great Python reference material). Please enjoy weaving your own path through this material - we certainly did!

All three narratives are supported by the website provided at http://jythonMusic.org. There you will find additional resources (including more code examples) to enhance your creative exploration and learning. Enjoy!

Pedagogy

From the point of view of pedagogy, our primary audience is educators interested in teaching computing and computational thinking in a media-rich context, in conjunction with guidelines such as the CS Principles and Big Ideas. In particular, this book supports teaching of the 7 CS Big Ideas:

  • Big Idea I—Creativity. Computing is a creative human activity that engenders innovation and promotes exploration (whole book, and in particular chapters 1, 6, 7, 8, 9, 10, and 11).
  • Big Idea II—Abstraction. Abstraction reduces information and detail to focus on concepts relevant to understanding and solving problems (whole book, and in particular chapters 2, 3, 7, and 11).
  • Big Idea III—Data. Data and information facilitate the creation of knowledge (chapters 3, 4, 7, 10, and 11).
  • Big Idea IV—Algorithms. Algorithms are tools for developing and expressing solutions to computational problems (chapters 4, 5, 6, 7, 10, and 11).
  • Big Idea V—Programming. Programming is a creative process that produces computational artifacts (chapters 3, 4, 5, 6, 7, 8, 9, 10, and 11).
  • Big Idea VI—Internet. Digital devices, systems, and the networks that interconnect them enable and foster computational approaches to solving problems (chapter 9).
  • Big Idea VII—Impact. Computing enables innovation in other fields including mathematics, science, humanities, and arts, among others (chapters 1, 8, 9, 10, and 11).

Software Libraries

The book comes with a Jython environment and a collection of software examples and libraries, including music, image, graphical user interface, MIDI, audio, and Open Sound Control. The music library is an extension of the jMusic library and incorporates other cross-platform programming tools. This software is available for download on the website associated with this book, http://jythonMusic.org.

We hope that this book will enhance the educational experience of students in entry-level courses in computing and computational thinking. We also hope that it may serve as a reference and text for computer music courses, such as those offered by music technology programs. Finally, we hope this book may serve as a reference and tutorial resource for digital music enthusiasts who wish to expand their creative horizons and learn how to write music software and create algorithmic music compositions.


* See Randy Pausch’s “Last Lecture” (readily available online).

Any MIDI-enabled instrument will work, opening the door for some powerful creative possibilities, for building hybrid computer music instruments.

The College Board, “Computer Science: Principles, Big Ideas and Key Concepts”, 2012.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset