Monthly Archives: May 2013

Dusting off My Saxophone

Zoot the Muppet

When I was in junior high school, my parents bought me a lovely alto saxophone and I started playing in the junior high and then high school bands. Mostly it was a lot of honking and such, but I had fun. I tried playing a little more in college but quickly gave up on that. I essentially put my horn away more than 20 years ago.

Then, for Christmas last year, Jacque (you know, my wife) took my horn to a repair person. Over the decades it had become torqued (a natural thing for saxophones to do, what with all the holes on one side) and essentially unplayable. It got completely disassembled, straightened out, tightened up, and made fabulous all over again!

A few months after that, I decided that I needed to take lessons again. And so, on 29 May 2013, at 2:00 PM, I met with David Hall – the same man who resurrected my horn – and recommenced my musical training.

The good news is that I could actually play a little. I could even get a reasonable tone out of it. Woo hoo! And now, I could say much more, but I have to go practice.

Tagged , , ,

Arduino Final Project: Distance LEDs

Well, I hope this will take care of it for now. I have completed (what I hope is) my final project for my independent studies class in Arduino. The idea behind this project is simple. I wanted to use both a sensor and an actuator of some kind (i.e., both physical input and physical output) and I wanted to use something that could, in a very rudimentary way, lay the groundwork for using Arduino on stage during dance performances as a way of manipulating some aspect of the set. In order to keep things simple and transportable, I decided to use a distance sensor – an Ultrasonic Module HC-SR04 Distance Sensor For Arduino from Amazon, in this case – for input and plain old LED lights as my output.

The sensor reads the distance of objects in front of it and converts those measurements to inches. If the serial monitor in open, the distances are shown, although they jump around a lot. I understand that such fluctuation could be the results of a $5 sensor but could also have to do with fluctuating power supply from my laptop USB. It could also have to do with the actual code that I used, as I decided to forgo the use of a library in this one to keep things simple. Anyway, the measurements are generally accurate. If the object is less than 72″ (6 feet) from the sensor, the green LED lights up. If the object is less than 12″ away, the white LED also lights up. Finally, if the object is less than 4″ from the sensor, then the red LED joins in. Simple but it works.

As with all of the exercises that I completed for the book Getting Started with Arduino, the code for this sketch can be downloaded from (you’ll want the “Distance_LEDs” folder, in this case).

And with that, I think I have finally finished all of the work to get the Art Technology Certificate from the University of Utah Department of Art and Art History that was the purpose for my 2011-2012 sabbatical. Woo hoo!

Tagged , , , , , ,

GSWA 6: Talking to the Cloud

Okay, chapter 6 of Getting Started with Arduino, “Talking to the Cloud,” has been the bane of my arts technology existence. I did most of this chapter about three weeks ago and couldn’t get it to work. The problem is that the book as a whole seems to progress like this:

  • Chapter 1: No real information
  • Chapter 2: A tiny bit of information but no practical work
  • Chapter 3: A tiny bit more information but still no practical work
  • Chapter 4: A tiny bit of practical work
  • Chapter 5: A little bit more practical work
  • Chapter 6 (this chapter): About 1000% more complicated than all the rest of the book put together
  • Chapter 7: A tiny bit of information to wrap things up

It really felt like getting thrown into the deep end. However, I finally got it to work. Here is the chronicle of my adventure:

  • Copy and paste code into Arduino and Processing IDEs (because this one uses both).
  • Get intractable errors in Processing because the code was written for v. 1 and we’re now in v. 2
  • Spend much time searching the web, determine that all of the Java libraries must be installed manually
  • Get the Processing code running (see first photo above) but get such miserably low numbers for output that no light would be detectable
  • Revise Processing code to search for more common terms with the hope to being able to see things (see second photo)
  • With Processing apparently working right, turn to physical components of Arduino
  • Reconstruct the physical circuit because I took it apart after three weeks (having even schlepped it around with me in a box on the bus and train from Salt Lake City to Orem)
  • Plug the Arduino board in to my computer
  • Have the Arduino shut off and get alarming error message from computer (see third photo)
  • Spend much time fiddling with USB connection, pull out brand new, back-up Arduino board, plug it in and see that it works, recreate circuit on new board, get same problems, notice lots of heat on bottom of first board, think that I have destroyed things, fret much
  • Search web for help and learn that there may be a short-circuit (without even really knowing what this would mean)
  • Eventually discover that I put the ground wire on the same positive rail of the breadboard as the power. Oops.
  • Put the ground wire on the negative rail (the way the illustration told me to do it in the first place), board powers up, problem solved.
  • Back to Arduino IDE, compile and upload sketch, have lights blink to indicate successful upload, but see nothing happening with LEDs
  • Mess around with light sensor and the button on the breadboard to no effect
  • Check the serial monitor in Arduino and see a steady stream of strange data that is absolutely not in the right format
  • Read book again, see “important message” about serial port selection
  • Go back to Processing, uncomment code that lists serial port connects and find that my Arduino is connected to port 5 and not the expected port 0
  • Change port in Processing, rerun sketch, and suddenly see much blinking on Arduino board
  • LEDs light up! Button turns them on and off! Success! (See last, triumphant photo above)

