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 pagine
  2. English
  3. ePUB (disponibile sull'app)
  4. Disponibile su iOS e Android
eBook - ePub

Introduction to Digital Music with Python Programming

Learning Music with Code

Michael S. Horn, Melanie West, Cameron Roberts

Dettagli del libro
Anteprima del libro
Indice dei contenuti
Citazioni

Informazioni sul libro

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.

Domande frequenti

Come faccio ad annullare l'abbonamento?
È semplicissimo: basta accedere alla sezione Account nelle Impostazioni e cliccare su "Annulla abbonamento". Dopo la cancellazione, l'abbonamento rimarrà attivo per il periodo rimanente già pagato. Per maggiori informazioni, clicca qui
È possibile scaricare libri? Se sì, come?
Al momento è possibile scaricare tramite l'app tutti i nostri libri ePub mobile-friendly. Anche la maggior parte dei nostri PDF è scaricabile e stiamo lavorando per rendere disponibile quanto prima il download di tutti gli altri file. Per maggiori informazioni, clicca qui
Che differenza c'è tra i piani?
Entrambi i piani ti danno accesso illimitato alla libreria e a tutte le funzionalità di Perlego. Le uniche differenze sono il prezzo e il periodo di abbonamento: con il piano annuale risparmierai circa il 30% rispetto a 12 rate con quello mensile.
Cos'è Perlego?
Perlego è un servizio di abbonamento a testi accademici, che ti permette di accedere a un'intera libreria online a un prezzo inferiore rispetto a quello che pagheresti per acquistare un singolo libro al mese. Con oltre 1 milione di testi suddivisi in più di 1.000 categorie, troverai sicuramente ciò che fa per te! Per maggiori informazioni, clicca qui.
Perlego supporta la sintesi vocale?
Cerca l'icona Sintesi vocale nel prossimo libro che leggerai per verificare se è possibile riprodurre l'audio. Questo strumento permette di leggere il testo a voce alta, evidenziandolo man mano che la lettura procede. Puoi aumentare o diminuire la velocità della sintesi vocale, oppure sospendere la riproduzione. Per maggiori informazioni, clicca qui.
Introduction to Digital Music with Python Programming è disponibile online in formato PDF/ePub?
Sì, puoi accedere a Introduction to Digital Music with Python Programming di Michael S. Horn, Melanie West, Cameron Roberts in formato PDF e/o ePub, così come ad altri libri molto apprezzati nelle sezioni relative a Technology & Engineering e Acoustical Engineering. Scopri oltre 1 milione di libri disponibili nel nostro catalogo.

Informazioni

Anno
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 ...

Indice dei contenuti

Stili delle citazioni per 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.