Category Archives: Processing

Fun with Splines

I did these a little while ago in Processing but I love them. It’s just a grid of circles and splines that connect the centers at random. (These are Catmull-Rom splines, to be precise. They’re the same thing that I used for the projections in “Hello World.”) By clicking the arrow keys you can add more circles or more splines. If you want, you can download the Processing .PDE file here.

Advertisements
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!

Completed:

  • 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 http://db.tt/f6x9Q4NA
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 , , , , , , , , ,

GSWA 4: Really Getting Started with Arduino

Chapter 4 of Getting Started with Arduino is appropriately entitled “Really Getting Started with Arduino,” because this is the first chapter where we actually start hooking up wires and writing code. The goals of this chapter are relatively simple:

  • Hook up an LED to the Arduino
  • Put a pushbutton on the breadboard
  • Connect the wires and write the code so the pushbutton can turn on the LED, first as a momentary switch (i.e., the LED only lights up as long as you hold the button) and then as a toggle switch (i.e., click it once to have the LED turn on and stay on, then click it again to have it turn off and stay off)

Simple concept and an excellent introduction to the entire system. I’m much more accustomed to working with Processing and, while the two are very closely related, they’re not identical and the differences are acutely obvious to me. Still, I’m trying to adapt.  Some of the differences include:

  • Explicitly declaring constants
  • Setting pins as input or output (obviously, this doesn’t happen in the software-only world of Processing)
  • “digitalRead” and “digitalWrite” as functions (again, because this is hardware now)
  • The use of “HIGH” and “LOW” as “ON” and “OFF” (I know the latter work but there is a strong institutional preference for the former)

On the other hand, much of the building and troubleshooting procedure is the same: go one tiny step at a time, when something goes wrong, take a closer look at how the machine is making sense of your code, and working through possible solutions one at a time, perhaps through commenting lines in and out. And save versions of your sketch!

So, the fact that I am now able to turn a small light on and off may not seem like much to most people, but it’s a significant journey from the virtual to the physical world for me. Onward and upward!

Completed:

  • Getting Started with Arduino, 2e, Ch. 4: Really Getting Started with Arduino (5 exercises)
  • Sketches (i.e., code) can be downloaded from http://db.tt/f6x9Q4NA
Tagged , , , , , , , ,

MMJ4M 16: Working with Live Video

Chapter 16 of VJ Manzo‘s book Max/MSP/Jitter for Music, “Working with Live Video,” is the first chapter to deal with Jitter, which is the video component of Max/MSP. This also makes it the first official chapter for my independent studies course with Lien Fan Shen of the Department of Film and Media Arts at the University of Utah. I’m excited because this part connects more directly with the work that I have done in Processing and with the Dance Loops project that I’m working on at Utah Valley University.

The exercises in this chapter all involved grabbing a live video stream from my computer’s camera and then performing a series of color transformations on it, culminating with the use of a MIDI keyboard to do so. Fascinating!

Completed:

  • Max/MSP/Jitter for Music, Ch. 16: Working with Live Video (11 exercises)
  • Patches can be downloaded from http://db.tt/GBYLb0vY (Dead Link)
  • UPDATED LINK: Patches can now be downloaded from http://j.mp/1iy19Xl
Tagged , , , , , ,

GSWA 1: Introduction

GSWA_01_ArduinoHomePage

Chapter 1 of Getting Started with Arduino (GSWA) is a very, very brief introduction. Basically, it contains the following:

  • The URLs for Processing (processing.org) and Arduino (arduino.cc).
  • A slightly tautological definition of interaction design: “Interaction Design is the design of any interactive experience.”
  • An explanation of the term “physical computing”: “[Physical computing] involves the design of interactive objects that can communicate with humans using sensors and actuators controlled by a behavior implemented as software running inside a microcontroller (a small computer on a single chip).”

And so, on to chapter 2!

