05.06.08

Python 3000

Posted in Kubuntu, pcsets, python at 9:20 pm by bmccosar

Last year, I learned to program in Python.  In just a few months, I’d written pcsets: pitch class sets for python.  However, pcsets has been stuck at version 2.0.2 for a good while now.  There are two good reasons:

  • That module was actually pretty well written.  I’ve been using it as a pitch class set calculator all this time, and never encountered a bug or unexpected problem.  I don’t really believe in the philosophy of “improving” something just to say it’s been improved.
  • Meanwhile, the Python language itself is actually being improved — for real — with Python 3000.

I’ve been following the progress of Python 3000 for some time, but really only wanted to start working with it when the beta release seemed to be around the corner.

That time is now.

Today, I compiled and installed Python 3.0 alpha 4.  However, this is still an alpha stage product, so I was very careful to make sure I didn’t accidentally torpedo my existing installation of Python 2.5.2.

Here’s how I did it

My system

Kubuntu Linux, newly upgraded to 8.04.  The python version I use is the Ubuntu version, which lives in /usr/bin.  From time to time, I may compile a newer version in /usr/local/bin, if the new version hasn’t made it into the repositories yet.

However, that places both areas off limits for an alpha.  Instead of either location, I chose /opt.  Here’s how:

./configure --prefix=/opt
make
sudo make altinstall

When this was done, I had installed the files and libraries under /opt.  Here’s the directory listing for /opt/bin:

mccosar (1) -> ~/Python/3000
$ ls /opt/bin
2to3  idle  pydoc  python3.0  python3.0-config  smtpd.py

There’s the converter program, 2to3, which should transform version 2 code into version 3.  I haven’t tried it yet.  The ‘altinstall’ option added the new python binary as ‘python3.0′.  However, I can’t help but note that ‘idle’ and ‘pydoc’ both would have clobbered existing installs! (Now you see why I’m so careful all the time . . . .)

That was the only bugbear.

Here’s my official first Python 3000 script, ever.  Note the altered form of the print() function — a function now, not a statement.

#!/opt/bin/python3.0

import sys

for fact in [sys.version, sys.path]:
    print(fact)

Notice the first line, the special shebang I’ve used to point to the new interpreter.  This script is just a sanity check — I’m checking to see if I’m talking to the correct interpreter, and the interpreter is looking in the right places for the right libraries.

mccosar (1) -> ~/Python/3000
$ ./template.py
3.0a4 (r30a4:62119, May  6 2008, 21:22:03)
[GCC 4.2.3 (Ubuntu 4.2.3-2ubuntu7)]
['/home/mccosar/Python/3000', '/opt/lib/python30.zip',
'/opt/lib/python3.0', '/opt/lib/python3.0/plat-linux2',
'/opt/lib/python3.0/lib-tk', '/opt/lib/python3.0/lib-dynload',
'/opt/lib/python3.0/site-packages']

Looks like mission accomplished to me!

And so begins the next version of pcsets — version 3.0.  I may not have improved the algorithms, but I’ve learned a few tricks that will make the module easier to use.

In Memory of Dorothy Blair (uploaded)

Posted in Jamendo, Points of Departure, ccMixter at 7:47 pm by bmccosar

I’ve just uploaded the original tracks for “In Memory of Dorothy Blair” (the fifth song on Points of Departure) to ccMixter.

  1. Bass
  2. Piano
  3. Synth
  4. Percussion

05.04.08

Love and War / World on Fire (part 1)

Posted in Jamendo, La vie sous la mer, Points of Departure, Uncategorized at 8:42 am by bmccosar

I am in the process of writing a series of articles about the songs on my fourth Jamendo album, Points of Departure. This is about the fourth track, Love and War / World on Fire.

You may be able to tell when you listen: the third song (Let It Burn) and this song are very closely related.  Actually, when you put the two of them together, you begin to see the outline of the original composition.

-1-

Love and War is the first part of the song, that plush, cinematic synth intro.  It’s about my wife, really.  Gentle as she is, it may surprise you to learn her favorite television series of all time is Band of Brothers.

