background

Posts Tagged ‘code’

Open Source Code Changes Visualized; Results Amazingly Hypnotic

Posted in Shared on April 2nd, 2010 by herkulano – Be the first to comment

You’ll hear odd cynicism about people working on free software / open source projects. Something like, “well, harumph, it’s not as though a bunch of people will make this stuff in their free time.”

Not only are these folks wrong, but you can actually visualize the contributions to source trees – and the results look spectacularly hypnotic. It’s free software – the music video.

Okay, now, granted, I may get so mesmerized by the results that I’ll just spend time staring at that instead of getting actual work done, but – working too hard isn’t good for you, anyway. It’s an organic high, audiovisuals.

At top, Ryadh Amar sends in a visualization of the excellent, lightweight LXDE windowing environment for Linux. (Actually, I’m inspired to give LXDE a fresh install.) At bottom, a collage of various projects showing that these data visualizations can take on various identities. Gource can support just about any project repository, too: Git, Bazaar (popular on Ubuntu), and Mercurial (recently added to Google Code, incidentally) are available native, and CVS and SVN are available as third-party extensions for those of you kickin’ it oldskool and non-distributed. (Though, really, come join the 21st Century – it’s awesome.)

And Gource can visualize itself. Freaky. It’s all thanks to the ongoing awesomeness of OpenGL.

http://code.google.com/p/gource/

I’d love to see this added to project management so you’d have a sort of live, superb visual to inspire you to keep the code moving forward.

Who knew source code would turn out to be so visually inspiring? (Now I just need a new way of visualizing me writing bad code and then correcting and cleaning it up. I think it could be best represented as a set of stick figures getting stuck in quicksand and hitting each other over the head. Then there could be a big Smoke Monster that represented the Evil Force of Procrastination.)

But wait! There’s more! You can visualize web logs, too. (It works with Apache; I have to see if I can make it work with our nginx logs, as visualizers could actually be very beneficial with the kind of complex data you get in something like a web log):

Magazine Cover Opens Imagined Worlds: Augmented Reality Publishing, Free Code

Posted in Shared on March 12th, 2010 by herkulano – Be the first to comment

Boards Interactive Magazine – Walkthrough from Theo Watson on Vimeo.

Augmented reality has inspired plenty of experiments, magazines included – some successful, some failing to get far beyond the gimmick. What’s nice about this work is that it introduces the concept of motion to the typically-static pages of print, and inspires readers to imagine a world beyond the bounds of the page. There’s also an elegant expression of the theme.

It’s all made with OpenFrameworks (again – yes, OF is one of the easiest ways to hook into augmented reality). And none other than Theo Watson was involved.

For the March 2010 issue of Boards Magazine, Emily Gobeille and I worked with Nexus Productions to develop an interactive cover experience called Rise and Fall. Here is a little preview of the experience.

You can download the software and the cover from: boardsmag.com/RiseAndFall

Update: Found out you can buy a copy of the magzine for $7 by emailing – BoardsCustomerCare@boardsmag.com . You can also download the cover as a pdf from the link above.

The project uses the Ferns library for tracking ( cvlab.epfl.ch/software/ferns/index.php ) and the whole project is open source released under the GPL v2.0 . Grab the source code here: boardsmag.com/RiseAndFall

Credits:

Digital Directors:
Emily Gobeille – zanyparade.com
Theo Watson – theowatson.com

Produced by:
Nexus Productions – nexusproductions.com

Sound Design:
MOST Original Soundtracks – m-ost.nl

Software:
Made with openFrameworks – openframeworks.cc
Using the Ferns library for tracking – cvlab.epfl.ch/software/ferns/index.php

Thanks to @wetterberg via Twitter for sending this our way.

Teaser: Processing is Coming to Android

Posted in Shared on December 14th, 2009 by herkulano – Be the first to comment

processing_android_t

The remarkable thing about Processing on Android is that you can use your (desktop) sketchbook development environment as always, then run on the Google emulator or your device.

Google’s open-source Android mobile platform runs on Java. Processing, the elegant coding language for visualization, art, and media, is built in Java. The marriage of the two, therefore, is one we’ve long been anticipating. Processing’s ability to focus on lightweight, portable implementation is a perfect match for the demands of mobile development. For artists and visualists wanting to make handheld devices and tablets more expressive, I have good news: it’s coming. While not fully implemented or ready for widespread testing yet, Processing is in active development on the platform.

Ben Fry, co-creator of Processing, has been hard at work making Processing run on Android. Interestingly, in some ways Android itself vindicates the direction Processing charted years ago. Google made their platform work based on open-source development tools. They removed parts of the Java platform that would have overwhelmed the limited processing power of handhelds – even as a handful of purist Java developers cried foul. Graphics focuses on lightweight 2D and OpenGL drawing output, much in the same way that Processing strips Java to its bare essentials.