Completed:

  • Getting Started with Arduino, 2e, Ch. 1: Introduction (0 exercises)
  • Sketches (i.e., code) can be downloaded from http://db.tt/f6x9Q4NA
Tagged , , , ,

Projections R Us

 

Tonight was “dig+it+art,” otherwise known as the Capstone Showing for the Arts Technology Certificate Program at the University of Utah. As I have been participating in this program all year for my sabbatical, I got to show a piece as well. My piece was entitled “Dots and Lines and Dance and All of Us.”

To create it, I recruited a group of dancers (mostly freshman modern dance students at the University of Utah but also my wife, Jacque, who is a professional modern dance choreographer) and had each of them improvise a 10-second sequence that I filmed with a Kinect hooked up to my MacBook and running through Processing. From there, I took the RGB video at 1 FPS and ran it through a nice, blurry B&W filter, placed the 100 resulting images on a grid in random order, and made it possible to connect the images from a dance with a Catmull-Rom spline. (Of course….) I also created videos of the point clouds and skeletons, also at 1 FPS. Each of the three parts – clouds, grid, and skeletons – was projected on a large wall. Lots of fun!

 

Tagged , , , , ,

Bouncing off the Walls

In the second group of exercises from Daniel Shiffman’s book Learning Processing, the topics covered include basic rollovers, toggles, movement from edge to edge, and simulated gravity. I have to admit that it took me about two hours to work through a bizarre little kink in the synthetic gravity part, where the objects would fall down and sometimes just quiver on the floor. Not what I was looking for. I think I solved it. Maybe. I think that the most interesting effects, though, are the ones involving semi-transparent circles leaving traces on the screen. Ooooooohhhh, wow… In any case, here are a few more screenshots and videos.

Completed:

  • Learning Processing, Ch. 05: Conditionals (6 exercises)
Tagged , , , , ,

Back to the Basics with "Learning Processing"

I decided that before I got too much further in Ben Fry‘s rather-advanced book Visualizing Data I would do well to go back through Daniel Shiffman’s introductory-intermediate-advanced book Learning Processing. So, in a sense I’m starting from square one again, as I’m doing every coding exercise in the book from  the beginning. But it’s always nice to have a firm foundation, isn’t it?

So, here’s the first batch of sketches. In the book, Shiffman recommends that one create a basic shape to elaborate upon as one learns new material. He made a simple alien that he calls Zoog. I decided to make a stick-figure dancer. (In Getting Started with Processing by Casey Reas and Ben Fry, they use P5, the Processing Robot as the running example.) I have still images in the gallery above. The first two are inherently static, the second two are screenshots from a dynamic sketch. Videos of the sketches in action are below.

Completed:

  • Learning Processing, Ch. 00: Preface (0 exercises)
  • Learning Processing, Ch. 01: Pixels (1 exercise)
  • Learning Processing, Ch. 02: Processing (1 exercise)
  • Learning Processing, Ch. 03: Interaction (2 exercises)
  • Learning Processing, Ch. 04: Variables (1 exercise)
Tagged , , , , , , ,

Getting It All on Video

I’m planning on creating a whole bunch of things on my computer that can’t be adequately represented with screenshots. (I will, however, still include those as often as possible.) As such, I thought it would be nice to upload some small videos so my professors could see what I’m up to. I already have a YouTube channel at youtube.com/bartonpoulson but that functions primarily for my statistics tutorials (which are doing very nicely, thank you) and I didn’t want to mix these up with those.

At first I thought I’d try posting my artsy videos on the extra artsy Vimeo service. But then everything got very, very complicated. Vimeo wanted money, they wanted me to wait 30 minutes to see my 30 second clip, and so on. Then I thought I would try WordPress’ own service, VideoPress. But that, too, looked like it would be expensive and cumbersome.

Then I found out that I could simply embed the URLs from YouTube. Quick, easy, and free. As Yul Brenner, as Pharoah, was wont to say: “So let it be written, so let it be done.”

Tagged , , , , , ,