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 pages
  2. English
  3. ePUB (adapté aux mobiles)
  4. Disponible sur iOS et Android
eBook - ePub

Introduction to Digital Music with Python Programming

Learning Music with Code

Michael S. Horn, Melanie West, Cameron Roberts

DĂ©tails du livre
Aperçu du livre
Table des matiĂšres
Citations

À propos de ce livre

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.

Foire aux questions

Comment puis-je résilier mon abonnement ?
Il vous suffit de vous rendre dans la section compte dans paramĂštres et de cliquer sur « RĂ©silier l’abonnement ». C’est aussi simple que cela ! Une fois que vous aurez rĂ©siliĂ© votre abonnement, il restera actif pour le reste de la pĂ©riode pour laquelle vous avez payĂ©. DĂ©couvrez-en plus ici.
Puis-je / comment puis-je télécharger des livres ?
Pour le moment, tous nos livres en format ePub adaptĂ©s aux mobiles peuvent ĂȘtre tĂ©lĂ©chargĂ©s via l’application. La plupart de nos PDF sont Ă©galement disponibles en tĂ©lĂ©chargement et les autres seront tĂ©lĂ©chargeables trĂšs prochainement. DĂ©couvrez-en plus ici.
Quelle est la différence entre les formules tarifaires ?
Les deux abonnements vous donnent un accĂšs complet Ă  la bibliothĂšque et Ă  toutes les fonctionnalitĂ©s de Perlego. Les seules diffĂ©rences sont les tarifs ainsi que la pĂ©riode d’abonnement : avec l’abonnement annuel, vous Ă©conomiserez environ 30 % par rapport Ă  12 mois d’abonnement mensuel.
Qu’est-ce que Perlego ?
Nous sommes un service d’abonnement Ă  des ouvrages universitaires en ligne, oĂč vous pouvez accĂ©der Ă  toute une bibliothĂšque pour un prix infĂ©rieur Ă  celui d’un seul livre par mois. Avec plus d’un million de livres sur plus de 1 000 sujets, nous avons ce qu’il vous faut ! DĂ©couvrez-en plus ici.
Prenez-vous en charge la synthÚse vocale ?
Recherchez le symbole Écouter sur votre prochain livre pour voir si vous pouvez l’écouter. L’outil Écouter lit le texte Ă  haute voix pour vous, en surlignant le passage qui est en cours de lecture. Vous pouvez le mettre sur pause, l’accĂ©lĂ©rer ou le ralentir. DĂ©couvrez-en plus ici.
Est-ce que Introduction to Digital Music with Python Programming est un PDF/ePUB en ligne ?
Oui, vous pouvez accĂ©der Ă  Introduction to Digital Music with Python Programming par Michael S. Horn, Melanie West, Cameron Roberts en format PDF et/ou ePUB ainsi qu’à d’autres livres populaires dans Technology & Engineering et Acoustical Engineering. Nous disposons de plus d’un million d’ouvrages Ă  dĂ©couvrir dans notre catalogue.

Informations

Éditeur
Focal Press
Année
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 ...

Table des matiĂšres

Normes de citation pour 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.