Simple P5 Animation

This is a simple, lightweight P5 sketch captured to a low-res (320×240), compact video just to illustrate that it is easy to create animations with Processing.

Uploaded with Vimeo also, but Vimeo makes non-paying users wait.

Here is the same P5 sketch rendered at 720p (watch full screen):

The lower-resolution video was made using the built-in MovieMaker class. The 720p version was made by saving each frame as a png image file by calling the saveFrame() method. The frames were then concatenated and saved in mp4 format using FFmpeg.

 

James Whitney Vintage Poster

Click for larger image.

Films shown in this exhibition included:

  • Exercises 2, 3 & 4
  • Yantra
  • Lapis
  • DWIJA
  • Wu Ming

The subtitle reads:

Initially shown as part of the poetic eye series of the los angeles county museum of art nov 1977 guest curator WILLIM MORITZ.

There is a description of each film on the verso of the poster.

Click for larger image.

Poster courtesy of the Center for Visual Music. James Whitney’s films are rather difficult to see these days and would even more difficult to see if not for the CVM, which organizes regular screenings and conducts restoration projects. Thank you CVM and keep up your excellent work!

NIME Zemi Basic Tools Part II: Max/MSP

While we are on the topic of basic tools for this seminar, I suspect everyone already knows about, or at least has heard of Max/MSP, a multi-media visual programming environment sold by the company Cycling ’74. If you have any intention to do work in the media arts, and I expect that everyone who joins my seminar has such an interest, then you should try to develop some knowledge of P5, mentioned in the previous post, and Max/MSP.

Our faculty does not presently offer any courses in either of these two tools, however there are plenty of ways you can learn about these through self-study. Just as with P5, there are many resources online for learning about Max/MSP, including the built in tutorials and help files. There are also introductory books, and a popular book written in Japanese is 2061: A Max Odyssey. This book dates from 2006, and there have been some changes to Max/MSP in the mean time, however the basic way of working with Max/MSP has not changed and this book is still very useful.

Max/MSP can be even more fun than P5 because it uses a visual programming paradigm: you create a program by connecting little boxes having a dedicated function. The programs are called patches because the links between the objects resemble the electronic patch cables of the old analog sound synthesizers. Here’s what a simple Max/MSP patch looks like:

Click for larger image.

This is a Max/MSP patch I created after a few hours experimenting with percussion sequences based on the Fibonacci numbers. I’ve titled it ‘Quasi-Periodic Drum Circle’ but it’s not really quasi-periodic because the patterns eventually do repeat and it’s not really a drum circle, because some of the presets use other MIDI instruments such as whistles, and a Cuíca. A more accurate name would be ‘Quasi-Quasi-Periodic Latin Percussion Circle’. This is what a few of the presets sound like:

One of the (many) nice things about the new version of Max/MSP, Max 6, is that it allows you to create standalone applications. If you’d like to try my Percussion Circle as a standalone application on Mac OS X, send me a quick email and I’ll reply with a download link. Because I’ve used several Fibonacci numbers to create the drum patterns, it will take a very long time before the pattern repeats (I’ll leave it as an exercise to calculate just how long it takes.) So this also functions as an ambient generative Latin Percussion app: you can run it as background music if you like that sort of thing.

Like P5, Max/MSP is multi-platform, there are versions for Windows and Mac. Unlike P5, Max/MSP is not free, however it is very reasonably priced and there is a good student discount. Moreover, Cycling ’74 allows you to download Max 6 and try the entire software package for free for one month. Cycling ’74 is an excellent small company to deal with. Members have also showed up at the annual NIME conference from time to time.

You might be wondering where the name Max/MSP comes from. MSP stands for ‘Max Signal Processing’ because MSP handles the audio signals. MSP also stands for the initials of Miller S. Puckette, who first developed Max. Max is named for Max Matthews, who is considered the father of computer music, known for, amongst other things, having programmed the song sung by HAL in the film 2001: A Space Odyssey. Unfortunately Dr. Matthews passed away last year. I have nice memories of meeting him at NIME and other conferences. Here is Max graciously acting as the MC during the first NIME conference concert in 2001.

Processingをはじめよう

As some of you may remember, at the beginning of last year’s zemi class, I handed out a number of a copies of Getting Started with Processing, a very short introduction to programming in the Processing environment by the founders of the project, Casey Reas and Ben Fry.

That short book is probably the best book for beginners to get started with Processing, or P5 as it is known for short. However, I suspect that some of you may have been put off by the fact that the book is written in English. Since a few months ago, the same book, with some additional helpful sections, has been translated into Japanese and is available from Amazon. The book seems to be selling fast, so if you plan to buy a copy, it might be a good idea to do so soon.  If the first run sells out, which I think may be likely, there could be a lag before a second printing appears.