No surprise, really.  Even though my wife and I are only two years apart in age, my father is a Vietnam veteran . . . and hers is a World War II veteran.

But more than that.  This move of ours to Virginia is a tough time.  I’m finding it hard to keep going.  Music inspires me, and pulls me out of the worst periods.  For Hannah, the story of Major Winters and Easy Company is inspirational.

My take on it in this composition (which is much shortened from the original) is that war, one of the ugliest things human beings can do, can set the stage for its exact opposite: the greatest heights a human can rise to.

And in parallel: this move, one of the worst times of my life, has actually seen me gain all sorts of abilities I didn’t know I had (like being able to put in a hardwood floor almost flawlessly).

-2-

World on Fire is the second part of the song, a rocking piece at 152 bpm with that wild, driving guitar line I came up with.  In the background, you can still hear the synth from the first part.  When I hear that sound, it appears in my mind like a shimmering curtain of fire — maybe a rapidly flickering aurora borealis, or even a rolling prairie fire.

The basis for this part is the struggle humans have against their worst natures.  I see it every day, from the broad, nasty strokes painted on the world news, to the fine, aimless doodles of the petty conflicts I see at school every day.  People like causing trouble.  Maybe the Shadows were right.

-3-

I discussed Let It Burn previously.  These three parts were composed together, but in the end, they fell into a natural grouping of (3, (1,2)).  Every time the transition point came up, it seemed like one of the songs ended, and another began.

I realized the tempo change wouldn’t fit — I was trying a clever shift from 92 bpm 16th note feel to 152 bpm eighth note feel, what I call a beat ratio shift of 23:19 (don’t ask).  I’ve only got that sort of shift to work once before, in Hypothermia / The Illusion of Warmth (from La vie sous la mer).  Simpler shifts on this album worked fine — Vale Avis Tenebrica pulls off a 2:3:2 (straight 8th, swing 8th, straight 8th), but that’s close enough to a standard compositional element it’s really not an exception.

Next

I’ve focused on the actual composition of the previous four songs.  The next one, In Memory of Dorothy Blair, has a long story behind it, which I’ll start after the Tuesday upload.

04.29.08

Love and War / World on Fire (uploaded)

Posted in Jamendo, Points of Departure, ccMixter at 5:19 pm by bmccosar

I’ve just uploaded the original tracks for “Love and War / World on Fire” (the fourth song on Points of Departure) to ccMixter.

  1. Bass
  2. Crunch Guitar
  3. Morpheus Synth
  4. Hammond Organ
  5. Percussion

04.27.08

Let It Burn (part 1)

Posted in Jamendo, Points of Departure at 6:49 am by bmccosar

I am in the process of writing a series of articles about the songs on my fourth Jamendo album, Points of Departure. This is about the third track, Let It Burn.

Today I’m giving you a look behind the scenes.

Many times, I have an idea for a song, a central theme.  I then try to build structures nearby that complement it, providing contrast or support.

All of this takes place in a setting I call a “songframe” (or “skeletune”).  I guess you could say it’s a rough draft.  I do not feel like I have to follow the frame 100%.  Actually, I’m lucky if I follow it 80%.  In the old days, I was a lot more specific on my songframe instructions; I found I ignored them.  So I gave up, and consider anything I write on it as suggestions.  The music takes a form of its own when it is played.

So first, let me present the original songframe (pdf, 32.8 K):

Let It Burn (structure)

