0% found this document useful (0 votes)
8 views

Introduction to Digital Music with Python Programming: Learning Music with Code 1st Edition Horn instant download

Introduction to Digital Music with Python Programming is a beginner-friendly guide that combines music and coding, teaching readers how to create music through programming. The book covers essential concepts of rhythm, melody, and digital production, using real-world examples to facilitate learning. It is designed for individuals with no prior experience in music or coding, making it accessible to high school students, undergraduates, and aspiring professionals.

Uploaded by

bohamesoof
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views

Introduction to Digital Music with Python Programming: Learning Music with Code 1st Edition Horn instant download

Introduction to Digital Music with Python Programming is a beginner-friendly guide that combines music and coding, teaching readers how to create music through programming. The book covers essential concepts of rhythm, melody, and digital production, using real-world examples to facilitate learning. It is designed for individuals with no prior experience in music or coding, making it accessible to high school students, undergraduates, and aspiring professionals.

Uploaded by

bohamesoof
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 79

Introduction to Digital Music with Python

Programming: Learning Music with Code 1st


Edition Horn install download

https://ebookmeta.com/product/introduction-to-digital-music-with-
python-programming-learning-music-with-code-1st-edition-horn/

Download more ebook from https://ebookmeta.com


We believe these products will be a great fit for you. Click
the link to download now, or visit ebookmeta.com
to discover even more!

Introduction to Digital Music with Python Programming:


Learning Music with Code 1st Edition Michael Horn

https://ebookmeta.com/product/introduction-to-digital-music-with-
python-programming-learning-music-with-code-1st-edition-michael-
horn/

An Introduction to Statistical Learning: with


Applications in Python Gareth James

https://ebookmeta.com/product/an-introduction-to-statistical-
learning-with-applications-in-python-gareth-james/

An Introduction to Programming and Computer Science


with Python First Edition Clayton Cafiero

https://ebookmeta.com/product/an-introduction-to-programming-and-
computer-science-with-python-first-edition-clayton-cafiero/

Testing New Opinions and Courting New Impressions New


Perspectives on Walter Pater 1st Edition Anne Florence
Gillard Estrada Editor Martine Lambert Charbonnier
Editor Charlotte Ribeyrol Editor
https://ebookmeta.com/product/testing-new-opinions-and-courting-
new-impressions-new-perspectives-on-walter-pater-1st-edition-
anne-florence-gillard-estrada-editor-martine-lambert-charbonnier-
Seduced by Days 1st Edition Milly Taiden

https://ebookmeta.com/product/seduced-by-days-1st-edition-milly-
taiden/

Writing by Choice 3rd Edition Eric Henderson

https://ebookmeta.com/product/writing-by-choice-3rd-edition-eric-
henderson/

Further Advances in Internet of Things in Biomedical


and Cyber Physical Systems 193 Intelligent Systems
Reference Library 193 Valentina E. Balas (Editor)

https://ebookmeta.com/product/further-advances-in-internet-of-
things-in-biomedical-and-cyber-physical-systems-193-intelligent-
systems-reference-library-193-valentina-e-balas-editor/

McGraw-Hill Education CCRN Review 1st Edition Michael


Reid

https://ebookmeta.com/product/mcgraw-hill-education-ccrn-
review-1st-edition-michael-reid/

DNS Security For Dummies®, Infoblox Special Edition


Joshua M. Kuo & Robert Nagy & Cricket Liu

https://ebookmeta.com/product/dns-security-for-dummies-infoblox-
special-edition-joshua-m-kuo-robert-nagy-cricket-liu/
Natural Resources S. V. Ciriacy-Wantrup (Editor)

https://ebookmeta.com/product/natural-resources-s-v-ciriacy-
wantrup-editor/
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 Performance
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
x Figures
2.16 Basic drum pattern 50
2.17 Declaring a for loop for hi-hat runs in Python 51
2.18 Hi-hat stutter patterns 51
3.1 Sound is made up of compression waves of air molecules
that expand outward at a speed of around 343 meters
per second. The frequency of a sound wave refers to
how fast it vibrates; amplitude refers to the intensity of
the sound; and wavelength refers to the length of one
complete cycle of the waveform 54
3.2 Drawing of the cochlea (inner ear) 54
3.3 A waveform with varying amplitude 56
3.4 A half step is the distance between two adjacent piano
keys, measured in semitones 58
3.5 The harmonic series 60
3.6 Two waves at an interval of an octave 63
3.7 The ratio between the note C 262 Hz and the note
G 393 Hz is considered a perfect ffth 65
3.8 Select the 808 Bass voice 70
4.1 C major chord with MIDI note numbers 72
4.2 Creating chords as lists of numbers in Python. Each
major chord follows the same pattern 73
4.3 How to declare a user-defned function in
Python 74
4.4 C major chord 77
4.5 D minor chord 77
4.6 B diminished chord 78
4.7 C major 7th chord 79
4.8 D minor 7th chord 79
4.9 G dominant 7th chord 80
4.10 Csus2 chord 81
4.11 Csus4 chord 81
4.12 C augmented chord 82
5.1 Whole step and half step intervals of the C major scale 89
5.2 C Major Pentatonic Scale (top) and F♯ Major Pentatonic
Scale (bottom) 91
5.3 A representation of a list with values and indices 94
5.4 The Circle of Fifths arranges musical keys 96
6.1 The seven diatonic chords of C major 104
6.2 The dominant V and viio chords share two notes in
common. This is easy to see when you line piano
diagrams up vertically 107
6.3 Flowcharts for generating chord progressions in major
and minor keys 108
6.4 Example of using the fowchart to generate a chord
progression 108
Figures xi
6.5 C major chord in root position (top), frst inversion
(bottom left), and second inversion (bottom right) 109
6.6 Chord progression I-V-vi-IV without voice leading (top)
and with voice leading (bottom). Chords V, vi, and IV
are inverted to reduce the pitch range and to minimize
the movement of individual voices “singing” the notes
of the chords 110
7.1 Sound energy generated by a fute playing a single
note. The sound contains a series of spikes at regular
“harmonic” frequency intervals 118
7.2 Frequency combinations: fundamentals, partials,
harmonic, and inharmonic 119
7.3 A square wave (or any other audio signal) can be described
as a series of sine waves making up the partial frequencies 121
7.4 ADSR envelope 122
7.5 A spectrogram shows the intensity of frequencies in an
audio signal over time. The heatmap colors correspond
to intensity or energy at diferent frequencies. Time
is represented on the horizontal axis and frequency in
kilohertz on the vertical axis 123
7.6 Mixing console with magnetic tape 124
7.7 The mixing interface in TunePad allows you to adjust
gain, pan, and frequency response for each track
in a mix 126
7.8 Lowpass flter response curve 129
7.9 Highpass flter response curve 130
7.10 Bandpass flter response curve 131
7.11 Notch flter response curve 132
7.12 Peaking flter response curve 132
7.13 Low shelf and high shelf response curves 133
7.14 Graph of two methods for fading audio in 137
8.1 Intermediate pitches between C and C 141
8.2 Code cell in TunePad showing import statement 154
8.3 Drum fll pattern A 154
8.4 Drum fll pattern B 155
9.1 Songs are composed of nested and repeating notes,
phrases, and sections 159
9.2 The main EarSketch interface features a large library
of samples (left), an interactive timeline (middle top), a
code editor (center), and extensive documentation and
curriculum (right) 162
9.3 Close-up screenshot of EarSketch’s DAW 164
9.4 Using the ftMedia function in EarSketch 165
9.5 Snare drum riser pattern 172
9.6 Alternative snare drum riser pattern 173
xii Figures
10.1 Moog System 55 modular synthesizer 178
10.2 Audio signal from a microphone (top) and an audio
signal from an electric circuit 179
10.3 A simple Modular Synthesis patch created in TunePad 179
10.4 A patch with a delay efect 182
10.5 Two variations of an Additive Synthesis patch 184
10.6 A simple Subtractive Synthesis patch 185
10.7 An FM Synthesis patch where one sine wave is fed into
the frequency input socket of another sine wave 185
10.8 A more complex FM Synthesis patch 186
10.9 An example of physical modeling to create complex
string-like sounds 187
10.10 Complete Basic Poly/Lead patch in TunePad 188
10.11 Complete FM Synthesis example 189
11.1 The IBM 7094 computer at NASA. Public domain.
Available at Wikipedia 197
11.2 The Yamaha DX-7 200
11.3 Opcode’s Vision software for Macintosh in 1989 202
11.4 Screenshot of Teropa’s Music Mouse emulator 204
11.5 Jazz trombonist and scholar George Lewis working
on the IRCAM project. Image Credit: Michel Waisvisz
archives, ca. 1985 (used with permission) 205
A3.1 Parts of an audio wave 241
A3.2 ADSR envelope 242
A3.3 Natural notes on a keyboard 246
A3.4 Natural notes for a Treble Clef (top) and natural notes
for a Bass Clef (bottom) 247
A3.5 Circle of Fifths 250
Photo and illustration credits

George Folz (georgefolz.com) created original illustrations for


this book featured in Interludes 2, 4, and 8.
The photograph at the beginning of Chapter 3 is by
(unsplash.com/@jonathanvez)
The photograph at the beginning of Chapter 4 is by
(unsplash.com/@markus_gjengaar)
The photograph at the beginning of Chapter 5 is by
(unsplash.com/@jasmund)
The photograph at the beginning of Chapter 6 is by
(unsplash.com/@efrenbarahona3)
The photograph at the beginning of Chapter 7 is by
(unsplash.com/@pablodelafuente)
The photograph at the beginning of Chapter 8 is by
(unsplash.com/@makuph)
The photograph at the beginning of Chapter 10 is by
(unsplash.com/@didierjoomun)
The photograph at the beginning of Interlude 9 is by
(unsplash.com/@halacious)
The photograph at the beginning of Chapter 11 is by deepsonic
(fickr.com/people/73143485@N02). Creative
Commons License creativecommons.org/licenses/by/2.0.
Foreword

When I was a kid growing up in Texas, I “learned” how to play viola. I


put learned in quotes because it was really just a process of rote memori-
zation—hours and hours of playing the same songs over and over again.
I learned how to read sheet music, but only to the extent that I knew the
note names and could translate them into the grossest of physical move-
ments. I never learned to read music as literature, to understand its deeper
meaning, structure, or historical context. I never understood anything
about music theory beyond being annoyed that I had to pay attention to
accidentals in diferent keys. I never composed anything, not even infor-
mally scratching out a tune. I never developed habits of deep listening,
of taking songs apart in my head and puzzling over how they were put
together in the frst place. I never played just for fun. And, despite the best
intentions of my parents and teachers, I never fell in love with music.
Learning how to code was the complete opposite experience for me. I
was largely self-taught. The courses I took in school were electives that I
chose for myself. Teachers gave me important scafolding at just the right
times, but it never felt forced. I spent hours working on games or other
projects (probably when I should have been practicing viola). I drew art-
work, planned out algorithms, and even synthesized my own rudimentary
sound efects. I had no idea what I was doing, but that was liberating. No
one was around to point out my mistakes or to show me how to do things
the “right” way (at least, not until college). I learned how to fgure things
out for myself, and the skills I picked up from those experiences are still
relevant today. I fell in love with coding.1
But I know many people whose stories are fipped 180 degrees. For
them, music was so personally, socially, and culturally motivating that
they couldn’t get enough. They’d practice for hours and hours, not just for
fun but for something much deeper. For some it was an instrument like
the guitar that got them started. For others it was an app like GarageBand
that gave them a playful entry point into musical ideas. To the extent that
they had coding experiences, those experiences ranged from uninspiring
to of-putting. It’s not that they necessarily hated coding, but it was some-
thing they saw as not being for them.
Foreword xv
In the foreword of his book, Mindstorms: Children, Computers, and Pow-
erful Ideas, Seymour Papert wrote that he “fell in love with gears” as a way
of helping us imagine a future in which children (like me) would fall in
love with computer programming, not for its own sake, but for the cre-
ative worlds and powerful ideas that programming could open up. Part of
what he was saying was that love and learning go hand in hand, and that
computers could be an entry point into many creative and artistic domains
such as mathematics and music. Coding can revitalize subjects that have
become painfully rote in schools.
The process of developing TunePad over the past several years has been
a fascinating rediscovery of musical ideas for me. Code has given me a dif-
ferent kind of language for thinking about things like rhythm, chords, and
harmony. I can experiment with composition unencumbered by my mal-
adroit hands. Music has become something creative and alive in a way that
it never was for me before. Music theory is no longer a thicket of confusing
terminology and instead has become a fascinating world of mathematical
beauty that structures the creative process.
Melanie, Cameron, and I hope that this book gives you a similarly joy-
ful learning experience with music and code. We hope that you feel em-
powered to explore the algorithmic and mathematical beauty of music.
We hope that you discover, as we have, that music and code reinforce one
another in surprising and powerful ways that open new creative opportu-
nities for you. We hope that, regardless of your starting point—as a coder,
as a musician, as neither, as both—you will discover something new about
yourself and what you can become.

