ebook img

Introduction to Digital Music with Python Programming: Learning Music with Code PDF

279 Pages·2022·11.11 MB·English
Save to my drive
Quick download
Download
Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.

Preview Introduction to Digital Music with Python Programming: Learning Music with Code

Introduction to Digital Music with Python Programming 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 fun- damentals of rhythm, chord structure, and melodic composition along- side 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. Michael S. Horn is Associate Professor of Computer Science and Learn- ing Sciences at Northwestern University in Evanston, Illinois, where he directs the Tangible Interaction Design and Learning (TIDAL) Lab. Melanie West is a PhD student in Learning Sciences at Northwestern University and co-founder of Tiz Media Foundation, a nonproft dedi- cated to empowering underrepresented youth through science, technol- ogy, engineering, and mathematics (STEM) programs. Cameron Roberts is a software developer and musician living in Chicago. He holds degrees from Northwestern University in Music P erformance and Computer Science. Introduction to Digital Music with Python Programming Learning Music with Code Michael S. Horn, Melanie West, and Cameron Roberts First published 2022 by Routledge 4 Park Square, Milton Park, Abingdon, Oxon OX14 4RN and by Routledge 605 Third Avenue, New York, NY 10158 Routledge is an imprint of the Taylor & Francis Group, an informa business © 2022 Michael S. Horn, Melanie West, and Cameron Roberts The right of Michael S. Horn, Melanie West, and Cameron Roberts to be identifed as author of this work has been asserted in accordance with sections 77 and 78 of the Copyright, Designs and Patents Act 1988. All rights reserved. No part of this book may be reprinted or reproduced or utilised in any form or by any electronic, mechanical, or other means, now known or hereafter invented, including photocopying and recording, or in any information storage or retrieval system, without permission in writing from the publishers. Trademark notice: Product or corporate names may be trademarks or registered trademarks, and are used only for identifcation and explanation without intent to infringe. British Library Cataloguing-in-Publication Data A catalogue record for this book is available from the British Library Library of Congress Cataloging-in-Publication Data A catalog record has been requested for this book ISBN: 978-0-367-47083-8 (hbk) ISBN: 978-0-367-47082-1 (pbk) ISBN: 978-1-003-03324-0 (ebk) DOI: 10.4324/9781003033240 Typeset in Bembo by codeMantra Melanie dedicates her contribution of the book to the memory of her friend, Bernie Worrell, who taught her how to listen. Mike dedicates his contribution to his wife, Diana Reed, and his children, Madeleine and Lucas. Contents List of fgures ix Photo and illustration credits xiii Foreword xiv Acknowledgments xvi 1 Why music and coding? 1 Interlude 1: Basic pop beat 12 2 Rhythm and tempo 18 Interlude 2: Custom trap beat 49 3 Pitch, harmony, and dissonance 53 Interlude 3: Melodies and lists 68 4 Chords 71 Interlude 4: Playing chords 84 5 Scales, keys, and melody 88 Interlude 5: Lean on me 100 6 Diatonic chords and chord progressions 103 Interlude 6: Random chord progressions 114 7 Frequency, fourier, and flters 117 Interlude 7: Creative efects 136 8 Note-based production efects 140 Interlude 8: How to make a drum fll 153 9 Song composition and EarSketch 158 viii Contents Interlude 9: How to make a snare drum riser 172 10 Modular synthesis 177 Interlude 10: Drum machine function 191 11 History of music and computing 194 Appendix A: Python reference 207 Appendix B: TunePad programming reference 231 Appendix C: Music reference 240 Index 255 Figures 1.1 A TunePad program to play a simple rock beat 5 1.2 Typical DAW software 6 1.3 TunePad project workspace 13 1.4 Selecting instruments in TunePad 13 1.5 Parts of a TunePad cell 14 1.6 Python syntax error in TunePad 15 1.7 Selecting an instrument’s voice in TunePad 16 2.1 TunePad project information bar. You can click on the tempo, time signature, or key to change the settings for your project 19 2.2 Standard notation example 20 2.3 Waveform representation of Figure 2.2 21 2.4 Piano or MIDI roll representation of Figure 2.2 21 2.5 Common note symbols starting with a whole note (four beats) on the top down to 16th notes on the bottom. The notes on each new row are half the length of the row above 23 2.6 Drums in a typical drum kit 26 2.7 Roland 808 drum sequencer 28 2.8 Changing an instrument’s voice in TunePad 28 2.9 Example of a Python syntax error in TunePad. This line of code was missing a parenthesis symbol 29 2.10 Calling the playNote function in TunePad with two parameters inside the parentheses 30 2.11 How to show the print output of your code in a TunePad cell 35 2.12 Anatomy of a for loop in Python 36 2.13 Example of a Python syntax error. The command ‘ployNote’ should instead say ‘playNote’ 39 2.14 Example of a Python syntax error. Here the problem is actually on line 1, not line 2 39 2.15 TunePad composer interface provides drum and bass sequencers 47

See more

The list of books you might like

Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.