Introduction to Digital Music with Python Programming
eBook - ePub

Introduction to Digital Music with Python Programming

Learning Music with Code

Michael S. Horn, Melanie West, Cameron Roberts

  1. 260 Seiten
  2. English
  3. ePUB (handyfreundlich)
  4. Über iOS und Android verfĂŒgbar
eBook - ePub

Introduction to Digital Music with Python Programming

Learning Music with Code

Michael S. Horn, Melanie West, Cameron Roberts

Angaben zum Buch
Buchvorschau
Inhaltsverzeichnis
Quellenangaben

Über dieses Buch

Introduction to Digital Music with Python Programming provides a foundation in music and code for the beginner. It shows how coding empowers new forms of creative expression while simplifying and automating many of the tedious aspects of production and composition.

With the help of online, interactive examples, this book covers the fundamentals of rhythm, chord structure, and melodic composition alongside the basics of digital production. Each new concept is anchored in a real-world musical example that will have you making beats in a matter of minutes.

Music is also a great way to learn core programming concepts such as loops, variables, lists, and functions, Introduction to Digital Music with Python Programming is designed for beginners of all backgrounds, including high school students, undergraduates, and aspiring professionals, and requires no previous experience with music or code.

HĂ€ufig gestellte Fragen

Wie kann ich mein Abo kĂŒndigen?
Gehe einfach zum Kontobereich in den Einstellungen und klicke auf „Abo kĂŒndigen“ – ganz einfach. Nachdem du gekĂŒndigt hast, bleibt deine Mitgliedschaft fĂŒr den verbleibenden Abozeitraum, den du bereits bezahlt hast, aktiv. Mehr Informationen hier.
(Wie) Kann ich BĂŒcher herunterladen?
Derzeit stehen all unsere auf MobilgerĂ€te reagierenden ePub-BĂŒcher zum Download ĂŒber die App zur VerfĂŒgung. Die meisten unserer PDFs stehen ebenfalls zum Download bereit; wir arbeiten daran, auch die ĂŒbrigen PDFs zum Download anzubieten, bei denen dies aktuell noch nicht möglich ist. Weitere Informationen hier.
Welcher Unterschied besteht bei den Preisen zwischen den AboplÀnen?
Mit beiden AboplÀnen erhÀltst du vollen Zugang zur Bibliothek und allen Funktionen von Perlego. Die einzigen Unterschiede bestehen im Preis und dem Abozeitraum: Mit dem Jahresabo sparst du auf 12 Monate gerechnet im Vergleich zum Monatsabo rund 30 %.
Was ist Perlego?
Wir sind ein Online-Abodienst fĂŒr LehrbĂŒcher, bei dem du fĂŒr weniger als den Preis eines einzelnen Buches pro Monat Zugang zu einer ganzen Online-Bibliothek erhĂ€ltst. Mit ĂŒber 1 Million BĂŒchern zu ĂŒber 1.000 verschiedenen Themen haben wir bestimmt alles, was du brauchst! Weitere Informationen hier.
UnterstĂŒtzt Perlego Text-zu-Sprache?
Achte auf das Symbol zum Vorlesen in deinem nÀchsten Buch, um zu sehen, ob du es dir auch anhören kannst. Bei diesem Tool wird dir Text laut vorgelesen, wobei der Text beim Vorlesen auch grafisch hervorgehoben wird. Du kannst das Vorlesen jederzeit anhalten, beschleunigen und verlangsamen. Weitere Informationen hier.
Ist Introduction to Digital Music with Python Programming als Online-PDF/ePub verfĂŒgbar?
Ja, du hast Zugang zu Introduction to Digital Music with Python Programming von Michael S. Horn, Melanie West, Cameron Roberts im PDF- und/oder ePub-Format sowie zu anderen beliebten BĂŒchern aus Technology & Engineering & Acoustical Engineering. Aus unserem Katalog stehen dir ĂŒber 1 Million BĂŒcher zur VerfĂŒgung.

Information

Jahr
2022
ISBN
9781000533415

1 Why music and coding?

DOI: 10.4324/9781003033240-1
Welcome to Introduction to Digital Music with Python: Learning Music with Code. This book is designed for people who love music and are interested in the intersection of music and coding. Maybe you’re an aspiring musician or music producer who wants to know more about coding and what it can do. Or maybe you already know a little about coding, and you want to expand your creative musical horizon. Or maybe you’re a total beginner in both. Regardless of your starting point, this book is designed for you to learn about music and coding as mutually reinforcing skills. Code gives us an elegant language to think about musical ideas, and music gives us a context within which code makes sense and is immediately useful. Together they form a powerful new way to create music that will be interconnected with digital production tools of the future.
More and more code will be used to produce music, to compose music, and even to perform music for live audiences. Digital production tools such as Logic, Reason, Pro Tools, FL Studio, and Ableton Live are complex software applications created with millions of lines of code written by huge teams of software engineers. With all of these tools you can write code to create custom plugins and effects. Beyond production tools, live coding is an emerging form of musical performance art in which Information Age DJs write computer code to generate music in real time for live audiences.
In other ways, we’re still on the cusp of a radical transformation in the way that we use code to create music. The history of innovation in music has always been entwined with innovation in technology. Whether we’re talking about Franz Liszt in the 19th century, who pioneered the persona of the modern music virtuoso based on technological breakthroughs of the piano,1 or DJ Kool Herc in the 20th century, who pioneered hip-hop with two turntables and a crate full of funk records in the Bronx, technologies have created new opportunities for musical expression that have challenged the status quo and given birth to new genres. We don’t have the Franz Liszt or DJ Kool Herc of coding yet, but it’s only a matter of time before the coding virtuosos of tomorrow expand the boundaries of what’s possible in musical composition, production, and performance.