Michael Horn
Chicago, Illinois ( July 2021)

Note
1 I was also fortunate to have grown up in a time and place where these ac-
tivities were seen as socially acceptable for a person of my background and
identity.
Acknowledgments

We are grateful to the many people who have helped make this book possi-
ble. We especially want to thank Dr. Amartya Banerjee who has anchored
the TunePad development team. The TunePad project grew out of a col-
laboration with the EarSketch team at Georgia Tech that was initiated by
Dr. Brian Magerko and Dr. Jason Freeman. We thank Dr. Nichole Pinkard,
Dr. Amy Pratt, and the Northwestern Ofce of Community Education
Partnerships. We thank the TIDAL Lab team at Northwestern University
including Mmachi Obiorah, Wade Berger, Izaiah Wallace, Brian Andrus,
Jamie Gorrson, Matthew Brucker, Lexie Zhao, Ayse Hunt, Kallayah
Henderson, Cortez Watson Jr., Sachin Srivastava, and many, many oth-
ers. We thank our community partners including the Evanston Public
Library, the NAACP of DuPage County, the James R. Jordan Foun-
dation, the Meta Media program at the McGaw YMCA, the Hip-Hop
FIRM, EvanSTEM, the Center for Creative Entrepreneurship, Studio
2112, the James R. Jordan Boys and Girls Club, Lake View High School
and Marshaun Brooks, Lane Tech High School and Amy Wozniak, Gary
Comer Youth Centers, and Chicago Youth Centers, Project Exploration,
BBF Family Services, and the Museum of Science and Industry. Shout-
outs to Marcus Prince and Sam Carroll who gave us insightful curriculum
ideas, to Tom Knapp who contributed to TunePad’s graphical design, and
to the amazing interns we’ve worried with over the years.
Special thanks go to the people who gave input into the ideas and text
of this manuscript including George Papajohn and Diana Reed. We also
thank Joseph Mahanes, Abbie Reeves, and others who put up with us
while we worked on this book.
TunePad was created by the Tangible Interaction Design and Learn-
ing (TIDAL) Lab at Northwestern University in collaboration with the
EarSketch team at the Georgia Institute of Technology and with fund-
ing from the National Science Foundation (grants DRL-1612619, DRL-
1451762, and DRL-1837661) and the Verizon Foundation. Any opinions,
fndings, and/or recommendations expressed in the material are those of
the authors and do not necessarily refect the views of the funders.
1 Why music and coding?

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 con-
text 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 com-
plex 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 efects. Beyond production tools, live
coding is an emerging form of musical performance art in which Infor-
mation 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
DOI: 10.4324/9781003033240-1
2 Why music and coding?
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, tech-
nologies 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 frst
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, mak-
ing it a good choice for professionals working in felds 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 avail-
able for beginners who want to go deeper. What we’re ofering is a dif-
ferent approach that combines learning music with learning code in equal
measure.
Why music and coding? 3
1.3 What this book is
What we will do is give you an intuitive understanding of the fundamen-
tal 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 confdence 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 program-
ming 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 frst, 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) inter-
face. 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 com-
positions. Both platforms are browser-based apps, so all you need to
get started is a computer (tablets or Chromebooks are fne), an inter-
net 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.
4 Why music and coding?

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 in-
structions, 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 details yet, but the loop is an easy way to repeat a set
of actions over and over again. In this case, the loop tells Python to repeat
lines 7 and 8 four times in a row. The screenshot (Figure 1.1) shows what
this looks like in TunePad. You can try out the example for yourself with
this link: https://tunepad.com/examples/roses.

1.6 Five reasons to learn code


Now that you’ve seen a brief example of what you can do with a few lines
of Python code, here are our top fve reasons to get started with program-
ming and music if you’re still in doubt.

1.6.1 REASON 1: Like it or note, music is already defned by code


Looking across the modern musical landscape, it’s clear that music is al-
ready defned by code. One of the biggest common factors of almost all
modern music from any popular genre is that everything is edited, if not
created entirely, with sophisticated computer software. It’s hard to over-
state how profoundly such software has shaped the sound of music in the
21st century. Relatively inexpensive DAW applications and the myriad
ubiquitous plugins that work across platforms have had a disruptive and
democratizing efect across the music industry. Think about efects plugins
like autotune, reverb, or the ability to change the pitch of a sample with-
out changing the tempo. These efects are all generated with sophisticated
software. Production studios the size of small ofces containing hundreds
of thousands of dollars’ worth of equipment now ft on the screen of a
laptop computer available to any aspiring producer with passion, a WiFi
Why music and coding? 5

Figure 1.1 A TunePad program to play a simple rock beat.

connection, and a small budget. The reasons behind the shift to digital
production tools are obvious. Computers have gotten to a point where
they are cheap enough, fast enough, and capacious enough to do real-time
audio editing. We can convert sound waves into editable digital informa-
tion with microsecond precision and then hear the efects of our changes
in real time. These DAWs didn’t just appear out of nowhere. They were
constructed by huge teams of software engineers writing code—millions
of lines of it. As an example, TunePad was created with over 1.5 million
lines of code written in over a dozen computer languages such as Python,
HTML, JavaScript, CSS, and Dart. Regardless of how you feel about the
digital nature of modern music, it’s not going away. Learning to code will
6 Why music and coding?

Figure 1.2 Typical DAW software.

help you understand a little more about how all of this works under the
hood. More to the point, it’s increasingly common for producers to write
their own code to manipulate sound. For example, in Logic, you can write
JavaScript code to process incoming MIDI (Musical Instrument Digital
Interface) data to do things like create custom arpeggiators. Learning to
code can give you more control and help expand your creative potential
(Figure 1.2).

1.6.2 REASON 2: Code is a powerful way to make music


We don’t always think about it this way, but music is algorithmic in
nature—it’s full of mathematical relationships, logical structure, and
recursive patterns. The beauty of the Baroque fugue is in part a re-
fection of the beauty of the mathematical and computational ideas
behind the music. We call Bach a genius not just because his music is
so compelling, but also because he was able to hold complex algorithms
in his mind and then transcribe them to paper using the representation
system that we call Western music notation. In other words, music
notation is a language for recording the output of the composition
process, but not a language for capturing the algorithmic nature of the
composition process itself.
Code, on the other hand, is a language specifcally designed to capture
mathematical relationships, logical structure, and recursive patterns. For
example, take the stuttered hi-hat patterns that are one of the defning
characteristics of trap music. Here are a few lines of Python code that gen-
erate randomized hi-hat stutters that can bring an otherwise conventional
beat to life with sparkling energy.
Why music and coding? 7

1 for _ in range(16):
2 if randint(6) > 1: # roll the die for a random number
3 playNote(4, beats=0.5) # play an eighth note
4 else:
5 playNote(4, beats=0.25) # or play 16th notes
6 playNote(4, beats=0.25)

Or, as another example, here’s a two-line Python program that plays a


snare drum riser efect common in house, EDM, or pop music. You’ll of-
ten hear this technique right before the beat drops. This code uses a decay
function so that each successive note is a little shorter resulting in a gradual
acceleration efect. Don’t worry about how all of this works just yet. We’ll
walk you through the details as we go along.

1 for i in range(50): # play 50 snares


2 playNote(2, beats = pow(2, -0.09 * i))

What’s cool about these efects is that they’re parameterized. Because the
code describes the algorithms to generate music, and not the music itself, it
means we can create infnite variation by adjusting the numbers involved.
For example, in the trap hi-hat code, we can easily play around with how
frequently stuttered hats are inserted into the pattern by increasing or de-
creasing one number. You can think of code as something like a power drill;
you can swap out diferent bits to make holes of diferent sizes. The drill bits
are like parameters that change what the tool does in each specifc instance.
In the same way, algorithms are vastly more general-purpose tools that can
accomplish myriad tasks by changing the input parameters.
Creating a snare drum riser with code is obviously a very diferent kind
of thing than picking up two drumsticks and banging out a pattern on
a real drum. And, to be clear, we’re not advocating for code to replace
learning how to perform with live musical instruments. But, code can be
another tool in your musical repertoire for generating repetitive patterns,
exploring mathematical ideas, or playing sequences that are too fast or
intricate to play by hand.

1.6.3 REASON 3: Code lets you build your own musical toolkit
Becoming a professional in any feld is about developing expertise with
tools—acquiring equipment and knowing how to use it. Clearly, this
is true in the music industry, but it’s also true in software. Professional
software engineers acquire specialized equipment and software packages.
They develop expertise in a range of programming languages and techni-
cal frameworks. But, they also build their own specialized tools that they
use across projects. In this book, we’ll show you how to build up your own
8 Why music and coding?
library of Python functions. You can think of functions as specialized tools
that you create to perform diferent musical tasks. In addition to the exam-
ples we described above, you might write a function to generate a chord
progression or play an arpeggio, and you can use functions again and again
across many musical projects.

1.6.4 REASON 4: Code is useful for a thousand and one other things
As we mentioned earlier in this chapter, Python is one of the most power-
ful, multi-purpose languages in the world. It’s used to create web servers
and social media platforms as much as video games, animation, and music.
It’s used for research and data science, politics and journalism. Knowing a
little Python gives you access to powerful machine learning and artifcial
intelligence (AI/ML) techniques that are poised to transform most aspects
of human work, including in creative domains such as music. Python is
both a scripting language and a software engineering platform—equal
parts duct tape and table saw—and it’s capable of everything from quick
fxes to durable software applications. Learning a little Python won’t make
you a software engineer, just like learning a few guitar chords won’t make
you a performance musician. But it’s a start down a path. An open door
that was previously closed, and a new way of using your mind and a new
way of thinking about music.

1.6.5 REASON 5: Coding makes us more human


When we think about learning to code, we tend to think about the eco-
nomic payof. You’ll hear arguments that learning to code is a resume
builder and a path to a high-paying job. It’s not that this perspective is
wrong, but it might be the wrong reason for you to learn how to code.
Just like people who are good at music love music, people who are good
at coding tend to love coding. The craft of building software can be te-
dious and frustrating, but it can also be rewarding. It’s a way to express
oneself creatively and to engage in craftwork. People don’t learn to knit,
cook, or play an instrument for the lucrative career paths that these pur-
suits open up—although by all means those pursuits can lead to remark-
able careers. People learn these things because they have a passion for them.
Because they are personally fulflling. These passions connect us to cen-
turies of tradition; they connect us to communities of teachers, learners,
and practitioners; and, in the end, they make us more human. So when
things get a little frustrating—and things always get a little frustrating
when you’re learning any worthwhile skill—remember that just like po-
etry, literature, or music, code is an art as much as it is a science. And, just
like woodworking, knitting, or cooking, code is a craft as much as it is
an engineering discipline. Be patient and give yourself a chance to fall in
love with coding.
Why music and coding? 9
1.7 The future of music and code
Before we get on with the book, we wanted to leave you with a brief
thought about the future of technology, music, and code. For as long as
there have been people on this planet there has been music. And, as long
as there has been music, people have created technology to expand and en-
hance their creative potential. A drum is a kind of technology—a piece of
animal hide stretched across a hollow log and tied in place. It’s a polylithic
accomplishment, an assembly of parts that requires skill and craft to make.
One must know how to prepare animal hide, to make rope from plant
fber, and to craft and sharpen tools. More than that, one must know how
to perform with the drum, to connect with an audience, to enchant them
to move their bodies through an emotional and rhythmic connection to
the beat. Technology brings together materials and tools with knowledge.
People must have knowledge both to craft an artifact and to wield it. And,
over time—over generations—that knowledge is refned as it gets passed
down from teacher to student. It becomes stylized and diversifed. Tools,
artifacts, knowledge, and practice all become something greater. Some-
thing we call culture.
Again and again the world of music has been disrupted, democratized,
and redefned by new technologies. Hip-hop was a rebellion against the
musical status quo fueled by low-cost technologies like recordable cas-
sette tapes, turntables, and 808 drum machines. Early innovators shat-
tered norms of artistic expression, redefning music, poetry, visual art,
and dance in the process. Inexpensive access to technology coupled with
a need for new forms of authentic self-expression was a match to the dry
tinder of racial and economic oppression.
It’s hard to overstate how quickly the world is still changing as a re-
sult of technological advancements. Digital artifacts and infrastructures
are so ubiquitous that they have reconfgured social, economic, legal, and
political systems; revolutionized scientifc research; upended the arts and
culture; and even wormed their way into the most intimate aspects of our
personal and romantic lives. We’ve already talked about the transforma-
tive impact that digital tools have had on the world of music in the 21st
century, but the exhilarating (and scary) part is that we’re on the precipice
of another wave of transformation in which human creativity will be re-
defned by Artifcial Intelligence AI and Machine Learning ML. Imagine
AI accompanists that can improvise harmonies or melodies in real time
with human musicians. Or deep learning algorithms that can listen to
millions of songs and innovate music in the same genre. Or silicon poets
that grasp human language well enough to compose intricate rap lyrics.
Or machines with trillions of transistor synapses so complex that they be-
gin to “dream”—inverted machine learning algorithms that ooze imagery
unhinged enough to disturb the absinthe slumber of surrealist painters.
Now, imagine that this is not speculative science fction, but the reality of
10 Why music and coding?
our world today. These things are here now and already challenging what
we mean by human creativity. What are the implications of a society of
digital creative cyborgs?
But here’s the trick: we’ve always been cyborgs. Western music notation
is as much a technology as Python code. Becoming literate in any suf-
ciently advanced representation system profoundly shapes how we think
about and perceive the world around us. Classical music notation, theory,
and practice shaped the mind of Beethoven as much as he shaped music
with it—so much so that he was still able to compose many of his most
famous works while almost totally deaf. Beethoven was a creative cyborg
enhanced by the technology of Western music notation and theory. The
diference is that now we’ve externalized many of the cognitive processes
into machines that think alongside us. And, increasingly, these tools are
available to everyone. How that changes what it means to be a creative
human being is anyone’s guess.

