3/15/14

Music, Mathematics, and Logic

And, no, not the DAW.

For the past week, I've been working on learning LilyPond and Frescobaldi. LilyPond is text-based music engraving software. Frescobaldi is a front-end interface that helps speed things along, with quick insertion, a code snippet repository built in, auto-fill typing, and a preview window that links to your code. Incredibly handy for spotting errors.

LilyPond is entirely programmed in C++, so it constitutes the second time I've learned a C-style environment (The first being CSound, which is C). It was not the first time I've delved into learning a C++ environment, as I had attempted to learn the basics of C++ several years ago. I also had attempted to learn LilyPond several years ago, and gave up after a couple weeks of banging my head on the desk.

It's amazing what a couple of years can do. The LilyPond has been greatly improved, and Frescobaldi improves my workflow. There are still some nit-picky things I don't like about the formatting before tweaks, but they're not a big deal--straight out of the box, LilyPond can create a usable, and relatively aesthetically pleasing score.

All this is lead up to the real issue at hand--Music, Mathematics, Logic, and computer programming

***************************************

A conversation popped up on my Facebook feed a few days ago regarding the importance of learning mathematics, from algebra through calculus, in HS. The question was posed "How many of you use algebra, geometry, trig, or calculus in your day to day lives, or in your professions?" The string of answers came in, ranging from "Never, it's pointless," to "Use algebra regularly, but there are a lot of programs that handle the math for you."

Here are my answers:

as a matter of fact, yeah, most every day while I'm attempting to do programming. having not taken calculus at any point, I'm really far behind in a ton of ways. I'm struggling horribly making command protocols because I don't have the math background needed.
It is definitely worth taking, because it allows you to pursue sciences. Definitely tell every younger person I know to load up on math. It doesn't hurt to learn it, and if you don't, you are limited by what you can later achieve. I seriously kick myself every day for thinking that as a musician I'd never need math. But you never know what life brings you, so it's best to be prepared. 
14 y/o me never would have believed 30 y/o me that I'd spend 8+ hours a day learning a programming language. Never would have believed I'd write my own (unsophisticated) program for generating music. 
It's worth it in so many areas--don't limit your future because it may not be used. Because if you don't have it, you'll definitely never use it.

And later:

I think treating education as a "learn only what you have to know to do X" instead of "learn all that you can so that you can do whatever you may pursue in the future" is dangerous ground. It assumes we know exactly what we'll be doing the rest of our lives, and limits us to that one early decision. It's harder to do when you're older, if the opportunity arises. And, if something doesn't work out, and you need to change paths, having a wider base of knowledge to draw from really helps facilitate that change.
*********

There's a huge amount of truth in my statement that 14 y/o John never would have believed 30 y/o me about what I'd need to know. I've done some posts chronicling my HS, undergraduate, and graduate career, with tidbits of advice. I've grown a bit as a human since those posts (and definitely as a writer), and there are a few things that I've come to understand.

First, that 14 y/o John had no real idea what was best for future John. He thought he did, and so did all the people giving me advice. But, in the end, no one is clairvoyant, no one could see that I'd spend a week of my time learning C++ to do musical engraving. 14 y/o me would never have been able to fathom writing a solo cello piece, let alone being fed-up with how slow and bulky engraving is in Finale and Sibelius. He never would have understood when I learned how to engrave in Inkscape because notation software handles proportional notation horribly--especially if you're using ruler measurements not note-spacing (this should happen in 1.7mm as compared to this should happen every X amount of notes).