Best of all, doing Processing development for Android promises the same streamlined, sketchbook-like production flow that Processing does on desktop. To create Android apps, you simply set Processing to “Android mode.” (Right now, you have to point to Google’s SDK, but that happens only once and may be removed in future versions.) Hit run, and your sketch launches in the Emulator. Plug in an Android device via USB, and it’ll run on your device. Soon, you should have one-click-export of apps in the way that you do Processing desktop apps.

This also suggests some great possibilities for cheap, handheld devices, installations, and reliable portable devices for visual performance. Sure, right now a lot of Android-powered devices require a phone contract and don’t output video, but a lot of devices slated for later this year are media devices with video output and tablets, too.

Processing for Android is an early work-in-progress. If you’re thinking about playing with it and you don’t know what you’re doing, or you have little patience for bugs and wrinkles, you should wait until the waters grow safer. Right now, the team working on testing the port is intended to be limited, although as someone testing it myself, I can say it’s already a lot of fun and holds a lot of promise for the future. OpenGL support is currently not available, but it’s coming – and I’ll say again, if you want to know what Processing’s 3D future looks like, check out the superb GLGraphics library. Anyone who thinks Processing can’t be fast, or do intensive GPU work, or mix HD video (okay, not on Android, but on desktop at least), check out this library. OpenCL should also be possible soon.

http://android.processing.org/

BIG, BIG disclaimers! Please don’t go testing Processing on Android assuming it’ll work out of the box – for the brave ONLY, at least for now. (That should change very, very soon, but I couldn’t keep the news under my hat any longer.) As the disclaimer says (hilariously):

Do not use this code while operating heavy equipment. Do not rely on this code for thesis or diploma work, as you will not graduate. Do not use this code if you’re prone to whining about incomplete software that you download for free.

A number of us have already begun talking about the possibility of adding libraries to connect Processing’s capabilities to Google’s own APIs for the phone, SMS, sensors, and so on. Sound and synthesis via external libraries should also be possible.

I think Processing for Android is the perfect complement to openFrameworks for native code on mobile platforms. Right now, OF has already been used for terrific work on the iPhone. It’s not quite as user-friendly as Processing for Android for a number of reasons, but it has Processing-derived syntax, aesthetics, and philosophy, and it’s also free and open. For a superb guide to developing on the iPhone with OF, plus some links:

http://www.openframeworks.cc/setup/iphone

OF does not appear to be a practical solution for Android development, not least because Android requires apps to be distributed as Java, and uses Java to talk to all the native APIs. But it’s a good option for some of these other devices, and you can run the two alongside one another in Eclipse if you like, more advanced users.

With OF on the iPhone (and presumably other native platforms in future – Nokia N900, anyone?), and Processing for Android, plus tools like Pd and SuperCollider for synthesis (more on that soon), there’s no reason not to go completely open with portable interactive art on mobile devices.

bitPong

Posted in Shared on November 26th, 2009 by herkulano – Be the first to comment

bitPong, Douglas Edric Stanley, 2009

I have finally found a venue to show a decent working version of bitPong, a piece I created some time ago when I was still working on the close relationship with phsyical implementations of data and their aesthetic consequences.

bitPong bitPong

The idea is simple: a two-player game, based on the uber-referenced Pong, here played with 8-bit controllers. When I say « 8-bit controller », I mean literally 8-bit, i.e. 8 buttons, each representing 1-bit of data. Collected together, this byte represents a 256 value variable which is used to control a visual paddle representation within the game. To aid players in the conversion of 1-bit discrete switches into their collective base-two 8-bit value, each button has been labelled: 2^n, i.e. two to the power of zero, two to the power of one, two to the power of two, and so on. This is otherwise known to mere mortals as the values 1, 2, 4, 8, 16, 32, 64, and 128. To move your paddle, you must add each of these values together in order to position it somewhere between position 0 and position 255.

bitPong bitPong

For those who know little about how the computer works internally, this is how the computer moves from the well-known binary 0 | 1 value, to complex values such as the letters you are reading right now: by associating a different value to each bit (the 1 values of « 0 1 0 1 0 1 » get converted to « 0+2+0+4+0+8+0+32 », otherwise known as the value 42) the computer can use a physically limited scheme (0 or 1, on or off, yes or no, true or false) in order to represent a far greater sum of possibilities (here a number from 0 to 255). bitPong plays off of this configuration and brings its dynamics to the surface of the playing field. In order to take control of your paddle, you will have to quickly master binary encoding.

bitPong bitPong

In this Victor Vasarely inspired version of bitPong, hexagons populate the playing field and create an added diversion. Therefore, bitPong has now turned into something like a two-player bitBreakout. I was actually inspired by the following sign which is posted on the wall just next to my installation, indicating the escape routes out of the museum.

