Showing posts with label pd. Show all posts
Showing posts with label pd. Show all posts

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.

7/6/09

Sorry bout that

Sorry for being gone for so long. I'm sure my "loyal readers" were wondering what's been happening in my compositional world. here's the summation:

the opera previously discussed "Cake" was finished in piano redux form and performed April 3rd and 4th, one show at Brooklyn College, the other at Jimmy's No. 43 in Manhattan. "Cake" runs about 21 minutes in its current form. It was presented along with other one act operas and opera scenes by Remarkable Theater Brigade in conjunction with Brooklyn College.

In addition to composing "Cake," original story by Eileen Wiedbrauk (speakcoffee), i staged directed two shows; the final scene from "The Ace of Diamonds" composed by Whitney George, and "No Shoes, No Skirts, No Service" written and composed by Marie Incontrera. It was the first "professional" directing debut in NYC and i think it went pretty well. I was a bit rusty at first and with school, work, and composing (as i was writing up to the last second, and past the last second a week or two. lol) so i felt the overall design was a bit lacking, but i still stand by my work.

On top of that, the decision was made to use projection as the scenery. Since its what i do professionally, i stepped in to work out the technical details. That went perfect smoothly. I think i would do it slightly different next time, since there was a mixture of video and stills, but i manuevered everything alright. i would probably use a program like QLab next time. Programs like that are set-up to load just about any sort of media cue you'd like. I haven't used QLab too much yet, but i haven't had many chances either.

During the opera production, EM-NY's bi-annual occurred, i think the week of March 16th or something like that. it all blurrs together for me. As usual, i had a piece performed, "Brooklyn Bridge Blues." This was my first truly mult-media piece. I shot low quality video (on purpose) of my travels to and from NY from NJ, including an "artsy" shot of some cables swinging between the cars next to the wheels on the train. With that, I composed an electronic piece as a soundtrack. These were two firsts for me. I've done camera work and a little film editing now and then, but never taken 15+ different 2-3 minute segments, cut, spliced, faded, etc a 9 minute movie from those segments. Amazingly, it was easier than i thought. I used Final Cut and was amazed how easily my skills in audio editing translated to video editing. I'm still missing all the fine points of video editing and video in general, but i at least put together a pretty good looking movie.

And i've never really tried to do a soundtrack. It was an interesting process. There were times i was dead set on trying to get interesting things to line up and other points was far more interested in the compositional process. I used mainly sounds taken straight from the videos. I also stole a bass line and screwed it up large amounts. it wasn't stolen by the end. lol. Then, i read some Kerouak, and had a little interactive program slinging out short 2 second samples of NYC based musicians.

Let's see...after that i wrote a piece for David Whitwell, a fabulous trombone player in NYC. He wanted something with electronics, so i came up with "ALNT" or "A Little Noise in the Trombone", titled in honor of Pauline Oliveros (in case anyone had any questions about that. lol). It basically is an evolution of trombone playing, starting with simple overtone exercises then running the major western art music trombone playing styles, ending with an improvisational section. I put the whole thing together as a graphic score using Scribus, an open-source desktop publishing program. Took me a minute to get the hang of it, but since i was already familiar with InDesign, it didn't take too long. The electronics also followed a concept, running from a basic bass line to harmonization, complex FM modulation resulting in harmonic overdrive, and finally into noise run through a bandpass filter where the center frequency follows the trombone improvisation and the Q follows the intensity of the bass line. It's an impressive bit of programming. No idea how long it took me to put it all together, but the bassline took some work, as did figuring out the harmonization. I finally settled on a single side band modulation style. it doesn't work great, but i'm still a novice programmer.

Finally, i did a "party" piece entitled Urban Tribes. What follows are the complete instructions.

"Urban Tribes"
for Dancers, Drummers, Warriors, and Disklavier, and 4 mics. PD Patch is included.

There are three roles. 1) Dancer 2) drummer 3) warrior. the first two are self-explanatory. the third comes later (and its something we're not using this time around). There is no time limit, though a minimum of roughly 7 minutes is preferable. All percussion instruments should be "found" instruments: paint cans, paint buckets, sand pails, trash cans, kettles, oil drums, chairs, break drums, car doors, etc. All instruments are beaters are to be strewn in the performance area. The disklavier (or synthesizer) is triggered by a pd patch controlled by 4 microphones. the 4 microphones should be placed at the parameters of the performance space. Each member of a tribe should wear something to identify them as a member of the tribe.

1) at the start of the piece, the first "leader" yells "Let's go!" At that point everyone stops whatever they were doing and bum rush the stage. Drummers grab a bucket, can, or whatever. Dancers run to the middle of the stage and get set for fun. Whoever ends up with the biggest drum is the drum leader.

2) Start up a drum circle! if you've never done one, the basic idea is everyone gets together going on the steady beat the leader starts. the leader then sets a basic ground rhythm and everyone else moves in and out, sometimes soloing, sometimes playing with the leader, or sometimes syncing into smaller groups.

Dancers, start dancing

Warriors are hidden as drummers to begin

3) everyone minute and a half to three minutes the current leader yells "SWITCH!" at that point everyone drops their instrument and grabs new instruments. OR people can change their role from dummer to dancer. Warriors are fixed and are to remain in "hiding" until needed. One big key is that the beat must NEVER stop. A new leader is crowned by whomever ends up with the biggest drum.

4) everything is a drum. use everything that happens to be around you, even other people if necessary, to keep the beat moving!

5) Separate Tribes. if a large amount of people are participating in the piece (30+), they can be separated into separate tribes. One tribe would begin the piece as normal and the second (or third, fourth, fifth, etc) would gather in separate areas. once the piece begins, All tribes are considered hostile. The point is for each tribe to try and take control. There are several ways to do this. A) The tribes can try and steal unused percussion instruments to start their own competing drum circle. B) Tribes can steal instruments being used from other tribes and start a drum circle. C) Tribes can sneak into a drum circle and try and completely throw off the groove, make changes, or even prevent other people from playing. D) get members to defect from one tribe to another.

The main goal of each tribe is to be the most important tribe with the largest circle and most dancers. This can become full contact. that is perfectly allowed. whoever is the largest, loudest, and strongest group at the end of the piece wins.

Warriors job is to prevent any hostile takeovers, theft of instruments etc. The warriors should stay hidden until an attack. Warriors should also be the ones doing the attacking, taking drums, getting people to defect, and generally causing havoc.

6) the disklavier is a commentator, completely unaware of the reality of the situation, but somehow thinking it is qualified to tell us all about it.


Feel free to perform the piece as you wish, just e-mail to get the PD patch. it's a simple bit of programming, and you'll need something with 4 mic inputs as your ADC. I used a Digi 02. Yeah, that was a crazy piece. We had like 20 people jumping around on stage just getting crazy till i yelled "It's the fuzz!" I even made up a song when the digi 02 crashed and i had to restart the whole computer (LAME!).

On top of that, i submitted my opera as my masters thesis, got it approved, and, supposedly, i've graduated. I guess. Haven't officially heard anything. So, yeah, have a masters, fat lot of good it does me. lol. Anyway, that's about it. I'll prolly update again in 10 months or something!