17 y/o John had petitioned his HS to allow him to take a compute programming course at a neighboring HS. They offered a C++ course, and he was very interested in getting into programming. He'd been an avid gamer (and I still am), and he felt like learning how to program might be a good step in that direction. His petition was rejected, and he took a course on "Business Computer Applications," which taught him little he didn't know--the introduction to Access was helpful, but the other 3/4 of the class--Word, Excel, and building a Geocities site--he already knew how to do (spoiler, I had a Geocities site before that class, and ended up having two! That's right, I had 2 Geocities sites!).

But before that, HS John was making mistakes. He had decided to take jazz band, band, and even choir instead of math courses. He never took anything beyond Algebra 2 as a sophomore. He was on the path to take Calc as a senior, but decided that "as a musician, I would never need this."

He was wrong.

In undergrad, as a music education major, there is not much wiggle room in the curriculum. The basic music curriculum is fairly open ended, but any and all free time is taken by the music education curriculum. Unlike in HS, where I felt 14 y/o John made mistakes, 18 y/o John didn't make any mistakes in his curriculum choices. There is no regret about taking conducting II, all the instrumental methods courses, or even the three 300 level lit courses 21 y/o John took in a desperate panic to graduate with a general music degree.

But still 21 y/o John had no idea what 29 y/o John would be doing.

My masters was much the same as undergraduate. Perhaps the one course 24 y/o John should have taken is the post-tonal theory course instead of the easier 20th century performance practice course. But even that course was great, as I got to work with  fantastic performer and scholar Douglas Hedwig. I learned PureData, tried learning CSound on my own (and failed), and started to see the deficits from my early educational mistakes.Still 24 y/o John only had an inkling where 30 y/o John was heading.

Flash forward, 28 y/o John is working on an interactive installation. He sees a major flaw in his plans--he lacks the skills to get the separate computer programs talking to each other. He scours the internet, finds bits of advice, but most of it is far beyond his understanding. His grasp of Java is weak (and it still is), and even though the programs have similarities, he's just not able to figure things out. The biggest sticking point? The underlying math, logic, and programming skills

Flash forward, 29 y/o John is trying to create a program for algorithmically generating music. It's something he's been intrigued by since 20 y/o John had met David Cope. 20 y/o John could grasp, conceptually, what Cope was doing, but had no idea how it worked. He filed it away for future reference. 24 y/o John had dabbled, and realized he had no requisite skills.

29 y/o John found himself locked in a lab while on a Fulbright, fighting the issue that he wanted music to be generated in real time during his dissertation. He wanted the computer to play an integral role to the development of his opera.

29 y/o John made the realization that 27 y/o John had a feeling about, 24 y/o John had an inkling, 21 y/o John had a small clue, 17 y/o John had a dream about, and 14 y/o John had absolutely no idea existed in the world--that without higher mathematics, his ability to program control into his patches was doomed.

So, 29 y/o John learned what he could. He read up on Markov chains, different processes for generating large amounts of data based on constraints, math, math, math.

He threw his mouse more than once. There was a couple months where he subsisted mainly on coffee, cigarettes, and bourbon. But he learned...

Just not enough.

Now I sit here plugging away at LilyPond. It's much easier than when I was teaching myself HTML and CSS at 17, then again in undergrad. It was easier than learning Pd in class during my masters. It's easier then when I tried to learn CSound, LilyPond, and Processing on my own, and failed at each. Each language builds off the last. Each bit of mathematics I learn for a project, builds and builds...but I still have no real understanding of calculus, or how to model higher mathematical functions. When I look at complex answers for fixing spacing in LilyPond, I blanch. No, it'll be easier for me to fix as an SVG. When I still think about creating a program to generate music notation in real-time, my heart races, and my thought is "Must.Find.Programmer..." (this is no longer a part of my dissertation, as it has evolved in a different way since those thoughts).

All this comes back to what 14 y/o John thought was going to be best for me. He was wrong. As are most HS students. Even those with the best intentions are often wrong. I've learned that the only thing I know for certain is that I have little idea what my future self may need to complete any given task.

So I offer this advice--do not choose an educational path because you think you want to do "X" for your entire life. In HS, push yourself and take the advanced courses. It's not to say that all the playing and singing didn't help prepare me to be a musicians, but in my choice to specialize early, I've come to realize that I succeeded in specializing--almost too well.

If you have the chance to learn something, learn it. Learn algebra, geometry, trigonometry, and calculus. Learn programming languages and mathematical logic. Learn to sing, dance, play instruments, paint, carpentry, plumbing, circuits, and electricity. Make your choices to learn one of the other when you have to, but do it for the right reasons. And never choose not to learn something because you don't think it will be valuable.

That was the real choice I made--not to learn to play jazz, or to learn to sing in a group. My choice was I did not think calculus, statistics, or any other math was going to be valuable. That may seem like a semantic difference, but it's really not. I made the wrong choice because my reasoning was wrong, not because math is more important than jazz band or choir.

Never miss a chance to learn--it's those missed opportunities that will haunt you later.

2 comments:

Dave MacD said...

John, I really like your idea of just learning everything you can and seeing where that leads you. In some ways, it's a bit like learning an instrument. You want to be completely unencumbered by your technical facility with the physical object, so that all of your decisions about how to play a piece are made on aesthetic concerns.

Also, knowing stuff is cool. It's much cooler than not knowing stuff. Internet activist Aaron Swartz wrote "Be curious. Read widely. Try new things. What people call intelligence just boils down to curiosity."

I'm currently nibbling around the edges of learning Node.js (server-side Javascript). I don't have a specific project in mind, but I think it could be really cool to get realtime interaction from a web browser into a piece. Mobile browsers even expose the data from the phone's accelerometer! (Chew on that for a bit. Just direct somebody to a URL, and their phone is suddenly a piece of a musical instrument. Dang.)

John Chittum said...

I've seen some really nice projects using Java for interactive works. I believe the cloud synth in Auksalaq, the telematic opera by Matthew Burtner, is done in Java.

http://auksalaq.org/main/

I helped test drive the set-up several years ago, but some of the specifics escape me. But the things happening in music and technology are really exciting. I've seen a few cell-phone style setups for various interactive multi-media projects. One of my friends, Jacob Garbe, has been doing some cool stuff with augmented reality and narrative installations.

Definitely jump in and learn everything. It's funny, I'm not all that old, but I feel years behind in pursuing these projects. But all you can do is keep learning, challenging yourself, and growing as a person. Since I'm not one to give up on ideas, I just grumble and complain like an grump but keep on plugging away.