bitPong Fondation Vasarely, Aix-en-Provence

I have to admit, even considering the current legal battle of the Fondation, and the related embezzlement of it’s holdings by its president / family members, all leading to the current dilapidated state of this curious monument, it’s still a pretty cool place to show work.

AS3 Library for OAuth with Twitter for AIR Apps

Posted in Shared on July 8th, 2009 by herkulano – 2 Comments

AIR is very popular for creating twitter clients, Sönke Rohde just made it much easier to make AIR apps for twitter with an AS3 library for Twitter. This library is built on top of core oauth as3 library by iotashan.  Core OAuth as3 library is a standard OAuth library this can be used for your own OAuth backends or connecting to other OAuth services as well.

A very nice feature of this library, in addition to being coded cleanly and as3 style, is the ability to have the Twitter OAuth page render inside of Flash.

Instead of opening the Twitter authorization page in the browser the library also contains OAuthLoader which is a wrapper around HTMLLoader which enables to directly show the authorization page within an AIR window:

// use this in the requestTokenHandler instead of navigateToURL
var loader:OAuthLoader = new OAuthLoader();
loader.load(request);
loader.percentWidth = 100;
loader.percentHeight = 100;
var w:Window = new Window();
w.width = 800;
w.height = 400;
w.title = req.url;
w.addChild(loader);
w.open();

Touchscreen Particle Drawing, Memo’s MSAFluid Particle Library, and Why Sharing is Good

Posted in Shared on May 12th, 2009 by herkulano – Be the first to comment

Interface 27 from CyberPatrolUnit on Vimeo.

There has been a long tradition in live visuals and motion graphics, inherited from many other media, of maintaining a “secret sauce,” or the guarded formula of eleven herbs and spices. Ironically, for all you hear today “DIY” and “open source” in the same sentence, a lot of the motivation for doing something yourself has historically been doing something no one else can. Keep your secrets, and raise your value.

As our friend Bryant Place / CyberPatrolUnit sends over this latest set of live clips from a recent gig, and I browse through the comments, and reflect on the conversations I had last week at OFFF and during and following my own talk there, though, I’m struck.

The world has changed. First off, the Internet isn’t really about secrets. Your value is almost in direct proportion to how much you can share. Connections are forged through links of mutual exchange and good will. It’s not just about sharing your output or getting fans (the MySpace model), but sharing with a network of enthusiasts, and fellow artists. Those are the people from whom you often get real support (artistic, technical, and personal), gigs – and inspiration. (Even if you hate 8-bit music, that community is a really amazing model: their work to support each other and advocate for the whole subgenre has been I think the single biggest ingredient in their viral success.)

The visualist community increasingly itches not only to improve the quality of their own individual work, but everyone around them. A lot of us are in a battle for the future of this whole medium. Some parts of the world are devoid of live visuals, while others have mass-produced club visuals filling the nightlife.

Before I get carried away, the video itself is just the latest from the ongoing Interface 27 series. It employs a touch interface to control abstract visual pictures formed from streams of particles.

The reason I’m pulling back into the larger question is that these visuals are enabled by a library for Processing, a library we’ve seen here previously, developed by Memo Atken:

MSAFluid for processing (and Java)

If you’d rather use openFrameworks, there’s that version, too, as pictured below running blazingly fast:

ofxMSAFluid for openFrameworks

There’s even an ActionScript 3 port, in case you want to code Flash on the beach.

ofxMSAFluid for openFrameworks from Memo Akten on Vimeo.

So, why do I bring this up? Well, the work done on Processing (Ben Fry, Casey Reas, contributors like Karsten Schmidt, and others), on openFrameworks (Zachary Lieberman, Theo Watson, and their own team), and Memo’s own library, based in turn on many other libraries and implementations, was all a big risk.

It’s not an easy thing to put blood, sweat, and tears into open source. None of those people has exactly gotten rich in the process – not even via the ways you’re supposed to profit from open source, doing the lecture circuit and such. But on the other hand, we’re seeing things that would have been otherwise impossible.

And there’s artistic merit, too. Bryant’s work looks different than Memo’s. The library actually takes on a new life as it gets in someone else’s hands. Bryant actually just wrote me:

As for the Interface video - mention how cool it is that people like Memo post code for other VJ’s to tweak and use.  Mention "FaderTouch" - a 100buk touchscreen off ebay that "vjFader" programmed - using a rear projection onto a translucent screen/ touch sensor we were able to use processing in a very intuitive way.

I got the “mention” part down, I guess. ;)

The responsibility is partly ours to make all of this work: file bug reports, fix bugs if you can, document your work, properly credit the people making it, write documentation for projects, and so on. But it’s not hard to see an ideal start to happen:

1. Person x makes a library / framework.

2. Person y build on that library to make their own tool – and contributes it.