1.8 Book overview


We’re excited to have you with us on this journey through music and
code. Here’s a short guide for where we go from here. Chapters 2 and 3
cover the foundations of rhythm, pitch, and harmony. These chapters are
designed to move quickly and get you coding in Python early on. We’ll
cover Python variables, loops, which both connect directly to musical
concepts. Chapters 4, 5, and 6 cover the foundations of chords, scales,
and keys using Python lists, functions, and data structures. Chapters 7, 8,
and 10 shift from music composition to music production covering topics
such as the frequency domain, modular synthesis, and other production
efects. In Chapter 9, we switch to the EarSketch platform to talk about
how various musical elements are combined to compose full-length songs.
Finally, Chapter 11 provides a short overview of the history of music and
code along with a glimpse of what the future might hold. Between each
chapter, we provide a series of short interludes that are like step-by-step
tutorials to introduce new music and coding concepts.
A few notes about how to read this book. Any time we include Python
code, it will be shown in a programming font like this:
playNote(60)

Sometimes we’ll write code in a table with line numbers so that we can re-
fer to specifc lines. When we introduce new terms, we’ll bold the word.
If you get confused by any of the programming or music terminology,
check out the appendices, which contain quick overviews of all of the
important concepts. We’ll often invite you to follow along with online
examples. The best way to learn is by doing it yourself, so we strongly
Why music and coding? 11
encourage you to try coding in Python online as you go through the
chapters.

Notes
1 It’s said that fans were so infatuated with Liszt’s piano “rockstar” status that
they fought over his silk handkerchiefs and velvet gloves at his performances.
2 We recommend https://www.w3schools.com/python/.
Interlude 1
BASIC POP BEAT

In this interlude we’re going to get familiar with the TunePad interface by
creating a basic rock beat in the style of songs like Roses by SAINt JHN.
You can follow along online by visiting
https://tunepad.com/interlude/pop-beat

STEP 1: Deep listening


It’s good to get in the habit of deep listening. Deep listening is the prac-
tice of trying every possible way of listening to sounds. Start by loading a
favorite song in a streaming service and listening—really listening—to it.
Take the song apart element by element. What sounds do you hear? How
are they layered together? When do diferent parts come into the track and
how do they change over time? Think about how the producer balances
sounds across the frequency spectrum or opens up space for transitions in
the lyrics. Try focusing on just the drums. Can you start to recognize the
individual percussion sounds and their rhythmic patterns?

STEP 2: Create a new TunePad project


Visit https://tunepad.com on a laptop or Chromebook and set up an account.1
If you already have a gmail address, you can use your existing account. Af-
ter signing in, click on the New Project button to create an empty project
workspace. Your project will look something like this (Figure 1.3):

DOI: 10.4324/9781003033240-2
Basic pop beat 13

Figure 1.3 TunePad project workspace.

STEP 3: Kick drums


In your project window, click on the ADD CELL button and then select
Drums (Figure 1.4).
In TunePad you can think of a “cell” as an instrument that you can
program to play music. Name the new instrument “Kicks” and then add
this Python code.

1 # play four kick drums


2 playNote(1)
3 playNote(1)
4 playNote(1)
5 playNote(1)

Figure 1.4 Selecting instruments in TunePad.


14 Basic pop beat

Figure 1.5 Parts of a TunePad cell.

When you’re done, your project should look something like Figure 1.5.
Go ahead and press the Play button at the top left to hear how this
sounds. Congratulations! You’ve just written a Python program.

Syntax errors
Occasionally your code won’t work right and you’ll get a red error mes-
sage box that looks something like Figure 1.6. This kind of error message
is called a “syntax” error. In this case, the code was written as playnote
with a lowercase “n” instead of an uppercase “N”. You can fx this error
by changing the code to read playNote (with an uppercase “N”) on line
2 (Figure 1.6).
Basic pop beat 15

Figure 1.6 Python syntax error in TunePad.

STEP 4: Snare drums


In your project window, click on the ADD CELL button again and select
Drums. Now you should have two drum cells one appearing above the
other in your project. Name the second instrument “Snare Drums” and
then add this Python code.

1 # play two snare drums on the up beats only


2 rest(1) # skip a beat
3 playNote(2) # play a snare drum sound
4 rest(1)
5 playNote(2)

