A (not so) Brief History of C4
We just re-launched c4ios.com with Version 2.0 of C4: the creative coding framework for iOS. Here’s how it all came to be…
It’s been just over 3 years since the first release of C4, its existence has been peppered with bursts of energy, periods of rest, tons of supporters, and some pretty amazing contributors. This is a brief history of how I came to invent C4 and how it has since evolved.
A long time ago in a media lab far far away, I was toying with the idea of building a new kind of sketching app that would let me use a pen to draw with type. I had recently been working at the Ars Electronica Futurelab on a pretty awesome project called Zeitraum, for the Vienna Airport, which at the the time was still about 3 years away from being completed.
My job was to code up experiments in aesthetics and visualization for animated landscapes of text, bridging the gap betwen graphic designers and the badass engineers. After leaving the lab and moving to the Banff Centre to continue my research I had an itch to build a tool that would let me draw the landscapes rather than build them programmatically.
I ran a few tests with various programming languages to help me figure out which I was going to use to build the software. My pedigree was OpenFrameworks via Processing and so I was comfortable with C++ and Java. I knew I would need to deal with high-end rendering if I were going to be drawing thousands of little letters in real-time, so I compared those two developer platforms, C# and Objective-C. After a lot of deliberation, needing to deal well with system fonts and being able to use the CoreText and CoreGraphics APIs are what tipped me to use ObjC.
I started learning ObjC by slowly and methodically reading all of the programming guideline documents produced by Apple. Eventually I coded, starting with simple tests to see if I could get circles on screen, then text, and so on. The tool I was building became increasingly robust as my proficiency with the language increased. At the end of a year, and my third full drawing prototype out of the way, I had an application that allowed me to create and experiment with text as an “ink.” I called the project TextDraw and began publishing about my work.
In the spring of 2010 I was definitely getting good at ObjC, and while I was in the middle of building TypeIs (v 2.0) a colleague from the Alberta College of Art + Design dropped by the lab I was working in and started asking me questions about the software I was writing.
In that conversation I told him that there needed to be an equivalent creative coding framework, like Processing and Openframeworks, but built in Objective-C…
I called it “Cocoa for Artists”.
The framework that convinced me was Core Animation (CA), the layering, animation, and property-based approach, as well as its lack of draw-loop and efficient rendering system meant that a new creative-coding API based on CA would kick ass.
Kurtis Lesick, an artist and lecturer at ACAD, invites me to build a prototype API for creative-coding on Mac and organizes a workshop for me to teach at ACAD, so in late August I start building the first version, and over the course of three weeks I put together a set of methods that totalled about 80% of the existing processing API.
The first version tapped into CADisplayLink to run at 30+ fps, and essentially was a direct copy of the programming and language paradigms of both Processing and OF. I started building the MVP about a week before the workshop. Throughout the 2 weeks of working with students, I taught during the day and built new components at night. They created some pretty awesome sketches and I left Calgary with a ton of momentum…
And a logo:
Right after the workshop at ACAD I moved back to Austria to complete my Master’s degree. Despite the momentum I had leaving Calgary, I ended up doing nothing with C4 until three weeks before a second workshop that Kurtis organized. In those 3 weeks, I added a ton of new functionality and made the API more robust. On top of that, I started playing around with layering and some initial tests that stripped the need for a draw loop from the workflow of CFA.
//no more thinking like this
The reason for getting rid of “drawing” was that I found I had always been focused on thinking about what the “next frame” was going to look like rather than just working with media, animations and interaction. I believed that by getting rid of the focus on drawing that CFA would open up new ways of exploring, thinking and producing whose result would be a new kind of aesthetics for interaction and creative coding.
I spent a month back at ACAD building new multitouch walls and then giving a workshop on the new version of CFA as well as how to create multitouch interactive works. The workshop was a complete success, there were about 30 students who dropped in throughout the 3 week workshop and we held an exhibition of their works during the last week.
I built two Xcode projects: one for testing, the other for interfacing with the multitouch walls (which used a very early version of CCV).
A significant difference, though not quite the vision I had intended for the project, was that the artist was able to turn drawing on / off or play with its speed in real time. Another major difference was that I added a sophisticated system for layering animations. Instead of having a single draw loop running with code that executed top-to-bottom, each object had its own draw loop and could therefore update itself, relayer and exist independently of the other objects on the canvas. A smaller detail was that I updated the branding and shifted the name from CFA to C4A.
The main reason for this shift had to do with clashes I was getting in Xcode from prefixed objects like CFAShape and opaque types such as CFArray. So, changing the prefix of my classes to C4A cleared up those programmatic issues and the logo followed suit.
I went back to Austria, pushed hard on finishing my master’s thesis while making new artworks with TypeIs. And, once again C4 fell from the top of my priority list (for a while).
But, before it totally fell off, I had started thinking about dropping the A from the logo and from the class prefixes and making the transition to calling the project C4. My friend Alex Beim visited Linz to give a lecture for my department. During a train trip to go visit some people in Vienna we jammed on the C4A logo and he came up with this:
Drop the A, make everything square and bold.
I moved to Toronto and took the summer off after my successful master’s defence. But, by the fall I was back in Calgary with two new jobs: teaching Programming for Artists at ACAD and working as a researcher in the Innovis Lab at the University of Calgary. However, it wasn’t until the following January where I would get the opportunity to completely devote my time to C4 — both through a generous residency program at ACAD and the support of Sheelagh Carpendale from Innovis.
My friend Kyle Buza came to Calgary to give a talk, part of a speaker series I organized for the Comptuational Media Design program at U of C. While he was here we discussed the future of C4 as well as a new project he was working on called ScriptKit. I had started my residency by doing research, reading, reading and more reading of technical documents, learning about new technologies in Core Animation. I speculated on the future of Apple’s hardware platforms. I realized I was at a crossroads with my decision making: OSX or iOS?
On the one hand, all other creative-coding platforms were for desktop environments — so offering this would be consistent with what people were looking for. On the other hand, mobile was growing and though it may mean a smaller audience of users, there were technologies on iOS that were way better than those available on OSX: I could design C4 the way I wanted.
After a few weeks and some long discusssions Kyle and I were sitting in a bar drinking beer and going over the decision for iOS v. OSX one last time when Kyle looks over my shoulder and smiles…
A guy walks into the bar wearing shorts, a t-shirt, and a cowboy hat — the low temp for the day was -17.2°C — and pulls his phone out of his pocket. Kyle looks back at me and says: “Even that guy has an iPhone.”
And, so… C4 became an iOS API.
I spent the entire spring focused on bringing C4 to iOS, to figuring out how to strip the draw loop and incorporate property-based animations, to building a consistent API with excellent documentation and a ton of examples to go along with it. Through ACAD I was given budget to hire a student for the examples, to run a residency program to have 3 artists create new works with C4, to build a new website, and to buy a ton of iPads that would be used throughout their curriculum in the fall.
Throughout the spring, summer and early fall, a lot of people came together and produced the foundations for a killer new project. I was exhausted. I had just finished adding all the new examples, tutorials, and content to the site, uploaded the new version of the project to github, and built an installer for the latest version of Xcode… and it was time to finally launch C4.
At the end of that haul and in the middle of the night I decided to reach out to the Creative Applications Network with a writeup about the project and let them know that I was releasing this new API.
> A new submission (form: “Submit Project (Members)”)
> Submitted on: 18/09/2012
> Via: http://www.creativeapplications.net/submit-project/
> By 220.127.116.11 (visitor IP).
> Your Name*: Travis Kirton
> Your Email*: email@example.com
> Your Website*:: http://www.c4ios.com
> URL to Project*: http://www.c4ios.com
> Description*: C4 is a brand new creative-coding framework lets you build expressive user experiences and create works of art. C4 gives you the power of the native iOS programming environment with a simplified API that lets you get down to working with media right away. Build artworks, design interfaces, explore new possibilities of working with media and interaction.
> Technical Info <br> : C4 is written in Objective-C, with bits of Carbon. It is built off of Apple’s Core Animation Framework and takes advantage of other frameworks such as: Accelerate, AVFoundation, Core Image, Core Text, and OpenGLES.
> For more information, please see the Features / Plans / Requirements section at the bottom of: http://www.c4ios.com/about/
> URL to download hi-res Images <br>: http://
> URL to project video<br>: http://www.vimeo.com/c4ios
> Your Twitter : @cocoafor
I thought it was a longshot, but by the morning they had responded with a few questions and after answering them a post went up about the release. That post ended up generating a ton of traffic to the site.
C4 was finally alive.
For the remainder of the fall and into the winter I answered questions on Stack Overflow, helped people get started with C4, and continued to post gists and videos of experiments I was doing.
Still working for the Innovis lab, I was given the freedom to continue producing content for the new C4 site, access to students for feedback on the design of the API, and to write a new paper about the concepts behind C4.
This paper was accepted to the Tangible, Embedded and Embodied Interaction conference which was being held in Barcelona to which I was invited to lead a workshop and give a panel talk.
I was also invited to Fabrica to talk about creative coding, Media Objects and my personal practice working at the convergence of art, research and commerce. This was a very interesting experience for me because I was able to see first-hand the experimental interaction design group at Fabrica. At the time they were working on a new project called News Machine. I was also fortunate to meet their top-notch developer Angelo Semarero who showed me his current prototype, an album / live remixing app called Sadly by Your Side.
The rest of the year was fanstastic for promoting C4. I was invited to teach another workshop at NYU’s brilliant Interactive Telecommunication Program, for their ITP Camp. I also gave an intro course to creative-coding at VIVO Media Arts Centre in Vancouver.
On top of all the talks and workshops, I started producing a ton of experimental iPad and iPhone apps for SAP. In particular, I was using C4 for a variety of data visualization, physical in-store experiences, using Bluetooth and iBeacons to create proxmity-based interactions. I was starting to really push the limits of the API.
C4 was holding its own in an advanced enterprise environment, where we had to produce high-quality apps with polished animations with very tight timelines. It was cool to see that what could be produced with C4 was very highly regarded by a large, industry-leading company like SAP.
I was very active in promoting C4 throughout the early months of the year. In particular, three major moments were: releasing a new installation to the public, giving a talk to an iOS group in Vancouver, participating in a festival in Serbia. All of which happened between Feb and early April.
I had previously been working on a installation with Alex (yes, the same Alex who helped with the C4 logo on the train to Vienna). Between 2012 and 2013 we produced an interactive light wall. Halo not only employs several open-sourced programming interfaces, but the sculptural component itself is highly modular and open to reconfiguration. Circular patterns of coloured light can be animated across Halo’s seventy-two LED rings.
In 2014, Nick Pagee curated the piece as part of the digiPlaySpace exhibition at the TIFF Bell Lightbox, in Toronto. I ported some of the animation code from iOS to OSX in order to generate the animations and timing sequences for the various states of the piece, and built an efficient little optical-flow application for the interaction component of the wall.
After TIFF I prepared a talk for the VanCocoa group, where I presented C4 and created some experimental iPad apps that I used for the presentation. This was a great chance to do two things: 1) practice my presentation for an upcoming conference, 2) present C4 to a group of seasoned iOS and Objective-C engineers.
After the talk at VanCocoa I met Alejandro Isaza who really liked the presentation and asked how he could start contributing to the project. Al is now a main contributor, and has made a ton of amazing improvements to the project.
On to Resonate. Resonate is an internationally acclaimed festival that brings together artists, designers and educators to drive a forward-looking debate on the position of technology in art and culture. I was fortunate to be invited to give an artist talk about C4 and my vision for creative-coding futures. Using C4, I created 10 mini-apps that I used to give my presentation, here are a few screen caps:
The conference was also a launch of an incredible new publication, called HOLO, dedicated to chronicling emerging trajectories in art, science, and technology. For a long time I had thought that there needed to be a high-quality publication about our field, so when I saw they had launched a kickstarter campaign to get their first publication out it was a natural thing for me to support their vision at the partner level.
I had donated to the project in late 2012, so finally being able to see this amazing magazine at Resonate for the first time was really special. The partner page was really cool, because it was a direct representation of what C4 means to me: a contribution to creative coding and the media arts.
The beginning of the year was insane with production. Just after Resonate, Alejandro and I started working together more closely on C4. His first major contribution was to disassemble the inner workings of the API and rebuild them so they were more robust — without changing the front end of the API. However, my attention to the project gave way to my personal life and I was able to finally get back to to the project in late December.
After some conversations throughout the summer and fall with Alejandro, we decided that the future of C4 was to convert it to Swift and re-engineer the entire API to be more modern, more flexible for animation and interaction programming, and to be altogether more elegant.
So, we tied off the Objective-C version of the project and moved on.
Though I had made some minimally viable versions of the project in late 2010 and early 2011, I really like to think of Spring 2012 being the birth of C4 because it was at that time that I produced the first version that stepped away from draw loops and started to embody a new direction for creative coding and media arts.
Getting to that point, and beyond, was only possible through the generous vision and contribution of many people and institutions:
- Kurtis Lesick
- Adam Tindale
- Sheelagh Carpendale
- Kyle Buza
- Greg Debicki
- Jayme Cochrane
- Brady Whitteker
- David Peñuela
- Alejandro Isaza
- Filip, Greg & Alex (CAN / HOLO)
- Alex Beim
- ACAD, UofC, NYU, Fabrica, TEI, The Banff Centre
2015: The Future of C4
For almost the entire year we’ve been rebuilding C4 from scratch. Built in Swift, we’ve rearchitected its underlying code base while keeping it simple and easy to use. It’s more powerful, more modern, and more robust than ever.
If you want to learn how to build the app below using C4, check out http://c4ios.com/cosmos/
Stay tuned as C4 keeps growing.