3. Artist uses the tool, gives back to the project, goes in a new direction.

4. More and better work spreads, the project grows, the medium grows, and the audience grows.

None of this happens automatically. We all have a lot more work to do. But having stood onstage in front of a few thousand people calling for just this, it’s nice to keep opening my inbox and seeing it happening. We’re seeing the first seeds planted for what could ultimately be a larger ecosystem. Now, I know there’s also a big gap left – Processing doesn’t have nearly enough contributors, bug squashers, or documenters, and it’s one of the biggest projects, so you can imagine what happens when you get upstream to libraries and the like.

Over the coming months, I think we’ll continue to look for opportunities to help structure some of that involvement and to explaining how you can contribute, too. Stay tuned.

In the meantime, go play with some particles.

For more on Bryant, here he is on his current activities:

- I just did Coachella with [Friend of CDM and contributor] Momo, and in the near future, will be heading to Detroit for http://www.myspace.com/detroitmusicfest

I’m not on the website, however, Kero.fm and Derek Michael - two people who essentially helped build the festival from the ground up 10 years ago - are booking me to play with various acts including CLP, Richard Devine, Drumcell, Busy P (which I did a solo VJ set with at Coachella) so I am super excited to be a part for the first time this year.

Here is a cool video from previous Interface 26:

http://www.vimeo.com/4145774

After Detroit - Mutek.

http://www.mutek.org/

There are also some killer podcasts from past Mutek - http://www.mutek.org/podcast

I am going to meet artists, see the latest AV performances, attend workshops.

I’ll be at Mutek, too, so see you there.

Pinguino Processing Library

Posted in Shared on March 16th, 2009 by herkulano – Be the first to comment

Last week, Stéphane Cousot wrote a basic library for communicating between Processing and Pinguino. While you’ve probably heard of Processing before (since you’re reading this blog) you’ve almost certainly never heard of Pinguino. It’s one of the roll-your-own projects that we are developing here at the Aix-en-Provence School of Art in order to fill our own needs. It is loosely based on the Arduino platform, most of all its philosophy, but redesigned around PIC microcontrollers with integrated USB. In other words, it’s our in-house Arduino.

The project is in its first year of development and experimentation, and a lot remains to be ameliorated, most of all the editor and the installer. But as in the past we have found that the best way to mature our technologies is to use them in our own work as if they already work (or at least as if they will work), we figured that we would just jump in head first and start developing all the various pieces, even while we’re in the middle of building crazy festivals like the next Eniarof. So while Stéphane is here for Eniarof, I decided that it would be best to put him to work on developing a Processing Library to connect up directly with the Pinguino circuits various projects are building for their attractions.

Jean-Pierre developed the original solution using the libusbJava wrapper to libusb. This is not a virtual serial port, but direct communication with the USB bus. Stéphane then took this solution and built the basic library that we will use to further develop the communication protocol between Processing and Pinguino. One of Jean-Pierre’s original ideas for his platform was to build a default mode that would allow Processing, Pure Data, Python or one of the many other languages and environments we use, to directly command the Pinguino. There is something similar to this idea in the current Firmata protocol built in to the Processing Core Libraries. But we’re still a long way from getting there. For the moment we just have a simple protocol to get pin states, change pin states and send/receive more generic, or non-pin related messages.

Here is a video of Stéphane running his demo:

And some photos:

Pinguino + Processing Pinguino + Processing Pinguino + Processing Pinguino + Processing

Screenshot Pinguino Processing Library

Painting with ActionScript: Code Artwork by Patrick Gunderson

Posted in Shared on March 9th, 2009 by herkulano – Be the first to comment

Artist Patrick Gunderson creates spectacular canvases of particle-generated paintings, a bit like code action paintings. (Action as in the likes of Jackson Pollack, not just ActionScript.) Above, an image from the Create Digital Motion Flickr pool. It’s worth having a closer look on Flickr - as with a physical painting, the closer you get, the more detail you see.

This is a Actionscript 3 generated composition. Color samples are taken from a base image then drawn using a psudo-random line drawing algorithm in concert with a particle system.

The technique itself is not exclusive to Mr. Gunderson, though I really love his use of color in the composition. Now, all due respect to ActionScript, I just hope he takes a look at some Processing and OpenGL code, as this could be even more fun set in motion, for doing some things Flash may not be quick enough to do. (As you can tell from the name of the site, we have a certain bias toward things that move ’round these parts.)

Really beautiful work, and further evidence that the aesthetics of code can go in all sorts of directions. Definitely check out the many variations in Patrick’s Flickr set; there’s quite a lot more than can fit here.

Updated: I wrote this post quickly and really should have mentioned the work of Erik Natzke, whose techniques Patrick adapted and who is the major artist in this field. Erik’s stuff really deserves its own post, which I didn’t have time to do justice here, so — will remedy that by tomorrow.