You might start to notice the text that comes after the hashtag symbol (#)
is a special part of your program. This text is called a comment, and it’s for
human coders to help organize and document their code. Anything that
comes after the hashtag on a line is ignored by Python. Try playing this
snare drum cell to hear how it sounds. You can also play the kick drum
cell at the same time to see how they sound together.

STEP 5: Hi-hats
Click on the ADD CELL button again to add a third drum cell. Change
the title of this cell to be “Hats” and add the following code:

1 # play four hats between the kicks and snares


2 rest(0.5) # rest for half a beat
3 playNote(4, beats=0.5) # play a hat for half a beat
4 rest(0.5)
5 playNote(4, beats=0.5)
6 rest(0.5)
7 playNote(4, beats=0.5)
8 rest(0.5)
9 playNote(4, beats=0.5)
16 Basic pop beat
When you play all three of the drum cells together, you should hear a
basic rock beat pattern:

kick - hat - snare - hat - kick - hat - snare - hat

STEP 6: Fix your kicks


You might notice that the kick drums feel a little heavy in this mix. We
can make some space in the pattern by resting on the up beats (beats 2
and 4) when the snare drums are playing. Scroll back up to your Kick
drum cell and change the code to look like this:

1 # play kicks on the down beats only


2 playNote(1)
3 rest(1)
4 playNote(1)
5 rest(1)
6 playNote(1)
7 rest(1)
8 playNote(1)
9 rest(0.5) # rest a half beat
10 playNote(1, beats = 0.5) # half beat pickup kick

STEP 7: Adding a bass line


Add a new cell to your project, but this time select Bass instead of
Drums. Once the cell is loaded up, change the voice to Plucked Bass
(Figure 1.7):

Figure 1.7 Selecting an instrument’s voice in TunePad.


Basic pop beat 17
Entering this code to create a simplifed bass line in the style of Roses by
SAINt JHN. When you’re done, try playing everything together to get
the full sound.

1 playNote(5, beats=0.5) # start on low F


2 playNote(17, beats=0.5) # up an octave
3 rest(1)
4
5 playNote(10, beats=0.5) # A sharp
6 playNote(22, beats=0.5) # up an octave
7 rest(1)
8
9 playNote(8, beats=0.5) # G sharp
10 playNote(20, beats=0.5) # up an octave
11 rest(0.5)
12
13 playNote(8, beats=0.5) # G sharp - G - G
14 playNote(12, beats=0.5)
15 playNote(24, beats=0.5)
16
17 playNote(10, beats=0.75) # C sharp
19 playNote(22, beats=0.25) # D sharp

Note
1 We recommend using the free Google Chrome browser for the best overall
experience.
2 Rhythm and tempo

This chapter dives into the fundamentals of rhythm in music. We start


with the beat—what it is, how it’s measured, and how we can visualize the
beat to compose, edit, and play music. From there we’ll provide examples
of some common rhythmic motifs from diferent genres of music and
how to code them with Python. The main programming concepts for this
chapter include loops, variables, calling function, and passing parameter
values. This chapter covers a lot of ground, but it will give you a solid start
on making music with code.

2.1 Beat and tempo


The beat is the foundation of rhythm in music. The term beat has a num-
ber of diferent meanings in music,1 but this chapter uses it to mean a unit
of time, or how long an individual note is played—for example, “rest for
two beats” or “play a note for half a beat”. Based on the beat, musical
notes are combined in repeated patterns that move through time to make
rhythmic sense to our ears.
Tempo refers to the speed at which the rhythm moves, or how quickly
one beat follows another in a piece of music. As a listener, you can feel
the tempo by tapping your foot to the rhythmic pulse. The standard way
to measure tempo is in beats per minute (BPM or bpm), meaning the
total number of beats played in one minute’s time. This is almost always a
whole number like 60, 120, or 78. At a tempo of 60 bpm, your foot taps 60
times each minute (or one beat per second). At 120 bpm, you get 2 beats
DOI: 10.4324/9781003033240-3
Rhythm and tempo 19
every second; and, at 90 bpm, you get 1.5 beats every second. Later in this
chapter when you start working with TunePad, you can set the tempo by
clicking on the bpm indicator in the top bar of a project (see Figure 2.1).
Diferent genres of music have their own typical tempo ranges (al-
though every song and every artist is diferent). For example, hip-hop
usually falls in the 60–110 bpm range, while rock is faster in the 100–140
bpm range. House/techno/trance is faster still, with tempos between 120
and 140 bpm.

Genre Tempo Range (BPM)

Rock 100–140
R&B 60–80
Pop 100–132
Reggae 60–92
Hip-hop 60–110
Dubstep 130–144
Techno 120–140
Salsa 140–250
Bachata 120–140

It takes practice for musicians to perform at a steady tempo, and they


sometimes use a device called a metronome to help keep their playing
constant with the pulse of the music. You can create a simple metronome
in TunePad using four lines of code in a drum cell. This works best if you
switch the instrument to Drums → Percussion Sounds.
playNote(3, velocity = 100) # louder 1st note
playNote(3, velocity = 60)
playNote(3, velocity = 60)
playNote(3, velocity = 60)

You can adjust the tempo of your metronome with the bpm indicator
(Figure 2.1). As this example illustrates, computers excel at keeping a per-
fectly steady tempo. This is great if you want precision, but there’s also a
risk that the resulting music will sound too rigid and machine-like. When
real people play music they often speed up or slow down, either for dra-
matic efect or just as a result of being a human. Depending on the genre,
performers might add slight variations in rhythm called swing or shufe,

Figure 2.1 TunePad project information bar. You can click on the tempo, time
signature, or key to change the settings for your project.
20 Rhythm and tempo
that’s a kind of back and forth rocking of the beat that you can feel almost
more than you can hear. We’ll show you how to add a more human feel to
computer generated music later in the book.

2.2 Rhythmic notations


Over the centuries, musicians and composers have developed many dif-
ferent written systems to record and share music. With the invention of
digital production software, a number of other interactive representations
for mixing and editing have become common as well. Here are four com-
mon visual representations of the same rhythmic pattern. The pattern has
a total duration of four beats and can be counted as “1 and 2, 3 and 4”.
The frst two notes are ½ beats long followed by a note that is 1 beat long.
Then the pattern repeats.

2.2.1 Representation 1: Standard Western music notation


The frst representation (below) shows standard music notation (or Western
notation), a system of recording notes that has been developed over many
hundreds of years. The two thick vertical lines on the left side of the il-
lustration indicate that this is rhythmic notation, meaning that there is no
information about musical pitch, only rhythmic timing. The dots on the
long horizontal lines are notes whose shapes indicate the duration of each
sound to be played. Sometimes diferent percussion instruments will have
their notes drawn on diferent lines. We’ll describe what the various note
symbols mean in more detail in Figure 2.2.

Figure 2.2 Standard notation example.


Rhythm and tempo 21

Figure 2.3 Waveform representation of Figure 2.2.

2.2.2 Representation 2: Audio waveforms


The second representation shows a visualization of the actual audio wave-
form that gets sent to the speakers when you play music. The waveform
shows the amplitude (or volume) of the audio signal over time. The next
chapter talks more about audio waveforms, but for now you can think of
a waveform as a graph that shows the literal intensity of the vibration of
your speakers over time. When you compose a beat in TunePad, you can
switch to the waveform view by clicking on the small dropdown arrow at
the top-left side of the timeline (Figure 2.3).

2.2.3 Representation 3: Piano (MIDI) roll


The third representation shows a piano roll (or MIDI (Musical Instrument
Digital Interface) roll). This uses solid lines to show individual notes. The
length of the lines represents the length of individual notes, and the verti-
cal position of the lines represents the percussion sound being played (kick
drums and snare drums in this case). This representation is increasingly
common in music production software. Many tools even allow for drag
and drop interaction with the individual notes to compose and edit music
(Figure 2.4).

Figure 2.4 Piano or MIDI roll representation of Figure 2.2.


22 Rhythm and tempo
2.2.4 Representation 4: Python code
A fnal representation for now shows Python code in TunePad. In this
representation, the duration of each note is set using the beats parameter
of the playNote function calls.

playNote(2, beats = 0.5)


playNote(2, beats = 0.5)
playNote(6, beats = 1)

playNote(2, beats = 0.5)


playNote(2, beats = 0.5)
playNote(6, beats = 1)

Each of these representations has advantages and disadvantages; they are


good for conveying some kinds of information and less good at convey-
ing others. For example, standard rhythm notation has been refned over
centuries and is accessible to an enormous, worldwide community of mu-
sicians. On the other hand, it can be confusing for people who haven’t
learned how to read sheet music. The timing of individual notes is com-
municated using tails and fags attached to the notes, but there’s no consis-
tent mapping between horizontal space and timing.
The audio waveform is good at showing what the sound actually looks
like—how long each note rings out (“release”) and how sharp its onset is
(“attack”). It’s helpful for music production, mixing, and mastering. On
the other hand, waveforms don’t really tell you much about the pitch of a
note or its intended timing as recorded by the composer.
The Python code is easier for computers to read than humans—it’s
defnitely not something you would hand to a musician to sight read.
On the other hand, it has the advantage that it can be incorporated into
computer algorithms and manipulated and transformed in endless ways.
There are many, many other notation systems designed to transcribe
a musical performance—what we hear at a live performance—onto a
sheet of paper or a computer screen. Each of these representations was
invented for a specifc purpose and/or genre of music. You might pick a
representation based on the context and whether you’re in the role of a
musician (and what kind of instrument you play), a singer, a composer,
a sound engineer, or a producer. Music notation systems are as rich
and varied as the cultures and musical traditions that invented them.
One nice thing about working with software is that it’s easy to switch
between multiple representations of music depending on the task we’re
trying to accomplish.
Rhythm and tempo 23

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

2.3 Standard rhythmic notation


This section will review a standard musical notation system that has roots
in European musical traditions. This system is versatile and has been re-
fned and adapted over a long period of time across many countries and
continents to work with an increasingly diverse range of instruments and
musical genres. We’re starting with percussive rhythmic note values in
this chapter, and we’ll move on to working with pitched instruments in
Chapter 3.
Figure 2.5 shows the most common symbols used in rhythmic music
notation. Notes are represented with oval-shaped dots that are either open
or closed. All notes except for the whole note (top) have tails attached to
them that can point either up or down. It doesn’t matter which direction
(up or down) the tail points. Notes that are faster than a quarter note also
have horizontal fags or beams connected to the tails. Each additional fag
or beam indicates that the note is twice as fast.

Symbol Name Beats TunePad code


Whole Note 4 playNote(1, beats = 4)
Larger open circle with no tail
and no fag.
Half Note 2 playNote(1, beats = 2)
Open circle with a tail and no
fag.
Quarter Note 1 playNote(1, beats = 1)
Solid circle with a tail and no
fag.
24 Rhythm and tempo

Eighth Note 0.5 or ½ playNote(1, beats = 0.5)


Solid circle with a tail and one
fag or bar.
Sixteenth Note 0.25 or ¼ playNote(1, beats = 0.25)
Solid circle with a tail and two
fags or bars.
Dotted Half Note 3 playNote(1, beats = 3)
Open circle with a tail. The dot
adds an extra beat to the half
note.
Dotted Quarter Note 1.5 playNote(1, beats = 1.5)
Solid circle with a tail. The dot
adds an extra half-beat.
Dotted Eighth Note 0.75 playNote(1, beats = 0.75)
Solid circle with tail and one
fag. The dot adds an extra
quarter beat.

Standard notation also includes dotted notes, where a small dot follows the
note symbol. With a dotted note, you take the original note’s duration
and add half of its value to it. So, a dotted quarter note is 1.5 beats long, a
dotted half note is 3 beats long, and so on.
There are also symbols representing diferent durations of silence or
“rests”.

Symbol Name Beats TunePad code

Whole Rest 4 rest(beats = 4)

Half Rest 2 rest(beats = 2)

Quarter Rest 1 rest(beats = 1)

Eighth Rest 0.5 or ½ rest(beats = 0.5)


Sixteenth Rest 0.25 or ¼ rest(beats = 0.25)

2.4 Time signatures


In standard notation, notes are grouped into segments called measures (or
bars). Each measure contains a fxed number of beats, and the duration of
all the notes in a measure should add up to that amount. The relationship
between measures and beats is represented by a fraction called a time sig-
nature. The numerator (or top number) indicates the number of beats in the
measure, and the denominator (bottom number) indicates the beat duration.
Rhythm and tempo 25

Four-Four Time or “Common Time”


There are 4 beats in each measure, and each beat
is a quarter note. This time signature is sometimes
indicated using a special symbol:
Two-Two Time or “Cut Time”
There are 2 beats in each measure, and the beat
value is a half note. Cut time is sometimes indicated
with a ‘C’ with a line through it.
Two-Four Time
There are 2 beats in each measure, and the quarter
note gets the beat.

Three-Four Time
There are 3 beats in each measure, and the quarter
note gets the beat.

Three-Eight Time
There are 3 beats in each measure, and the eighth
note gets the beat.

The most common time signature is 4/4. It’s so common, in fact, that
it’s referred to as common time. It’s often denoted by a C symbol shown
in the table above. In common time, there are four beats to each measure,
and the quarter note “gets the beat” meaning that one beat is the same as
one quarter note.
Vertical lines separate the measures in standard notation. In the example
below, there are two measures in 4/4 time (four beats in each measure, and
each beat is a quarter note).

If you have a time signature of 3/4, then there are three beats per measure,
and each beat’s duration is a quarter note. Some examples of songs in 3/4
time are My Favorite Things from The Sound of Music, My 1st Song by Jay Z,
Manic Depression by Jimi Hendrix, and Kiss from a Rose by Seal.
26 Rhythm and tempo
If those notes were eighth notes, it would look like this:

Other common time signatures include 2/4 time (with two quarter note
beats per measure) and 2/2 time (with two half note beats in each measure).
With 2/2 there are actually four quarter notes in each measure because
one half note has the same duration as two quarter notes. For this reason,
2/2 time is performed similarly to common time, but is generally faster.
It is referred to as cut time and is denoted by a C symbol with a line
through it (see table above).
You can adjust the time signature of your TunePad project by clicking
on the time indicator in the top bar (see Figure 2.1).

2.5 Percussion sounds and instruments


Working with rhythm, you’ll come across lots of terminology for different
percussion instruments and sounds. Here’s a quick rundown on some of the
most common drum sounds that you’ll work with in digital music (Figure 2.6).

Figure 2.6 Drums in a typical drum kit.


Figure 2.6 was modified from an original drawing by Syed Wamiq Ahmed Hashmi (com-
mons.wikimedia.org/ wiki/User:Syed_Wamiq_Ahmed_Hashmi). Creative Commons
License creativecommons.org/licenses/by-sa/3.0.
Rhythm and tempo 27

Drum names Description TunePad


note number

Kick or bass The kick drum (or bass drum) makes a loud, low 0 and 1
drum thumping sound. Kicks are commonly placed on
beats 1 and 3 in rock, pop, house, and electronic
dance music. In other genres like hip-hop and funk,
kick drums are very prominent, but their placement
is more varied.
Snare Snare drums make a recognizable sharp staccato 2 and 3
sound that cuts across the frequency spectrum. They
are built with special wires called snares that give
the drum its unique snapping sound. Snare drums
are commonly used on beats 2 and 4.
Hi-hat The hi-hat is a combination of two cymbals 4 (closed)
sandwiched together on a metal rod. A foot pedal 5 (open)
opens or closes the cymbals together. In the closed
position the hi-hat makes a bright tapping sound. In
the open position the cymbal is allowed to ring out.
Hi-hats have become an integral part of rhythm
across almost all genres of popular music.
Low, mid, Tom drums (tom-toms) are cylindrical drums that 6, 7, 8
high tom have a less snappy sound than the snare drum. Drum
kits typically have multiple tom drums with slightly
different pitches (such as low, mid, and high).
Crash A large cymbal that makes a loud crash sound, often 9
cymbal used as a percussion accent.
Claps and Different TunePad drum kits include a range of 10 and 11
shakers other percussion sounds common in popular music
including various claps, shakers, and other sounds.

2.5.1 808 Drum kit


Released in the early 1980s, the Roland 808 drum machine was a hugely
influential sound in early hip-hop music (and other genres as well). The
808 used electronic synthesis techniques to create synthetic replicas of
drum sounds like kicks, snares, hats, toms, cowbells, and rim shots. Tin-
kerers would also open up the 808s and hack the circuits to create en-
tirely new sounds. Today 808s usually refers to low, booming bass lines
that were first generated using tweaked versions of the 808s’ kick drums.
TunePad’s default drum kit uses samples that sound like the original elec-
tronically synthesized 808s (Figure 2.7).

2.5.2 Selecting TunePad instruments


When you’re coding in TunePad, the sound that your code makes will
depend on the instrument you have selected. If you’re coding a rhythm,
28 Rhythm and tempo

Figure 2.7 Roland 808 drum sequencer.


The photograph shown in Figure 2.7 and at the beginning of Interlude 10 is by Brandon
Daniel (fickr.com/photos/54581307@N00). Creative Commons License creativecom-
mons.org/licenses/by-sa/2.0.

you can choose from several diferent drum kits including an 808 and rock
kits. You can change the instrument by clicking on the selector shown
below (Figure 2.8).

2.6 Coding rhythm in Python


Let’s start coding! Before beginning to code, there are a few quick things
that you should keep in mind.

Figure 2.8 Changing an instrument’s voice in TunePad.


Exploring the Variety of Random
Documents with Different Content
Dr. Gray’s friend of many years, George Engelmann, M. D., died in
February, 1884. He was a student at Heidelberg with Schimper and
Alexander Braun in 1827, and again in Paris, in 1832, with Agassiz and
Braun. He came to America in 1834, made some journeys on horseback in
the West, and settled as a physician in St. Louis, then a frontier trading-post,
in 1835. He lived to see it become a metropolis of over four hundred
thousand inhabitants. Dr. Gray says in his memoirs of him, “In the
consideration of Dr. Engelmann’s botanical work it should be remembered
that his life was that of an eminent and trusted physician; ... that he devoted
only the residual hours, which most men use for rest or recreation, to
scientific pursuits.... Nothing escaped his attention; he drew with facility;
and he methodically secured his observations by notes and sketches. The
lasting impression which he has made upon North American botany is due
to his habit of studying his subjects in their systematic relations, and
devoting himself to a particular genus of plants until he had elucidated it as
completely as lay within his power. In this way all his work was made to
tell effectively.... It shows how much may be done for science in a busy
physician’s horæ subsecivæ, and in his occasional vacations. Personally he
was one of the most affable and kindly of men, and was as much beloved as
respected by those who knew him.”

TO SIR EDWARD FRY.

October 10, 1884.


It is quite time that I responded to your kind and welcome letters. First,
let me congratulate myself upon having you as a colleague in the Royal
Society, in which I think you need not owe your fellowship to official
dignity. I believe you took honors in science at the university, along with
our friend Professor Flower.
You mentioned your approaching visit, with Lady Fry, to Lord
Coleridge.... Lord C., referring to your visit, sent us very cordial messages
in a letter to my colleague Professor Thayer. He will know that his host in
Boston, General Butler, is one of the candidates for the Presidency.
I am, as you may suppose, a bolter from the Republican presidential
nomination. We even hope to give the electoral vote of Massachusetts,
stanchest of Republican States, to the Democratic candidate. But I need not
bore you with American politics.
Let me say how sorry we were not to see Miss Fox at our home. It might
have been, except for a little journey we made from Philadelphia, of which I
must tell you more.
I had a mere glimpse of Miss Fox at Montreal, and a little more of her
cousin. She came late to Philadelphia, where Mrs. Gray (who was not at
Montreal) and I had a most pleasant chat with her at a garden reception. The
next day I went out to the suburban place where she was visiting, and came
near to winning her for our expedition, at least as far as to Luray cave, and
the Natural Bridge in the Valley of Virginia. But the engagements she had
made could not be reconciled. Her hostess was to take her to this
neighborhood, but too early for us to receive her here. All good people in
this country think so much of Caroline Fox that they wished to know her
sister.
I have not seen the book by Mr. Arthur on difference between physical
and moral laws, and am not sure that I ever heard of it or of the author. Who
is the publisher? I might find it at the university library. No, I never had the
fortune to see, much less to know Maurice. Of course I have always known
a good deal about him and of the remarkable influence he exerted, both in
person and in his writings, “in which were some things hard to understand,”
such as his liking for the Athanasian creed, but nothing that was not most
excellent in spirit.
Of course I well remember Miss Wedgewood; and we had occasional
correspondence up to the time when Darwin died, and she, on the part of
the family, announced it to me. I am glad to know that she wrote the sketch
of Maurice in the “British Quarterly.”
And now about ourselves. I got the Compositæ off my mind late in the
spring, but not off my hands until sometime in August. At the end of August
and of the pleasant part of the summer here (for it was delightful in
Cambridge, so cool and quiet, and Mrs. Gray away only for three weeks
with her friends on the coast) I went to the meeting of the British
Association at Montreal; enjoyed it much; read a paper,[128] a sort of
address, to the botanists coming over to North America, which the Section
seemed to like and voted to print in extenso. (I will first print it here, and
send you a copy. Not that there is much novelty in it, but it may be
readable.) I had to leave the meeting after three or four days, and return
here; sorry to leave our friend Mr. Walter Browne ill at the hospital with
typhoid fever. He and his poor wife received every kind attention, but he
died in a few days.
It is agreed that the British meeting was a distinguished success. It
brought over a throng of English people, and the American savants (I
cannot abide the word “scientists”) were in good force. We were repaid by
the large attendance of British Association members at Philadelphia, where
they contributed to make our meeting large and notable.
Up to this time the weather was all that could be wished, cooler, I
suppose, than in England at the time. But that week at Philadelphia was
raging. Mrs. Gray and I were there for the whole week, domiciled with
friends in the heart of the city,—a city which never cools at night, as it does
hereabouts. I bore the heat well, as my manner is; Mrs. Gray, fairly, by
keeping quiet through the mornings and giving herself rather to the evening
receptions, which were fine and most admirably managed. It grew cooler
the moment the week was over and the session ended. Besides, we moved
at once into a cooler region. It was arranged that I should lead any British
botanists that cared to go on an excursion into the mountains of Virginia
and Carolina. But they were otherways bound, so that I could take only my
friend Mr. John Ball of London, your fellow F. R. S., taking also another
American botanist, with whom we had visited these regions more than once
before, and, to make it pleasanter, we added three ladies, wives and
daughters of botanists, Mrs. Gray being one.
Our first day’s journey was to Luray, in the Valley of Virginia, between
the Blue Ridge and the proper Alleghanies. The next day we visited the
Cavern, which I think is the finest in the world, not forgetting that of
Adelsberg in Styria. It is newly discovered, with wonderful wealth and
beauty of stalactical formations, and is lighted up for visitors with electrical
lights in all the larger chambers. That day we went on to the Natural Bridge,
which we had not seen for many years. It was grander than I had
remembered; indeed, it and the scenery around is worth a voyage and a
journey to see. Then we went on to our favorite Roan Mountain, on the
borders of North Carolina and Tennessee, one of the highest in the Atlantic
United States, and the finest; the base and sides richly wooded with large
deciduous forest trees in unusual variety even for this country, the ample
grassy top (of several square miles) fringed with dark firs and spruces, and
the open part adorned with thousands of clumps of Rhododendron
Catawbiense, which when there last before, late in June, we saw all loaded
with blossoms, while the sides were glorious with three species of Azalea,
not to speak of many other botanical treasures. There, at top and at base, we
passed four busy days. A narrow-gauge railway recently built, and new to
us, reaches to the base of the mountain, up the Doe River, through most
picturesque scenery, showing to most advantage in the descent. On our way
back we diverged to visit some striking rock scenery on the upper Kanawha
River, and thence to a mountain-top lower than Roan, but with the
advantage of a charming little lake, with banks all fringed with
Rhododendron maximum and Kalmia, hanging over the water for a rod or
two, except on the side where the little hotel stands. Well, I have written a
deal here, little as I have managed to tell you. I think you and Lady Fry
should come over and see for yourselves, just a pleasant summer vacation,
if you can leave Failand for so long.

TO J. D. HOOKER.

September 26, 1884.


So dear Bentham has gone,—not quite filled out his eighty-fourth year.
Well, we could have wished this year of infirmity and suffering had been
avoided. One would like to say good-evening promptly at the close of the
working-day. But this we cannot order, so we must accept what comes. We
shall miss him greatly. We have nobody left to look up to. He seems to have
made a wise and good disposition of his effects.
Your two letters reached us at Philadelphia, on our return from North
Carolina and Virginia....
Yesterday we had Sir William and Lady Thomson.[129] To-day Traill and
wife (young and bright) of Aberdeen looked in and lunched.
I come home to a heap of letters and parcels and affairs, to keep me busy
awhile....
Well, the meeting at Montreal was a success, and made a pleasant
occasion. The influx of visitors from British Association to Philadelphia
made that meeting very good too. George Darwin I just saw for a moment
at Montreal, and Mrs. Darwin also at Philadelphia, one evening,—
handsome and winning.
I hope you have got the copy of “Synoptical Flora II.” for your own
shelf, through Wesley. Slips and omissions are already revealing, especially
in the index.
I am wonderfully strong and well. Mrs. G. well up to average, both much
set up by holiday, of which mine has now lasted a month....
What a deal you have fished out of Bentham’s earlier life! I thought you
meant Toulouse, not Tours. Bentham used to speak of Toulouse and that
part of France....
Among the inventive feats of his father was one I have somewhere heard
or read of, that he made a fleet of articulated transport boats for descending
the crooked channels of the Russian rivers.
I think you might have specified De Morgan’s discovery of Bentham’s
contribution to logic, and his able defense of the reclamation, to which
Herbert Spencer’s “Verdict” in 1873 was not particularly needed for the
establishment of the fact. De Morgan was not a man to leave his work half
done, especially as against Hamilton.
I only regret that the length to which these most interesting matters
extended stood in the way of your giving a more detailed account of
Bentham’s botanical work, on which another article would be timely.
I must now, before long, attempt something of this, for the American
Academy’s éloge. And I pray you, if you are not doing it yourself, to send
me hints and suggestions. Sheet full, and I will not begin another to-day, but
add only my wife’s love to you and Lady Hooker.
January 9, 1885.
The souvenir of dear Bentham has come to hand, is in its place on my
table, and the first use I make of it, now in position, is to write to you this
letter of thanks,—to you for awarding it to me, and to dear Lady Hooker for
so promptly forwarding it. The stand is a beautiful piece of marble, bearing
its two inkstands.[130] Was there ever anything to occupy the sunken area
between them?...
Of myself I have not much to write. The prospect of getting off for the
latter part of winter has just prevented my settling down to the “Flora,” and
I have found plenty else to keep me actively employed, mainly with a
revision of some boraginaceous genera, now in printer’s hands, which I
hope, while it unsettles old work, will settle it better and permanently, as far
as anything we do can be said to be lasting.
I am well,—can hardly be said to need the holiday we have determined
on.... We shall benefit much, I think probable, by getting off to meet the
spring, avoiding February-April here, which are the only drawbacks to a
climate of the best: for you know I do not at all dislike summer heat.
We have not troubled ourselves much as to where we would go. But now
it does seem that we will go to the southern part of California, if possible by
the southern Arizona route, which is near the Mexican boundary, and must
be best for winter, and to return by the route through the northern part of
Arizona, which should be pleasant in the latter part of April. Oh, that you
and Lady Hooker could be with us.... And we shall be lonely without you
on our travels, and feel that “that great principle of the survival of the
fittest” has been woefully violated....
City of Mexico, Sunday, February 22, 1885.
Your letter of January 20, forwarded from Cambridge, overtook us at
San Antonio, Bexar. We left home February 3, in bitter cold, for St. Louis,
where I had an interview with old Shaw, and heard him read his rearranged
will, which is satisfactory, as it will allow his trustees, and the corporation
of Washington University there, to turn his bequests to good account for
botany; will be an endowment quite large enough for the purpose.
Thence, rail—two nights and a day—to Mobile, where it was warm and
springlike, but no flowers out, barring an early violet. Thence to New
Orleans, which has a great exposition and a crowd, and where, in a sudden
change to cold, I caught a dreadful cold. It began with such a hoarseness
that, going, Mrs. G. and I, to dine with Dr. Richardson (son-in-law of
Short), where we met your and Dyer’s friends, Mr. and Mrs. Morris[131] of
Jamaica, I was taken speechless. I was only for a few hours at the
Exposition (I hate such), but Mrs. Gray went a second time to see Mexican
things. Dr. Farlow, joining us at New Orleans, brought, to our surprise,
passes for us to go by the Mexican Central Road to the city of Mexico and
back to El Paso (the junction with the road to California), and we decided to
undertake it. One day and a night took us to San Antonio, Texas, where we
stayed Saturday, Sunday, and Monday, till evening, trying to recover from
our colds, driving over the country through chaparral of mesquite bushes
(Prosopis) and opuntias. When we awoke next morning we were coursing
along the rocky banks of the Rio Grande del Norte, mounting into a high
region more arid still, if possible, the only flowers out a Vesicaria; and
descending into a great cattle ranch region we reached El Paso at 3.30 A.M.;
got to bed again; had the day there and on the other side of the river, at El
Paso del Norte, in the Mexican State of Chihuahua, whence at evening we
took our Pullman for three nights and two days’ journey to this place,
through Chihuahua, Zacatecas, Aguas-Caliente, Leon, etc., reaching here
yesterday morning at 8.30. We are comfortably placed in the Hotel Iturbide.
Farlow and I have looked about somewhat, though I am still suffering from
catarrh and cough; Mrs. Gray laid up with hers. This afternoon a Mexican
gentleman to whom we took letters called and drove Farlow and me out to
Chapultepec, whence a most magnificent view of the whole Valley of
Mexico and the surrounding mountains, including Popocatapetl and its
more broadly snowy companion,—with its more difficult name, meaning
White Lady,—at this season always with cloudless tops. The cypresses of
Chapultepec are glorious trees, plenty of them, full of character, and of a
port which should help to distinguish the Mexican species from the North
American. I wish you could see them. And such old trees of Schinus molle,
the handsomest of trees either old or young, the old trunks wonderfully
bossed. Is it a native of Mexico? I thought only of Chili. But it is well at
home here.
Such yucca trees as we have seen on the way here, with trunks at base
two or three feet in diameter, weirdly branched, looking like doum palms.
Opuntias of two or three arborescent species, some huge, and other cacti not
a few.
I have still to compare Arizona with the plateau of northern Mexico. But
I see they are all pretty much one thing....
Orizaba, February 27, 1885.
Since my former sheet, Farlow and I have been mousing about the city
of Mexico, I coughing most of the time, in a clear, dry air and nearly
cloudless sky, weather which should be most delightful, but somehow it is
bad for the throat (for the natives as well as for us), and the rarefied air puts
one out of breath at a little exertion; mornings and evenings cool and fresh,
the midday warm, in the sun trying.... Called in a physician, a sort of
medical man to American embassy, who came here with Maximilian, and
stayed. Very intelligent. Ordered us to come here as soon as Mrs. Gray
could travel. Here only 4,028 feet and a warmer damp air. Well, we tried it
yesterday; had to leave city of Mexico at 6.15 A.M., our hotel at 5.30 cold,
no breakfast; had to travel till ten or nearly before we could get even a
decent cup of coffee, at junction of road to Vera Cruz and Puebla, and after
rising to 8,333 feet in getting out of the Valley of Mexico; but at 1 P.M., at
Esperanza, in the Tierra Frias, had a capital dinner, and met train from Vera
Cruz. Here pine-trees on the hills all round us, two species. Soon begins the
descent and a complete change of air, the other side all dry and horrid dust,
making our catarrh worse than ever; now the moisture from the Gulf of
Mexico makes all green; the road by skillful engineering pitches down
4,000 feet to this, the greater part of the descent all in eight or nine miles of
straight line as the bird flies. In all the Valley of Mexico and to the north of
it really nothing in blossom yet, all so dry, except Senecio salignus, if I
rightly remember the name, a shrub of 1-4 feet, just becoming golden with
blossoms. But the moment we began the descent all was flowery, two
species of Baccharis, Eupatoria, Erigeron mucronatum (so much cultivated
under the false name of Vittadenia triloba), Lœseliæ species, Arbutus,
(Xalapensis) in bud, and many things of which we shall know more when
we return over the route.... Very comfortable hotel here. Botteri[132] left an
élêve here who knows something of botany, but lives out of reach on a
hacienda. We found a garden combined with a small coffee plantation. The
proprietor thereof, speaking a little French, has filled his ground with a lot
of things that will stand here. It is just in medias res, two hours below Tierra
Frias, two above (or at Cordoba, only seventeen miles, but 2,000 feet lower)
true tropical. Papaya fruits here, also Persea gratissima, etc. And the
oranges are delicious. I have passed the whole morning with the garden
man, while Farlow went up a small steep mountain, and brought back
various things. We shall drive this afternoon to the Cascade of Rincon
Grande (cascades are most rare in Mexico).
The air here suits us; shall try to leave our coughs here and at Cordoba
below.
On the way here had views of Popocatapetl and the more beautiful and
diversified Iztaccihuatl from the sides, and wound round the base of Mt.
Orizaba. A true Mexican town this. Mrs. Gray enjoying sights from the
window; will be able to drive out this afternoon, though the clouds are
sinking too much and mist gathering, a great contrast to the city of Mexico.
P. M.—We went, but saw the falls (very picturesque) in a wet mist, and
for botany got a lot of subtropical Mexican plants, the like of which I never
saw growing before: among Compositæ, Lagascea (large heads), Tree
Vernonias of the Scorpioides set, Calea, Andromachia, etc., etc.
Cordoba, March 2, 1885.
... To continue. On Saturday, a fine and sunny morning, Farlow and I
drove off for the Cascade of Barrio Nuevo, almost as beautiful as the other,
and had a long morning in clambering and collecting. In the grounds on the
way are planted trees of a Bombacea, in flower before the leaf, probably
Pachira. The peak of Orizaba shows as a narrow streak of white over a near
mountain, from the windows of our room; but by going half a mile east the
whole comes out splendidly.
Sunday morning we were comparatively quiet, but at 3.50 P.M. we were
off for Cordoba, less than an hour distant by rail, and 2,000 feet lower. A
queer little town, with only a poor, truly Mexican inn, a set of rooms in the
single story, all round a patio, into which the country diligence drives, and
on rear side the stables back against the rooms, as Farlow found to his
discomfort, only a thin wall between his room and the horse’s mangers. Tile
floors, cot-beds, but clean, and the food certainly better than was to be
expected.
Fine view of Orizaba. An American, Dr. Russell, here, whom I looked
up. And he took us to an American German, Mr. Fink, who collects
Orchids, etc., commercially. He took us to a garden, and we were going to
the river bank and ravine, but, though out of season, rain set in, and we
came home rather wet.
I fear our afternoon excursion may be lost, but it now looks like clearing.
The way from Orizaba here is magnificent, for mountains, railroad-
engineering, and culture vegetation. I hope we can get into some wild
tropical vegetation, but uncertain; can stay here only to-morrow at most. We
are cut off from news of all the world; little could we get in Mexico city;
less since....
You would be amused, as I have known you to be in Italy, at my knack
of explaining myself by gesture, and so getting on....
Lathrop, California, May 1, 1885.
We have only this morning left Rancho Chico and have set our faces
eastward. Waiting for our train I improve the rare bit of leisure to write a
line.
First of all, we are both well. No cough, however obstinate, could abide
this charming climate. And having no excuse for further stay we enter upon
the “beginning of the end” of a holiday which now only lacks ten days of
three months. What a pity to turn our backs on all the fruits we see growing
around us, having enjoyed only the cherries, which are just coming in. Well,
we have a basket of them, as big as plums, and so good! to solace the first
days of the desert part of our journey. We shall have desert enough on the
way home, as we cross Arizona and New Mexico by the Atlantic and
Pacific railway, through the northern part of those Territories (having come
out by the southern), a country quite new to us. How often we have wished
for you and Lady Hooker!
When and whence did I write you last? I think from Los Angeles and
before our trip to San Diego.
Instead of a short journey by sea (which my wife detests) we made a
long circumbendibus by rail to the southernmost town in California;
declined an invitation to go over the border into Mexican California; was, in
fact, too unwell to do anything in the field, and so, finding the coast too
cool and damp, returned, stopping two nights with Parish and wife, at their
little ranch at San Bernardino, in a dry and warm region, a charming valley
girt with high mountains, on the eastern side still snow-topped,—indeed
they are so most of the summer. Back thence to Los Angeles we soon went,
down to the port San Pedro, and took steamer for Santa Barbara, the very
paradise of California in the eyes of its inhabitants, and indeed of most
others. Our cruise of only eight hours on the Pacific was pleasant, and most
of it in daylight.
Arriving after dark, we found, to our surprise, the mayor of the little
town on the wharf with a carriage for our party (wife, Farlow, and self),
who drove us to the fine watering-place kind of hotel, and on being shown
at once to our rooms we found them all alight and embowered in roses, in
variety and superbness such as you never saw the beat of, not to speak of
Bougainvilleas, Tacsonias, and passion-flowers, Cape-bulbs in variety, etc.,
etc., and a full assortment of the wild flowers of the season. Mrs. Gray was
fairly taken off her feet. During the ten or eleven days we stayed, there were
few in which we were not taken on drives, the most pleasant and various.
The views, even from our windows, of sea and mountain and green hills
(for California is now verdant, except where Eschscholtzia and Bahias and
Layia, etc., and Lupines turn it golden or blue) were just enchanting; and on
leaving we were by good management allowed to pay our hotel bill.... Had
you been of the party I believe the good people would have come out with
oxen and garlands, and would hardly have been restrained.
Here we were driven out fifteen miles to one of the great ranches,—a
visit of two nights and a day,—that of Mr. Cooper, a very refined family;
the whole ranch flanked on the windward sides by eucalyptus groves,
apricots, almond, peach-trees, etc., by the dozens of acres; but the produce
on which the enthusiastic owner has set his heart is that of the olive, and he
makes the best of olive oil, and in a large way. Hollister’s ranch is still
larger, miles long every way; both reach from mountain-top to sea, and
have fine drives up cañons, in these fine oaks and plane-trees, occasionally
an Acer macrophyllum and an Alder. Avoiding the sea, which gives a short
route, we reached San Francisco by a lovely drive, in a hired wagon, over a
pass in the Santa Inez Mountains to the coast (south) at Ventura, and so up
the broad and long Santa Clara Valley to Newhall, on the Southern Pacific
railway, not very far above Los Angeles (two days’ drive, most pleasant),
then by rail overnight and to this place to breakfast, and on to San
Francisco.
We stopped this time at the Lick House, where we had, European-wise, a
room, not quite so good as we had at the Palace Hotel eight years ago, and
fed at the restaurant, very nice and reasonable, when we were not visiting or
invited out, which was most of the time. So it was not expensive, our room
(parlor, bedroom shutting off, and a bathroom) costing only about 12
shillings for us both. Harkness looks the same, but older; is absorbed in
fungology. Here again we were made much of for twelve days, most busy
ones. General McDowell, who you remember dined us at the “Palace,” is
ill; we saw him twice, and he has since so failed that we daily expect to hear
of the end.
May 4. In Farlie’s Chalet hotel in the Grand Cañon of the Colorado.
Dr. Brigham, you remember, who took us to the Chinese theatre, is now
married, and has three children by a bright wife, with a rich father, and a
handsome house, above Presidio,—a fine site, and filled with fine things
from all countries, and such a rose-garden; gave us a handsome dinner.
Alvord and wife (president now of Bank of California), noble people, did
wonders for us, and a dinner and drives. A lunch over at the university; and
another by General (commanding the Western Department in place of
McDowell, and in the choice house the latter built) and Mrs. Pope (she an
old acquaintance); then we went over to San Rafael, a night with the
Barbers, and next day a drive up behind Mount Tamalpais to the cañon
reservoir of water-works, and saw, at length (having failed on all former
visits), that huge Madroña (Arbutus Menziesii), like one of those great and
wide-spreading oaks you used to admire. Next day to Monterey, which we
saw nothing of on that hurried visit eight years ago, when our single day
was sacrificed to Hayden’s insane desire to see a coal mine on a bare hill!
Now there are eighteen miles of good drive around all Point Pinos and
through it, and Cupressus macrocarpa on the seaside verge, noble and
picturesque old trees, and no lack of young ones, a little back, and grand sea
and shore views.
On the other side of the town, in a grove of great live oaks and Pinus
insignis mixed, made into a beautiful park and park gardens, with a separate
railway station in the grounds, is the crack hotel of the Western coast, the
work of the Pacific Railway Company, which has also bought and appended
the whole of the pine grove, five or six miles long and two or three wide,
thus preserving Pinus insignis and the cypress, the latter much needing it.
Mr. and Mrs. Alvord, knowing our visit was to be, had telegraphed for
best rooms, and joined us unexpectedly; took us on the long drive the next
day, with four fine horses.... They showed us no end of kind attention.
At length we got off for a visit to Chico (leaving Farlow to apologize at
Santa Cruz, etc.), a quicker way than before, a steam-ferry across Suisin
Bay helping. And there we had a nice time indeed, from Saturday evening
to Friday morning, every day, drives and picnics, and botanizing, and
feeding on (besides strawberries) such cherries, just coming in in acres of
cherry-orchards, the only fruits yet in season. That big fig-tree, in the
branches of which I used to hide and feast, or rather cram, is bigger than
ever, but the figs green, to my sorrow. And we cannot wait for them.
General Bidwell[133] and wife have aged little in the eight years, are as
good as ever, full of all noble and good works, as well as of generous
hospitality; have taken wonderfully to botany; remember you most
affectionately and long for a real visit. His great ambition is to make drives,
good roads, through the ranch, for pleasure as well as use; he has now over
a hundred miles of them. That big oak[134] is finer than ever; not a dead
branch.
Well, off at length; at Lathrop joined our eastward train at evening; up
the San Joaquin valley all night, and had early morning for the wonderful
Tahachapi Pass. Breakfast at Mohave. (I must send you a railroad map.)
There took the Atlantic & Pacific Railroad, over the sandy desert to the
Great Colorado at supper, to Peach Spring station at two A.M., and next
morning in an easy “buckboard wagon” twenty-two miles and 4,000 feet
descent into this wonderful cañon, a piece of it, which its explorer, Major
Powell, has made famous.
This afternoon and evening we are to get up and back, and on in the
night and morning to Flagstaff, and the ancient cliff dwellings.
In the Cars, Kansas City, May 8, 1885.
Let me finish up these mems. We have now only a run of eleven hours to
St. Louis, where we stay three or four days with Dr. Engelmann (Jr.), and
then home.
The cañon trip well repaid the journey and its rough accessories. Some
of the views are of those depicted by Powell. We find that Tylor and
Moseley were here last year. As the man whom we had introductions to at
Flagstaff was absent for a day or two, though we found he had left
substitutes, and as we wanted to get home as soon as we could, we gave up
the visit to the cave and cliff dwellings. I dare say the models in clay, made
at Washington, are as good as the originals. So we came on, one and a half
nights and two days, and to-night we shall sleep in beds at St. Louis. We
bear this sort of travel quite well. From Mohave to the Colorado is very
sandy and complete desert, descending eastward many hundred feet. Near
Mohave lots of tree yuccas, looking very like those in northern part of
Mexico. From the Colorado to Peach Spring we passed in the dark, but had
risen to about 6,000 feet, and we kept on an elevation of 4,000 to nearly
8,000 feet all across the rest of Arizona and New Mexico, the higher parts
wooded with conifers, that is, Pinus ponderosa of the Rocky Mountains
form and Juniperus. At Las Vegas, New Mexico, we laid over one train, to
rest and visit the Hot Springs; no great to see, except a spick and span new
hotel, too fine for the place, and some very hot water.
Well, this trip, which will nearly round out to three and a half months,
has been long and enjoyable indeed.
At St. Louis will be letters, perhaps one from you.
Ever yours,
A. Gray.
Part of yesterday and last night was down along the Arkansas, the
reverse of our journey eight years ago. Country much settled up.
Cambridge, August 26, 1885.
... Charles Wright is dead, at seventy-three and a half; had been suffering
of heart-disease, went out to his barn, was missed as the evening drew on,
was found dead. So they go, one by one....
The summer is almost gone,—one hardly knows how,—but, then, we
have a longer and finer autumn than you have in England.
The five hundred copies which I printed in 1878 are gone. And, as I have
to print new copies, I take the opportunity to correct on the stereotype plates
when I can,—a great lot of wrong references to volume, page, plates,—that
is, such as we have found out. What a bother they are, and how impossible
to make correct in the first place, and to keep so through the printer’s
hands! Then there are lots of important corrections to make, and new
species and genera galore.
So,—in an evil moment, you will say—I set about a supplement to this
new issue,—also of the other part. For, as I have now brought out in the two
parts all the Gamopetalæ, and as I begin to doubt if I shall hold out to
accomplish much more, I thought it best to leave behind at least these in
good state. But it is no small job. And this, with the great amount of
herbarium work that goes along with it, or beside it, just uses up the
summer; for I dare guess it will keep me occupied all September....
The last news of you is a letter from your dear wife to mine,—giving
such a pleasant picture of the two boys, and of your enjoyment of them. You
say you are quite well, and Lady Hooker much the same,—which is
comforting. But you are naturally growing older, like myself. I tire sooner
than I used to do, and have not so sure a touch nor so good a memory. The
daily grind we both find more wearing....
We should like to come over to you once more,—but it seems less and
less practicable; unless I become actually unfit for work, and then I shall
not be worth seeing....
Your affectionate old friend,
A. Gray.
Old, indeed; the president of the Naturæ Curiosorum wrote me on
August 3 that I have been one of the curious for fifty years.

Dr. Gray wrote a notice of Charles Wright for the “American Journal of
Science,” in which he says that “Charles Wright was born at Wethersfield,
Connecticut; graduated at Yale in 1835. Had an early love for botany, which
may have taken him to the South as a teacher in Mississippi, whence he
went to Texas, joining the early immigration, and occupied himself
botanizing and surveying, and then again in teaching. He accompanied
various expeditions, and no name is more largely commemorated in the
botany of Texas, New Mexico, and Arizona than Charles Wright. It is an
acanthaceous genus of this district, of his own discovery, that bears the
name of Carlowrightia. Surely no botanist ever better earned such scientific
remembrance by entire devotion, acute observation, severe exertion, and
perseverance under hardship and privation.” He was engaged later for
several years “in his prolific exploration of Cuba.”
“Mr. Wright was a person of low stature and well-knit frame, hardy
rather than strong, scrupulously temperate, a man of simple ways, always
modest and unpretending, but direct and downright in expression, most
amiable, trusty, and religious. He accomplished a great amount of useful
and excellent work for botany in the pure and simple love of it; and his
memory is held in honorable and grateful remembrance by his surviving
associates.”[135]

TO JOHN H. REDFIELD.

Cambridge, November 3, 1885.


My dear Redfield,—I was interested in your Corema Con.
I have a remark to make on the last sentence of it; I would ask, How
could the plant have an introduction following the glacial period? And
where could it have come from?
Of course my idea is that it existed at the higher north before the glacial
period—that is my fad.
But one sees that this is one of a few plants that may be appealed to in
behalf of an Atlantis theory,—as coming across the Atlantic, making this
Corema a derivation from C. alba, of Portugal, or of its ancestor. But the
Atlantic is thought to be too deep for an Atlantis; and we do not need it
much.
What induces me to refer to your paragraph is to ask whether your
“following the glacial period,” that is, recent introduction, means in your
thought that our species is a direct descendant of Corema alba, which by
some chance got wafted across the Atlantic.
That is the most probable notion, next to my theory.
For consider, we know the genus only on these two opposite shores.
Perhaps—so far as I know, there is no more C. alba in the Old World
than C. Conradii in the New. And if it were in New England that the former
occurs, we could say that the Old World received the genus from the New—
via the Gulf Stream.
November 6.
... I start farther back than the retreat of the glaciers. I suppose that the
common ancestor of both Coremas was in the high north before the glacial
period, and that the two, in their limited but dissociated habitats, are what is
left after such vicissitudes!
In that view it does not matter how long New England coast was under
water. Our plant and its companions were then further south or west.
Yours ever,
A. Gray.
On the approach of Dr. Gray’s seventy-fifth birthday it was suggested
among the younger botanists that some tribute of love and respect should be
presented to him. Accordingly a letter was sent to all botanists whose
addresses could be obtained within the very limited time. A silver vase was
decided upon, and designs furnished, which were most happily and
beautifully carried out. The description, copied from the “Botanical
Gazette,” gives its size and decorations.
“It is about eleven inches high exclusive of the ebony pedestal, which is
surrounded by a hoop of hammered silver, bearing the inscription ‘1810,
November eighteenth, 1885—Asa Gray—in token of the universal esteem
of American Botanists.’
“The decoration of one side is Graya polygaloides, surrounded by
Aquilegia Canadensis, Centaurea Americana, Jeffersonia diphylla,
Rudbeckia speciosa, and Mitchella repens. On the other Shortia galacifolia,
Lilium Grayi, Aster Bigelovii, Solidago serotina, and Epigæa repens. The
lower part of the handles runs into a cluster of Dionæa leaves, which clasps
the body of the vase, and their upper parts are covered with Notholæna
Grayi. Adlumia cirrhosa trails over the whole background. The entire
surface is oxidized, which gives greater relief to the decorations.”
Greetings in the form of cards and letters, sent by those who gave the
vase, were placed on a silver salver accompanying the gift, with the
inscription, “Bearing the greetings of one hundred and eighty botanists of
North America to Asa Gray on his seventy-fifth birthday, November 18th,
1885.”
Dr. Gray was exceedingly touched and delighted, as well as
overwhelmed with surprise. And the day, with pleasant calls and
congratulations from friends and neighbors, gifts of flowers with warm and
kindly notes, was made a memorable one indeed.
His response to the senders of the vase was printed and sent to all who
could be reached.
Herbarium of Harvard University,
Cambridge, Mass., November 19, 1885.
To J. C. Arthur, C. R. Barnes, J. M. Coulter, Committee, and to the
numerous Botanical Brotherhood represented by them:
As I am quite unable to convey to you in words any adequate idea of the
gratification I received on the morning of the 18th inst., from the wealth of
congratulations and expressions of esteem and affection, which welcomed
my seventy-fifth birthday, I can do no more than render to each and all my
heartiest thanks. Among fellow-botanists, more pleasantly connected than
in any other pursuit by mutual giving and receiving, some recognition of a
rather uncommon anniversary might naturally be expected. But this full
flow of benediction, from the whole length and breadth of the land whose
flora is a common study and a common delight, was as unexpected as it is
touching and memorable. Equally so is the exquisite vase which
accompanied the messages of congratulation and is to commemorate them,
and upon which not a few of the flowers associated with may name or with
my special studies are so deftly wrought by art, that of them one may
almost say, “The art itself is nature.”
The gift is gratefully received, and it will preserve the memory to those
who come after us of a day made by you, dear brethren and sisters, a very
happy one to
Yours affectionately,
Asa Gray.

TO S. M. J.

November 19, 1885.


We meant our day to have been most quiet, and I completely and J.
largely were taken by surprise. So we had to send for two or three
neighbors, especially to see the vase.
J. will bring it in to you, no doubt, for she is very proud of it. The lines I
have already written have taken all the strength out of my right arm, but not
all the love out of my heart, of which a good share is yours.

TO W. M. CANBY.

Cambridge,
November 19, 1885.
My dear Canby,—Many thanks for your felicitations. There is much I
want to write, and to say what a surprise we had, and how perfect the vase
is. But my arm is worn out with note-writing.
Yours affectionately,
Asa Gray.
Two poems and a poetical epigram came among the rest!

TO SIR EDWARD FRY.

Cambridge,
January 31, 1886.
My dear Friend,—I am a laggard correspondent, I fear. Here are your two
most friendly and interesting letters, as far back as November, one of which
crossed, and one which announced, the reception of my long letter which
gave a sketch of our journeyings which began almost a year ago. For we are
now already in the middle of another winter. I doubt if we shall flee from
this one, although it has shown some severity. In the first place, we may
thankfully say that neither Mrs. Gray nor I can say that we require it; and I
cannot bear to lose the time: I seem to need the more of this as the stock
diminishes; for, somehow, I cannot get as much done in a day as I used to
do. Moreover, it is no good running away from winter unless you can go
far. For our southern borders have been unusually wintry, and they want our
guards and preparations against cold.... We were glad enough to get back to
our well and equably warmed house, where, indeed, we are most
comfortable.
You called my attention, I believe, to Professor Allen’s book on the
“Development of Christian Doctrine.” I take shame to myself that I did not
procure and read it. But I know its lines, and read some part of it before it
was in the book, and, of course, I like it much.
I am going, in a few days, to send you a little book, with similar
bearings, which I read in the articles of which it is made up. I think you will
find much of it interesting.
Bishop Temple’s “Bampton Lectures” seemed to me very good as far as
it went, but hardly came up to expectation.
I saw something of Canon Farrar when here. He pleased well, and I think
was well pleased; and personally he was very pleasing and lovable.
I wish more of the English Churchmen would visit us, and give more
time especially to the study of their own branch of the church in the United
States,—a very thriving one. I think they might learn much that would be
helpful and hopeful,—difficult as it may be to apply the experience and the
ways of one country to another.
I have seen, but not read, Mr. Forbes’s “Travels in Eastern Archipelago.”
Those who have read it here say it is very interesting. We have a great lot of
his dried plants from Sumatra and Java, unnamed, which at odd hours I am
arranging for the herbarium. I hope that in his new journey he will manage
to make better specimens. But, as he is primarily an entomologist, this can
hardly be expected. But, if I rightly understand, he goes out now with a
good backing and probably better conveniences for collecting than he could
have had before.
We have been, and still are, much interested in English politics and
election excitements. You are having very anxious times, indeed. What a
pity that some one party, that is, one of the two great parties, is not strong
enough, and homogeneous enough, to command the situation for the time
being, and to deal independently of Parnell, or, indeed, of Chamberlain....
We Americans are wonderfully peaceful—our only real questions now
pending are financial, and those not yet treated as they ought to be, on party
lines. We have an awful silver craze; but we hope to arrest it before it comes
to the worst, though sense and argument are at present ineffectual.
We have a comfortable trust in the principle that “Providence specially
protects from harm the drunken, the crazy, and the United States of
America.”
I see our friend Professor Thayer now and then. He is well and
flourishing. Mrs. Gray and I are very well indeed, and we send our most
cordial good wishes to you all.
Very sincerely yours,
Asa Gray.

TO J. D. HOOKER.

Cambridge, March 9, 1886.


When I read A. de Candolle’s notice of Boissier, I thought it was
“charming.” Anyhow, it brought back to me the charming memory of a very
lovable man. I dare say neither De Candolle nor I has done justice to
Boissier’s work. I could only touch and go,—make a picture that would just
sketch the kind of man he was.
... Yes, I have got on Ranunculaceæ, and have done up to and through
Ranunculus, minus the Batrachium set, of which happily we have few in
North America, that we know of. But having done some while ago the
Gamopetalæ of Pringle’s interesting North Mexican collection, I am now
switched off to the same in a hurried collection made by Dr. Palmer, in an
unvisited part of Chihuahua, in which very much is new. One after another
those Mocino[136] and Sessé plants turn up. Also those of Wislizenus,
whom the Mexicans for a time interned on the flanks of the Sierra Madre.
We are bound to know the botany of the parts of Mexico on our frontier,
and so must even do the work. Pringle goes back there directly, with
increased facilities, and will give special attention to the points of territory
which I regard as most hopeful.
Trelease,[137] our most hopeful young botanist,—established at St.
Louis,—is here for a part of the winter, to edit a collection of the scattered
botanical publications of Engelmann which Shaw pays for—or at least pays
for to a large extent. He would have the plates and figures, and that will
double the cost and the sum Shaw offered to provide. We may have to sell
some of the edition in order to recoup the charges....
Yes, you hit a blot. I can see to all my own books, such as the
“Synoptical Flora.” But, somehow, I cannot restrain the publishers from
altering the date of their title-pages when they print off a new issue from the
stereotype plates....
What do I call an alpine plant? Why, one that has its habitat above the
limit of trees—mainly—though it may run down lower along streams. But
in a dry region, where forest has no fair chance, we might need to mend the
definition.
Upon your paper, I got a few notes—offhand, by references.
I premise that in New England we have two places where several alpine
plants are stranded at lower levels than they ought, peculiar conditions of
configuration and shelter having preserved them, while the exposed higher
grounds have lost them. They are Willoughby Mountain and the Notch of
Mt. Mansfield, Vermont.
As to your III. Of the whole list of alpine plants of Oregon and
northward and not of California, I can put my hand upon only two that are
yet known in California, viz., Armania verna and Vaccinium cæspitosum,
which comes in its var. arbuscula only.
There is a great lack of alpine arctic plants in California. First, because
there is not much place for them now; secondly, because there have been
such terrible and vast volcanic deposits—lava and ashes—that they must
have been all killed out.
But for all these matters we shall one of these days have fuller and surer
data—after my day. Well, I must stop....

TO A. DE CANDOLLE.

Cambridge,June 29, 1886.


My dear De Candolle,—Your letter and inclosure of the 15th inst. gave
me much pleasure. Not only had I a natural curiosity to know more of
Coulter,[138] but also I find it important to know his routes in Mexico and
California.
At Los Angeles, last year, I fell in with one of the “old settlers” who
knew him, and who accompanied him on that expedition into the Arizona
desert on the lower Colorado. Mr. Ball will ascertain and let me know other
particulars of the man, and the date of his death, which probably occurred
not long after that last letter to you, from Paris.
In various ways I am convinced that I am on the verge of
superannuation. Still I work on; and now, dividing the orders with Mr.
Watson (who, though not young, is eight or ten years my junior), we are
working away at the Polypetalæ of the “Synoptical Flora of North
America,” with considerable heat and hope. But it is slow work!
Tuckerman, our lichenologist, has gone before us! I shall in a few days
send you a copy of the memorial of him which I contributed to the Council
report of the American Academy of Sciences and am having reprinted in the
“American Journal of Science” for July.
My wife is fairly well.... She is always busy; and we both enjoy life with
a zest, being in all respects very happily situated, particularly in having
plenty to do.
Let us hope that you may still be able to give us better accounts of
Madame de Candolle and of yourself; and believe me to be always,
Yours affectionately,
Asa Gray.

TO J. D. DANA.

Botanic Garden, Cambridge, Mass., September 20, 1886.


My dear Dana,—Well! “the books” have just come.
I suppose you are in no hurry for notices of them, and would prefer short
ones....
I rather like to do such things incog., as in the “Nation,” in which I
sometimes take a shot at this or that.
I and wife are well,—very.
Had a week in Old Oneida, which still looks natural. I am grinding away
at “Flora,” and probably shall be found so doing when I am called for.
Very well! I have a most comfortable and happy old age. Wishing you
the same,
Yours ever,
A. Gray.

TO J. D. HOOKER.

Cambridge, September 15, 1886.


... Has Ball returned to England? If so, please tell him that he promised
to look up in Dublin, and give from his own knowledge, some details of
Coulter’s life. Alphonse de Candolle has sent me copies of what letters he
has, and they enable me to trace Coulter’s movements and whereabouts,
which is helpful.
Old Goldie,[139] your father’s correspondent lang syne, died only this
summer, very old.
My last bit of work was upon our Portulacaceæ for my “Flora.” The
genera are thin. It is as much as one can do to keep up Montia (though if
that fails Claytonia should go to it rather than the contrary, by right,—but
convenience would call for the contrary), also Spraguea.
I have been having a holiday. A fortnight ago my wife and I set out;
made a visit to my natal soil, in the centre of the State of New York, in
Oneida County; had a gathering of the surviving members—most of them
—of the family, of which I am the senior,—two widowed sisters (one a
sister-in-law), there resident, and an older one who came with her husband
from Michigan; my oldest brother and family, who have the paternal
homestead; the unmarried sister, who passes all her winters with us;
children and some grandchildren. One brother, a lawyer in New York, and
residing near by in New Jersey, with wife and two boys, did not come.
Another absent nephew is in California, well settled there.
It is a pretty country, the upper valley of the Mohawk and of tributary
streams from the south, which interlock with tributaries of the
Susquehanna, at a height of 1,000 to 1,500 feet above tide-water, beautiful
rolling hills and valleys, fertile and well cultivated, more like much of rural
England than anything else you saw over here. We wished you and Lady
Hooker could have been with us in our drives. The summer air is just
delightful, soft and fresh.
On our return we struck off and visited my brother Joe and family, in the
environs of New York, and so came home much refreshed—though, indeed,
I hardly felt the need of a holiday.
Sargent has just started for a trip to the southern part of the mountains of
North Carolina,—a region we are fond of and long to show you.
Now I am going to pitch into Malvaceæ. I am quite alone. Goodale took
off Sereno Watson with him, on a slow steamer to Amsterdam; will run for
a fortnight or so over nearer parts of the Continent, and Watson will look in
at Kew. He was much worn down, and the rest and change will be good for
him. I have filled my sheet with this gossip.

It was during this visit that Dr. Gray, when the family gathered one
morning for breakfast, had disappeared. He came in smiling when the meal
was half over, and in answer to the anxious question where he had been,
said, “Oh, I have been to say to Mrs. Rogers that I forgave her for getting
above me in the spelling-class.”
Cambridge, October 31, 1886.
Dear Hooker,—Thanks for a nice long letter from Bournemouth,
September 27. Thanks, too, for the hope—though rather dim—that you and
wife may come over to us in the spring. Before winter is over we must
arrange some programme; for we four must meet again somehow and
somewhere, while in the land of the living. But how is a problem.
... I see how difficult it must be for you to get away as far as to us. Our
obstacle to any amount of strolling away is mainly the fear that if I interrupt
my steady work on the “Flora of North America,” I may not get back to it
again, or have the present zeal and ability for prosecuting it.
On the other hand, if I and my wife do not get some playdays now, while
we can enjoy them, the time will soon come when we shall have to say that
we have no pleasure in them. Therefore we are in sore straits.... If really you
cannot come, then we will brave out the winter here, as we did last winter
and are none the worse; then we will seriously consider whether Mahomet
shall go to the mountain, which will not come to Mahomet.
I grind away at “Flora,” but, like the mills of the gods, I grind slowly, as
becomes my age,—moreover, to continue the likeness, I grind too
“exceedingly fine,” being too finical for speed, pottering over so many
things that need looking into, and which I have not the discretion to let
alone. Consequently the grist of each day’s work is pitiably small in
proportion to the labor expended on it. I am now at Malvaceæ, which I once
enjoyed setting to rights, and of which the North American species have got
badly muddled since I had to do with them.
If Sereno Watson—who should be back again in twenty days—will only
go on with the Cruciferæ, which he has meddled with a deal, and then do
the Caryophyllaceæ, which are in like case, we may by March 1st have all
done up to the Leguminosæ.
We learn to-day, through a pamphlet sent by Miss Horner, that Bunbury
is dead—in June last....
Your “Primer”—new edition—has not come yet. Do not forget it. And
then, as my manner is, I will see if I can find fault with it. Same with
Bentham’s “Hand-book,” new edition....
I do not wonder that you are happy and contented. We should so like to
see father, mother, and children in their encampment at Sunningdale. May
plenty of sunshine be theirs!
Ball has sent me early sheets of his book. I must find time to go through
its pages.
The L.’s abroad, except the two girls (who are to winter at San Remo)
are now en voyage homeward. William, their father, has been painted by
Holl. He is a good subject. Saw your sister B. (and kind Lombe); she writes
a charming letter to my wife; seems to hold her own wonderfully.
Cambridge, November 22, 1886.
Well, I have got safely through my seventy-sixth birthday, which gives a
sort of assurance. I have always observed that if I live to November 18, I
live the year round!
You are working at Euphorbs, etc.; I at Malvaceæ, in which I find a good
deal to do for the species, and something for the betterment of genera....

TO SIR EDWARD FRY.

Cambridge, November 13, 1886.


My good Friend,—Let me turn for a moment to our quarter-millennial
celebration of the foundation of our university, though you in Europe may
count our antiquity as very modern. It was an affair of three days,
culminating on Monday last, and was altogether very pleasant. You will like
to know that among the honorary degrees given, was one to Professor
Allen, of the Episcopal Theological School here, in recognition of the
merits of his “Continuity of Religious Thought,” which work, I am glad to
remember, you much liked. The Mother Cambridge sent to us the master of
St. John’s, Dr. Taylor, and Professor Creighton, of Immanuel College, to
which the founders and first professors of Harvard belonged. Mrs.
Creighton came with him, and we found them pleasant people. I suppose
Lowell’s oration, Holmes’s poem, and the doings in general will be in print
before very long, and I shall not forget to send you a copy.
We have been away from Cambridge very little this last summer and
autumn, only on very short visits, or one rather longer one to my birthplace
in the central portion of New York, where we had a family gathering.
There is a lull just now in your political situation. I certainly at your last
election should have gone against Gladstone! How so many of my
countrymen—I mean thoughtful people—approve of homerule, i.e., of
semi-secession, I hardly understand. But local government as to local affairs
is our strength, and is what we are brought up to. Also, our safety is in that
the land—the agricultural land—is so largely owned by the tiller....
We should like to see old friends in England once more in the flesh, and
the feeling grows so that I may feign a scientific necessity, and we may, if
we live and thrive, cross over to you next summer. At least we dream of it,
though it may never come to pass.

TO J. D. HOOKER.

Cambridge,January 18, 1887.


My dear Hooker,—Glad to see the “Botanical Magazine” figure of
Nymphæa flava †.6917.
There is something not quite right in the history as you give it. Leitner
was the botanist who showed the plant to Audubon, and gave it the name
which Audubon cites, and he died—was killed by the Florida Indians
—“half a century ago.” He was the “a naturalist” you refer to.
The whole history and the mode of growth, stolons, etc., has been
repeatedly published here in the journals, etc. See Watson’s “Index”
Supplement, etc. Not that this is any matter, even about poor Leitner.
Cambridge, January 25, 1887.
... Yes, it has seemed to me clear that you could not cross the Atlantic at
present. And so it logically follows that we must.
I had been coming to this conclusion, and only the day before your letter
arrived my good wife and I had put our heads together and concluded that,
if nothing occurred meanwhile to prevent, we would cross over, say in
April. It is time we set about it, if we are ever to do it; and several things
seem to indicate that this is a more favorable time than we can expect later.
As this will be “positively Dr. Gray’s last appearance on your shores,”
we must make the most of it. Shall we have a Continental jaunt together, or
shall you be too much tied to home?
Meanwhile I must work hard and steadily....
As you “weed out” surplus of herbarium Kew, keep them for me. When I
come I will take care of them. It is (as usual) good of you to think of us.
You have done so for so long a time that it is only “second nature”—very
good nature too.
Williamson, plant-fossil, long ago begged us to come to British
Association at Manchester, and be his guests. If I do, what think you of my
preparing a paper for Botanical Section; and will you join me in it? two
venerables—anglice old fogies—on Nomenclature and Citations.
There are some points I should like to argue out and explain; to put on
record, though it may be of no use. Not that one wants to get up a
discussion in such a body—that would never do....
Cambridge, February 22.
Thank you for sending me your edition of Bentham’s “Handbook,”
which looks well in its more condensed shape, and in which I dare say you
have put a good deal of conscientious work. But it seems to me that Reeve
& Company give it poor type and paper.
I am putting through a rehash of my “Lessons in Botany,”[140] more
condensed, yet fuller, and with a new name. This, with the companion book,
which I must live to do over, Deo favente, is the principal thing for bread,
and I need it for an endowment to keep up the herbarium here, after my
time.
Well,—don’t speak of it aloud,—we have secured our passages for April
7, and if I can get present work off my hands in time, we may be on your
soil soon after Easter.
You may imagine me very busy, indeed.
Yours affectionately,
A. Gray.
Dr. Gray, with Mrs. Gray, landed in England, April 18, and went from
Liverpool to stay at Sunningdale with Sir Joseph and Lady Hooker, where a
quiet, restful week was most pleasantly passed. He went to London the first
of May for a few days, meeting again old friends, dining with them, and
dropping in for calls, “to report himself,” as he said. He did a little work at
Kew, going back and forth; then crossed to Paris, finding at the Jardin des
Plantes what he had especially wanted to see, Lamarck’s herbarium, which
had been acquired since he was last there. It completed satisfactorily his
studies in Asters, as he had now seen everything of the genus to be found in
herbaria of importance.
A journey in Normandy with Sir J. D. Hooker had been planned for May,
but Sir Joseph was unable to leave England, so Dr. Gray arranged to go to
Vienna. He greatly enjoyed the railroad journey from Bâle, in May, the
fruit-trees white with blossoms about Lake Zurich, then the wilder
mountain scenery, and Salzburg, all bringing back the memories of his first
European journey forty-eight years before.

TO A. DE CANDOLLE.

Herbarium, Kew, April


23, 1887.
My dear De Candolle,—You will be a little surprised at the sudden
transfer of Mrs. Gray and myself to England; but I wanted a vacation and
one more bit of pleasant travel with Mrs. Gray while we are both alive and
capable of enjoying it. Whether I shall look in upon you at Geneva is
doubtful, but it may be, even for a moment. We never expect to have
repeated the pleasant week at Geneva of the spring of 1881.
We expect to go to Paris early in May, but subsequent movements are
uncertain.
Always, dear De Candolle, affectionately yours,
Asa Gray.

TO ——.
May 15, 1887.
I think the journey from Bâle, in Switzerland, to Salzburg was
wonderfully fine and a great success, and that May is a good time to do it,
while there is plenty of snow in the mountains. Lake Wallenstadt showed to
great advantage. And I had no idea that the pass of the Arlberg, from
Feldkirk to Innspruck, was so high or so very fine. I believe it is the highest
railway pass across the Alps. I was quite unprepared (which was all the
better) for the exquisite and wild, and in parts grand, scenery of the next
day’s journey through the heart of Lower Tyrol and the Salzburg
Salzkammergut, by a slower train, a roundabout road making more than
twice the direct distance from Innspruck to Salzburg, through the Zillerthal
and over a fairly high pass on to the upper part of the Salzach, and down it
through some wild cañons into the plain, from nine A.M. till five, of choicest
scenery. The great castle, so picturesquely placed in the Lichtenstein
(plain), is Schloss-Werden. Rainy day at Salzburg, or should have had noble
views. If the weather had been good, I think we would have driven from
Salzburg to Ischl, and then come by the Traunsee to Linz. But after all, from
my remembrance, it would hardly have come up to what we had already
seen. And though it was a rainy day for the Danube, we did see everything
pretty well, and most comfortably, in the ladies’ cabin of the steamer, with
windows all round the three sides, and most of the time the whole to
ourselves, or with only one quiet lady, who evidently cared nothing for the
views. J. says I was bobbing all the time from one side to the other. I was
looking out for the views which I had when going up the Danube forty-
eight years ago. J. thinks it not equal to the Rhine, but there is rather more
of it, or scattered over more space.

TO SIR J. D. HOOKER.

Hôtel Beau Rivage, Geneva,


May 24, 1887.
I do believe we shall have to return to America to thaw out. Here we
arrive in Geneva this morning, full of memories of delightful summer, ten
days earlier than this in 1881, to find snow down even to foothills of the
Jura and on Mont Salève; it came two days ago, and the air, though clear, is
very chilly, which is not to my liking.
Vienna was much better, excepting our last day, which had a cold and
high wind, and our night journey to Munich was cold and comfortless, in

You might also like