If you look at the pdf file above, it’s a printout of a the spreadsheet I used to “block out” the sections of the song.  You can observe several things:

  1. The title, with the tempo clearly indicated.  I make it a policy to vary the tempo for each of my songs.  This helps me make sure any new tune “completes the set” on the album I’m working on.  (By the way, 92 is numberwang).
  2. Notebook references.  In this case, the settings for any instruments I use on the song will start in Notebook 17, page 22.
  3. The time tracker.  Before I discovered tools such as Renoise, this was the only system I had for estimating the length of a song in advance.  I try to make sure a song stays moving, and mapping out the musical landscape before I begin helps with that.
  4. Section Letters.  Since I learned to play jazz, I’ve become used to thinking of songs in “lead sheet” form, with lettered section names (A, A’, B, B’, C, in this case) as opposed to the more traditional verse, chorus, bridge and so on.
  5. Chords.  This is one of the rare sheets where I was intentionally vague with the chord structures.  If you’re familiar with my other compositions, you know it’s not unusual to find chords like B7 / G# (G# phrygian), Dmaj13 quartal, or Ebmaj7+.  However, here, I’ve gone with simple power chords.

“Let it Burn” was meant to contrast with the second song, “Vale Avis Tenebrica”.  Vale is almost a hymn; Let it Burn is . . . well, we will say unforgiving.  It’s the actual end of the world, not some hypothetical abstraction.  My viewpoint character is Surtr, the fire giant who waits in the south for Ragnarok to begin.  And begin it does . . . in bar 11 of the song.

04.25.08

Csounds

Posted in Csound, Jamendo, Linux Audio, Points of Departure, ccMixter, music theory at 7:34 pm by bmccosar

One of the best discoveries I’ve made in Linux Audio is actually older than Linux itself — and isn’t restricted to one platform.  It’s Csound.

The more I explore it, the more I find.

For the past few months, most of my free time has gone to home projects.  My wife and I are moving to Virginia in less than two months.  We had to get our house ready for sale (in one of the worst markets to come along in years).  We’ve put a lot of effort into getting this place perfect.

But at last, most of the hard labor is done.  I’ve actually got time to work on music projects again.  And there are plenty.

ccMixter

I’ve been uploading the original, individual instrument tracks to each of the songs on Points of Departure to ccMixter.  Although I’ve been a member there since February 4, the tracks I’ve uploaded have gone mostly unnoticed.

However, I’m not uploading them for immediate gratification.  After all, I have the finished product.  The tracks are available for the long term.  My hope is, someday, someone who gets interested in my music will find them and be able to build something, learn something, or create something based on my work.

Well, I signed up with a new collaborative project on ccMixter called Random Ambient.  Since I’m dedicating a lot of time to creating new Csound instruments, I decided I could make a positive contribution.  Moreover, the project will give me incentive to be creative in my designs.

I uploaded a set of samples I called Superterrains (you can read the technical details on my Csound blog).  Amazingly, within a few hours, I already had my first review [!] and 3 recommendations.

I seem to be on to something.

Microtonal Music

At the other end of the universe, away from the mechanics of sound production, there is the theoretical side.  If you’ve been reading this blog, you know I got into atonal composition methods (adapted to jazz improvisation, believe it or not) and pitch class sets.

Now I’m going beyond the 12-tone scale.

I have found two new scales that have interested me the most:

  • 19-TET, or 19 Tone Equal Temperament.  Imagine the octave divided into 19 equal steps: a world in which C# and Db are separate notes.  Already interesting!  But still familiar enough that we can use familiar terms.  On the other hand, there is
  • The Bohlen-Pierce Scale.  A completely different concept.  Abandon the octave, and focus on the tritave, in which notes a tritave apart have a frequency ratio of 3:1.  Now divide the tritave into 13 steps to get the BP chromatic scale.

Csound makes exploring this region possible.  I do not have a 19-TET guitar or a BP Hammond Organ.  On the other hand, if I want to try out ideas in 19-TET or the BP scale, I can do so easily through Csound.  (And in fact I have — follow the links in the previous sentence).

The Woodshed II

About a year ago, I quit recording music for about 3 months, and worked on developing new musical skills.  I’m about to do the same thing — for different reasons.

When we cleaned up our house, I packed away all my recording equipment.  Honestly my room looked a bit like Darth Vader’s Bathroom, or maybe a studio apartment furnished by The Borg.  All those cables, panels of blinking lights, and mysterious boxes with wires coming out — not exactly presentable.