Okay, that was not fun but I was convinced that I would never make it work so I feel very, very happy now. And I already finished chapter 7 (although I haven’t yet posted it to this web page because I’m an extremely linear guy), so I’ll post this chapter, post that one, and then try to do a small, creative project (which I have been planning – more or less – for a few weeks), and call it quits. But here we go for now!


  • Getting Started with Arduino, 2e, Ch. 6: Talking to the Cloud (1 exercise – but a really, really big one)
  • Sketches (i.e., code) can be downloaded from
Tagged , , , , , ,

Sappho in Max/MSP: Poetry, Sound, and Programming

I am an experimental psychologist and data analyst with a bent for poetry and art. I have also long been a fan of the Greek poet Sappho. Consequently, for my final project in my independent studies course on Max/MSP/Jitter, I decided to create a small piece of programmed art based on her work. I took one of her poetry fragments – written in Greek about 2500 years ago – and three modern translations of it, by Jim Powell, Kenneth Rexroth, and Sam Hamill, respectively. The patch is only minimally interactive in that the user simply presses “Start” but there is a lot of coding underneath that. This first YouTube video is a demonstration of the finished patch:

This second YouTube video provides a technical walkthrough of the project:

Here’s the text version of that explanation (more or less). I wanted to have audio recordings of the three versions of the poem. Because I could and because I thought it would make a nice contrast with the extreme earthiness of the poem, I decided to use computer voices. I chose three of the voices that come with Macintoshes: Tom, Vicki, and Whisper. For each poem, I put the text in TextEdit and, in the TextEdit > Services menu, chose “Add to iTunes as a Spoken Track.” (I think I added that function at some point but I can’t remember when or from whence it came.) From there I converted each of the computer voice recordings from the default iTunes AAC format to a more-Max-friendly AIFF format and added them to the same folder as the Sappho patch.

In order to control the playback of the various items, I created a qlist object that would contain all the timing information and remote sends to the various objects. In each case, this started the background sounds first (for 5 seconds) and then the voice recordings (about 10 seconds), with the background continuing for about 10 more seconds after that.

Variation 1 uses Seashore sounds (MIDI 123) because, you know, Sappho lived on an island. These wave sounds are all the same length (3 seconds) but they start at randomized times (2-7 seconds apart) and play with randomized velocities/volumes (50-80 on a 0-127 scale). Those variations make the artificial MIDI waves sound a little more realistic.

Variation 2 uses a Greek instrument, Pan flutes (MIDI 76), to plays loops of a descending scale, as descending is more in line with the melancholy feel of the poem. The scale is D minor for two reasons: the minor scales are identical to the Greek Aeolian scales and, as we learned from Nigel Tufnel in This Is Spinal Tap, “D minor… is the saddest of all keys, I find. People weep instantly when they hear it, and I don’t know why.” The MIDI notes for the scale are contained in a coll object and are referenced in a looping manner by a counter object. Like the waves in Variation 1, the notes in the descending scale start at randomized times (1-3 seconds apart) but stay in order and have randomized velocities/volumes (20-50). In addition, a message of “1” that connects the toggle and the counter object makes sure that the scale always starts at the top note.

Variation 3 concludes the performance with music that I personally performed and recorded. There are two music elements playing simultaneously: (1) MIDI keyboard of a zither playing in an Enharmonic Mixolydian scale, and (2) an toy plastic flutophone. The most complicated part of this patch was the routing necessary to make it possible to randomly select and start one of the three recordings in each element while still allowing the qlist to serve as a master on/off control. This was accomplished with dual toggles and gates for each element.

As a note, the keyboard part of Variation 3 was possible using Tom Mudd’s Just Intonation Toolkit, which is an application developed in Max/MSP that makes it possible to play several variations of justly tuned scales. (The video below is a short demonstration of this software.)

I have a lot of possibilities for expanding this project in the future, hence the “v. 01” label. Stay tuned for more!


Tagged , , , , , , , , , , , , , , ,

Hello World: Jitter

My final project for my independent studies course in Jitter was to revisit a dance piece called “Hello World” that my wife, choreographer Jacque Bell, and I created back in October of 2012 for Repertory Dance Theatre here in Salt Lake City, Utah. (You can see an entry with still image and links to reviews here or another with a video of the performance here.) My major goal for this project was to explore the possibilities of Max/MSP/Jitter (with an emphasis on the latter…) for use in future dance and technology pieces, especially Dance Loops, the major project that Jacque, Nichole Ortega, and I are working on for this year and next.

I did two major things for this Jitter project:

  1. Worked with several different visual effects within Jitter (as facilitated by the Vizzie modules); and
  2. Experimented with using a hardware controller – a Korg nanoKONTROL2, in this case – to manipulate video in real time.

Overall, it was a lot of fun and I think there’s a lot of potential there. I’ll spend the next several months learning ways to work out the kinks in the patch, as not everything worked reliably, and learning how to use other hardware, such as my Kinects, Novation Launchpads, Akai APC40 and 20, KMI Softstep and QuNeo, as well as the projectors, etc. (That’s the nice thing about grant money – you can get some excellent gear!)

The major lesson is that it is much, much, much easier to do a lot of this in Max/MSP/Jitter than it is in Processing, which is what I have been using for the last two or three years. The programming is easier, the performance seems to be much smoother, and the hardware integration is way, way easier. (I find it curious, though, that there are hardly any books written about Max/MSP/Jitter, while there are at least a dozen fabulous books about Processing. Go figure.)

I’ve included a few still shots at the top of this post and a rather lengthy walk-through of the patch (where not much seems to be working right at the moment…) below.

Tagged , , , , , , , , ,