1.1 What is Python?

In this book you’ll learn how to create your own digital music using a computer programming language called Python. If you’re not familiar with programming languages, Python is a general-purpose language first released in the 1990s that is now one of the most widely used languages in the world. Python is designed to be easy to read and write, which makes it a popular choice for beginners. It’s also fully featured and powerful, making it a good choice for professionals working in fields as diverse as data science, web development, the arts, and video game development. Because Python has been around for decades, it runs on every major computer operating system. The examples in this book even use a version of Python that runs directly inside of your web browser without the need for any special software installation.
Unlike many other common beginner programming languages, Python is “text-based”, which means that you type code into an editor instead of dragging code blocks on the computer screen. This makes Python a little harder to learn than other beginner languages, but it also greatly expands what you can do. By the time you get through this book you should feel comfortable writing short Python programs and have the conceptual tools you need to explore more on your own.

1.2 What this book is not

Before we get into a concrete example of what you can do with a little bit of code, just a quick note about what this book is not. This book is not a comprehensive guide to Python programming. There are many excellent books and tutorials designed for beginners, several of which are free.2
This book is also not a comprehensive guide to music theory or Western music notation. We’ll get into the core ideas behind rhythm, harmony, melody, and composition, but there are, again, many other resources available for beginners who want to go deeper. What we’re offering is a different approach that combines learning music with learning code in equal measure.

1.3 What this book is

What we will do is give you an intuitive understanding of the fundamental concepts behind both music and coding. Code and music are highly technical skills, full of arcane symbols and terminology, that seem almost designed to intimidate beginners. In this book we’ll put core concepts to use immediately to start making music. You’ll get to play with ideas at your own pace and get instant feedback as you bring ideas to life. We skip most of the technical jargon and minutiae for now—that can come later. Instead, we focus on developing your confidence and understanding. Importantly, the skills, tools, and ways of thinking that we introduce in this book will be broadly applicable in many other areas as well. You’ll be working in Python code, but the core structures of variables, functions, loops, conditional logical, and classes are the same across many programming languages including JavaScript, Java, C, C++, and C#. After you learn one programming language, each additional language is that much easier to pick up.

1.4 TunePad and EarSketch

This book uses two free online platforms that combine music and Python coding. The first, called TunePad (https://tunepad.com), was developed by a team of researchers at Northwestern University in Chicago. TunePad lets you create short musical loops that you can layer together using a simple digital audio workstation (DAW) interface. The second platform, called EarSketch (https://earsketch.gatech.edu), was created by researchers at Georgia Tech in Atlanta. EarSketch uses Python code to arrange samples and loops into full-length compositions. Both platforms are browser-based apps, so all you need to get started is a computer (tablets or Chromebooks are fine), an internet connection, and a web browser like Chrome or Firefox. External speakers or headphones are also nice but not required. Both platforms have been around for years and have been used by many thousands of students from middle school all the way up to college and beyond. TunePad and EarSketch are designed primarily as learning platforms, but there are easy ways to export your work to professional production software if you want to go further.

1.5 A quick example

Here’s a quick example of what coding in Python looks like. This program runs in TunePad to create a simple beat pattern, variants of which have been used in literally thousands of songs such as Blinding Lights by The Weeknd and Roses by SAINt JHN.
1 playNote(1) # play a kick drum sound
2 playNote(2) # play a snare drum sound
3 playNote(1)
4 playNote(2)
5 rewind(4) # rewind 4 beats
6 for i in range(4):
7 rest(0.5)
8 playNote(4, beats = 0.5) # play hat for a half beat
These eight lines of Python code tell TunePad to play a pattern of kick drums, snare drums, and high-hats. Most of the lines are playNote instructions, and, as you might have guessed, those instructions tell TunePad to play musical sounds indicated by the numbers inside of the parentheses. This example also includes something called a loop on line 6. Don’t worry too much about the ...

Inhaltsverzeichnis

Zitierstile fĂŒr Introduction to Digital Music with Python Programming

APA 6 Citation

Horn, M., West, M., & Roberts, C. (2022). Introduction to Digital Music with Python Programming (1st ed.). Taylor and Francis. Retrieved from https://www.perlego.com/book/3189103/introduction-to-digital-music-with-python-programming-learning-music-with-code-pdf (Original work published 2022)

Chicago Citation

Horn, Michael, Melanie West, and Cameron Roberts. (2022) 2022. Introduction to Digital Music with Python Programming. 1st ed. Taylor and Francis. https://www.perlego.com/book/3189103/introduction-to-digital-music-with-python-programming-learning-music-with-code-pdf.

Harvard Citation

Horn, M., West, M. and Roberts, C. (2022) Introduction to Digital Music with Python Programming. 1st edn. Taylor and Francis. Available at: https://www.perlego.com/book/3189103/introduction-to-digital-music-with-python-programming-learning-music-with-code-pdf (Accessed: 15 October 2022).

MLA 7 Citation

Horn, Michael, Melanie West, and Cameron Roberts. Introduction to Digital Music with Python Programming. 1st ed. Taylor and Francis, 2022. Web. 15 Oct. 2022.