During the move, I’m going to — literally — be without a musical home for a while.  I will carry such instruments as I can pack / unpack easily (and fit into the car).  The rest will remain locked away.  I will focus on bass, guitar, and keyboard.

Starting tomorrow.  And continuing until my world comes back together.

The Long Goodbye

I have a laptop, so I can keep working with Csound.  What I may not have is a reliable internet connection.  So, really, I need to finish everything I’m doing online by the end of May.

Leaving home is not easy.  Finding a new place, less so.  I haven’t had to do that in 16 years.

But leave behind music?  Never.

04.22.08

Let It Burn (uploaded)

Posted in Uncategorized at 7:28 pm by bmccosar

Today I uploaded the original tracks to Let It Burn — the third song on Points of Departure — to ccMixter (see this earlier post for an explanation). Here is an index of the relevant tracks:

  1. Bass
  2. Guitar (crunch)
  3. Guitar (overdrive)
  4. Percussion
  5. Synth
  6. Hammond organ
  7. Sonar

I’ll be continuing my series of articles about the songs on the album this week as well.

04.17.08

Vale Avis Tenebrica (part 1)

Posted in Jamendo, Points of Departure at 4:43 pm by bmccosar

I am in the process of writing a series of articles about the songs on my fourth Jamendo album, Points of Departure. This is about the second track, Vale Avis Tenebrica.

There’s a secret to this song. I’m not telling. Maybe one translation is “Bye bye, blackbird”; maybe a better one is “Farewell, Bird of Shadows.” Maybe it has to do with depression, and covers a theme Poe would appreciate; or maybe it’s the end of the world. Maybe it’s beautiful, but lonely.

At any rate, it has pretty chords.

They are unusual. I divide them into three sections, which I’ll call “A”, “B”, and “C”.

Section A

This song is in 6/8. The “A” section has the bulk of the melody. There are two similar, yet contrasting chords (see my page of chord abbreviations for a guide):

BΔ, B/C BΔ, B/C
BΔ, B/C BΔ, B/C

B/C is a strange chord — pretty when you want it to be, tense and eerie when you want it to be, jittery sometimes, alien most of the time. Here it’s like the crest of a hill on a roller coaster ride — or, more accurately, the high point of a bird in flight.

Section B

The chorus has to be one of my favorite chord progressions. I have played variation after variation of these changes, mostly during the Christmas break of 2007.

GbΔ/Db GbΔ Gb/F EbΔ+

It all leads up to that floating EbΔ+ in the final bar. It’s a magic gateway — you can go almost anywhere from that chord. At the end of the first chorus, I return to the beginning. The second time through, however, the entire song changes — not only the chords, but the rhythm as well, from 6/8 straight to 6/8 swing 8ths.

Section C

Realize that long ago, I gave up on the concept of sticking to a key. When we leapt out of B major in Section “A”, we landed in Gb major, then marched through two others. Now, the cool thing about that is: notation-wise, I went from five sharps, to six flats, to . . . well, now, 2 or 3 sharps. For the next 16 bars, I modulate between some big quartal chords, Em7 and Dm7 (quartal = voiced with stacked 4ths, not stacked 3rds).

Em7 Dm7 Em7 Dm7 x 4
DΔ13 A13 B7/G# %