The best way to get started with P5, of course, is to download the program from the P5 community site and start writing some simple programs. The syntax of P5 is similar to C, which most of you have seen in the first year programming classes. However, you’ll soon realize that P5 can be much more fun than C, because it is much easier to get interesting graphical output. Many experienced programmers use P5 as a prototyping tool as they find it is an excellent system for sketching ideas and trying things out. There are lots of libraries for doing all kinds of things such as 3D graphics, computer vision, sound, simulation etc… All completely free, because the developers are believers in open software and sharing. As it turns out P5 is more stable, and much more user-friendly than many expensive software development environments.

It’s possible to get by just with the online documentation, tutorials, and help files included with P5 itself. But having an introductory book does help a great deal. I had a look at the Japanese edition of Getting Started with Processing this afternoon and liked the fact that it includes a glossary of the core P5 functions.

In our era, ignorance of programming is akin to an inability to read and write for someone born after Gutenberg. If your experience with C turned you off, why not give programming another try with P5? I guarantee you that a little effort will reward fun and understanding. These books are available at Amazon, linked to the images above.

retro-future


I’m pretty bad at drawing but this image stuck with me from the Graduation Show and I decided to make a sketch because I wasn’t really happy with my photos. This is a ‘back-to-the-future’ scene in more ways than one: head-mounted displays give me a strong sense of nostalgia for the early 1990s when they were all the rage in VR research. Of course, HMDs have been around since the 1960s, but only the military (or those with military research grants) could afford to build or buy them. In the mid-1980s HMDs started to be more widely available commercially, though still at pricetags so high only the best funded labs could afford to p(l)ay. That era has long passed: by the late 1990s the HMD, like the VR ‘Cave’, came to be considered a bit of a dinosaur by the HCI research community, who tend to be much more interested in less brute-force display techniques that don’t obliterate the wonderful natural sense of sight. Besides being impressed by the shiny technology and beautiful kimono, a child might wonder why the model seems to be engaging in a solo session of  blind man’s buff. In the 1990s, HCI researchers were wondering the same thing. Many came to the conclusion that blind man’s buff, while fun, might not be a good interaction metaphor.

Recently, on the other hand, there are rumours Google will soon release hardware ‘Google goggles’ allowing flâneurs to search the Internet while on a stroll and show the results with a lightweight see-through display. That will be pretty cool. Not really new though, either. I first saw someone doing this (or claim so) at a conference in the early-mid-1990s. There’s good reason to believe that it was at least partly a fashion statement and, more likely than not, only partly functional at that time. But if Google’s hardware works well and is affordable, it will be cool indeed. You don’t want to know the price of an HMD of the VR ilk.

p5js doodle

Epicycles & Visual Music

I spent some time this evening looking again at the motion of particles moving along epicyclic trajectories. The motion of a single particle q in the complex plane, z, is given by the following parametric function of t:

z_{q}(t) = Re^{i\omega_{q} t} - re^{i\Omega_{q} t} \;\;\; with \; \Omega_{q} > \omega_{q}, \;\; R > r

The animation above is generated using 50 particles moving according to the same parametric equation, with angular velocities given as integer multiples of a fundamental value:

\omega_{q} = q \omega_{1}, \;\;\; \Omega_{q} = q \Omega_{1}, \;\;\; q = 1, 2, 3 \cdots

With the velocities distributed in this way, the angular positions attain various kinds of harmonic relations, whence the arrangement of the particles in the complex plane falls into simple symmetric patterns. The animation bears some resemblance to the visual music of James and John Whitney. In his later work John Whitney made use of digital computer programs to create visual music animations (Whitney, 1981), using particle systems related to the one described here.

[1] John Whitney, Digital Harmony: On the Complementarity of Music and Visual Art , New York, McGraw-Hill, Inc., (1981).

As Slow As Possible

A performance of the slowest and longest musical piece in the world is underway in the church of St. Burchardi in Halberstadt, Germany, pictured above. The piece, ASLSP, was written for piano by John Cage in 1985, then re-written for organ in 1987. Cage recommended that the piece be played “as slow as possible”, hence the title ASLSP, but did not specify its exact duration. In the year 2000, a performance of the ASLSP was started using an automatic organ. The duration of the the performance is set to last 639 years. Why Halberstadt and why 639 years? From the website of the project:

Michael Praetorius, a composer of the late 16th and early 17th centuries, wrote that an organ with the first modern keyboard arrangement had been built in Halberstadt’s cathedral in 1361. This organ was the first one with a claviature of 12 notes and this claviature is used on our keyboard instruments today. So one can say that the cradle of modern music was in Halberstadt. Subtract 1361 from the millennial year 2000, and the result is 639.

The performance is streamed over the web and can be listened to at the link: ASLSP. The project description contains the following lovely thought:

In view of our fast moving age, this piece of music is a way of trying to slow down our hectic lives. The “discovery of slowness” and the planting of a “musical apple tree” can be understood as symbols of confidence in the future.

I learned about this project via Prof. Clark Lunberry, who guest lectured in the seminar last year.

n.b. The images above reside on and are linked from the website of the ASLSP project.