Over the Christmas break, I worked on my left hand / right hand coordination. One of the products of that was the ability to play huge 13th chords. However, they have to be used in the right place — they are far too powerful to be dropped in just any tune. They occupy a lot of sonic territory. The final 3 chords, above, are a modulation back to our starting key, through a phrygian chord (B7 / G#, which could also be called Absus-b9).

The Return

From the phrygian chord, the song returns to straight 8ths and the top of the tune, ending on the EbΔ+ chord.

04.15.08

Vale Avis Tenebrica (uploaded)

Posted in Jamendo, Points of Departure, ccMixter at 6:22 pm by bmccosar

Today I uploaded the original tracks to Vale Avis Tenebrica — the second song on Points of Departure — to ccMixter (see this earlier post for an explanation).

I am continuing my series of articles about each of the songs on the album, as well. So far I’ve covered Falling Into the Dream (part 1, part 2).

Yesterday I checked my download and listen stats on Jamendo. Unbelievably, I’ve had over 115 downloads of the new album so far. If you were one of the many people who stopped in to listen, I thank you!

Anyway, here are the links to the new tracks:

  1. ccMixter - Vale Avis Tenebrica (1 of 4: Bass)
  2. ccMixter - Vale Avis Tenebrica (2 of 4: Hammond organ)
  3. ccMixter - Vale Avis Tenebrica (3 of 4: Piano)
  4. ccMixter - Vale Avis Tenebrica (4 of 4: Rhythm Midi)

04.11.08

Falling Into the Dream (part 2)

Posted in Jamendo, Points of Departure, music theory at 10:22 pm by bmccosar

I am in the process of writing a series of articles about the songs on my fourth Jamendo album, Points of Departure. This is the second article, about the first song.

For years, I’ve been keeping a music notebook. Not online: old school, the kind with actual pages.

I’m up to Notebook #18. Over the years, I’ve written down my ideas, planned my practice routines, composed songs, developed exercises to boost this or that skill.

Therefore, I can look back and trace the exact steps that led to “Falling Into the Dream.”

The song was born on 12-November-2007 (Notebook #17, page 24). I started with a drum pattern, and developed that synth line you hear on the album. It’s simple, but it’s the theme that ties the whole thing together. From the theme, I built the chords; from the chords, I developed the melody.

The key elements are the notes Eb, G, and Gb, which belong to the prime pitch class set 014. One of these three notes always provides resolution. Sometimes, they resolve without moving!

Example: if you look on the sheet music, the first verse takes place over the chords Cm7 and B9#11.

The synth part goes Bb - A - G - F - D#. However, D# is enharmonic to Eb. Therefore, the resolution note is from the 4th of Cm7 to the major 3rd of B9#11.

But the human mind is an odd thing. I’ve found, over the years, the mind tends to remember the last note that was played before the resolution, and to ‘carry over’ the previous chord a bit into the next one. There’s a little bit of a feeling about the 4th of Cm7 resolving to the minor 3rd of Cm7.

Something happens when a note resolves to a consonant tone in the current AND previous chord. There seems to be an extra bit of movement. It reminds me of the Alfred Hitchcock ‘Dolly Zoom‘ — movement without movement, a static foreground against a changing background.

Here, that D# (major 3rd of B9#11) vs. Eb (minor 3rd of the previous chord, Cm7) works in the classic jazz tritone substitution of the V chord. The sequence also works as Cm7 - F7alt.

Now look at the melody. There are four notes around the transition: “in - to the dream” (G - F - F# - F#). This is a stronger resolution, with a bit of suspense. G of course is the 5th of Cm7. The target, F#, is the 5th of B9#11. Normally, that’d be pretty boring! But the F brings it all to life.

First, F is the #11 of B9#11 — a bright, vibrant color against an already tense chord. It’s pretty, but a relief to land back on F#.

Second, the memory of the Cm7 is there. F is the 4th of Cm7 — we heard it in the previous bar, played by the synth. But here it is, in the next bar, paving the way to F#.

Finally, the entire sequence G - F - F# is an enclosure (as defined by David Baker) — two notes that approach the final note chromatically, from above and below.

Putting it this way, it all sounds pretty sophisticated. It’d be even better if I’d planned it ;-) However, the actual melody was improvised in the car over the course of about two weeks, during my morning drive in to work.

So where did it come from, really?

Remember I said I was on Music Notebook #18? Most of the early ones were nothing but practice routines. The patterns I use, the music I construct, is all built from past experience. I remember back in 2005 I put in about 3 solid months of focusing on ornamenting melodies using a variety of techniques. Enclosure was one of them. Over time, it just became part of who I am as a musician.

Theory is good. But practice is better ;-)

« Previous entries