Archive for the 'Programming' Category

Music and memory: A small (frustrated) last.fm project

Tuesday, January 30th, 2007

Antecedent:

A couple of months ago, having a look at some old stats in my last.fm profile, I realised how much I could remember a given time by just seeing the music I used to listen to (that old (unfinished?) project by marcos weskamp and didier hilhorst came to mind inmediately).

The source:

Last.fm keeps weekly data about what we listen to. We also can (could) construct a radio link based on various artists. For example:

lastfm://artist/bibio/similarartists

The application

A web page that, given some artists that I used to listen to in a given time (e.g: december 2005), constructs the url of a last.fm radio with those bands, so I can somehow “transport” myself to that time by listening to similar music…

And I’ve done it, but…

Last friday, the multiple artists station feature stopped working. In fact, I had some suspicion, but I thought that… nothing. I didn’t think of it and kept working.

So it is basically useless in its actual form, but it was finished (as a proof of concept, at least), so here it is:

Last.fm time machine (if it had worked i’d have looked for a better name).

I’m not sure if the idea can take another direction to become useful. I’ve thought of having a look at xspf to see if I can generate playlists instead of radios, but by now I don’t really know. If you have any ideas…

At the very least, it’s been useful to clean the dust over my php, use the last.fm webservices, a little bit of ajax (thanks mr.sofa naranja) and above all, to finish something.

By the way, avidos let me stay in their hosting to do some tests while mine hadn’t php5, and ignasi tudela tried to help me with the design, but apart from using Georgia and taking his colors for the different seasons, I didn’t pay him much (deserved) attention, and you can see the results. Thanks to both.

tags:

openframeworks, an introduction

Tuesday, January 23rd, 2007

Last week I went to a two-day openframeworks workshop run by Zach Lieberman at hangar.

As said here before (and elsewhere), openframeworks is an open-source library to help other artists and students produce works through coding, written in C++. Yes, this might sound familiar. Its philosophy and intentions are very similar to processing’s.

However, openframeworks is not an IDE, but a set of coherent wrappers around useful libraries. As zach puts it, it is more of a glue that puts together different pieces:

Some of the key concepts behind openframeworks:

  • Its focus is to simplify things. The main intention is that “you don’t have to look at much code when you’re beginning” (which is far from easy in c++).
  • It’s conformed of reusable pieces, not stitched together. You can use any of its parts independently.
  • It pretends to give you direct access to data e.g: pixels of the image, low level audio

I’ve been using it for the last couple of months. I had never done anything with c++ nor I had any idea of where to start and openframeworks has definitely made the learning curve way smoother. Having been around for ages, c++ has lots of picky details to worry about (pointers vs variables, preprocessor, different compilers, uncompatible IDEs….) so having some sort of blueprint which shares some of the programming concepts with processing makes you feel a little more like at home.

Although it’s been used extensively to give workshops and classes, it’s in super-alpha state (even the installation process was being tested on our workshop). Zach is working with Theo Watson on a really-soon-to-publish release. Most of the stuff will work on win, mac and linux.

So stay tuned.

tags:

My new favorite programming language feature

Sunday, January 14th, 2007

Friendship in C++: A friend of a class is an external function or class that has access to the private and protected members of this class. Isn’t it lovely?

More favorites:

tags:

A teaser

Friday, December 22nd, 2006

an openframeworks.cc screenshot

tags:

Zach Lieberman talk and performance at UPF

Thursday, December 14th, 2006

zach lieberman performance's announcement

Zach Lieberman will be presenting (talking and performing) his work tomorrow at the University Pompeu Fabra. He will be talking, among other things, about openframeworks, his “open-source library to help other artists produce works through coding.” in c++, which I’m totally in love with.

Details:

ink & c++ for dinner
a performance and talk by zach lieberman
Friday 15th, 6pm

Universitat Pompeu Fabra
Auditori Edifici França

Estació de França
Passeig de Circumval·lació, 8
08003 Barcelona
Bus: 14, 39, 51
Metro: L4 (Barceloneta)

Map

See you there!

tags:

Algorithmic hymn of the week

Monday, November 13th, 2006

bubble sort by x3j11, something like alvin lucier’s I am sitting in a room but backwards and with a sorting algorithm instead of feedback. Genius.

tags:

On ChucK, Terry Riley, Jim Bumgardner and emulating old masters through code

Saturday, November 4th, 2006

So this morning I found that someone had already done an idea which I had been thinking of for some time (probably since I did the Steve Reich’s Clapping Music version in ChucK):

Source code for “In C” by Terry Riley in ChucK

No problem. With the amount of information we have a few clicks away, it’s impossible to maintain the naive belief that our ideas are original.

Having a look at the programmer’s website (ah, curiosity) I’ve discovered why the url sounded so familiar: He’s also the man behind whitney music box, a well known series of animations inspired by the work of john whitney, as described in his book Digital Harmony: On the Complementarity of Music and Visual Art. The post explaining the work is worth a look.

(on a deeper look, I’ve found more gems, such as the article Processing as a first language, as compared to flash, his processing gallery or the JSyd Java Synth)

Anyway, what I find particularly interesting is the exercise of trying to emulate in code art works which weren’t originally conceived for that. We know the construction rules (the score and/or the composer’s instructions) and the final result (the recording), so I see them as ideal programming practice problems.

Because of its main focus on processes rather than final products, I’d say that some art of the 60’s and 70’s is specially suitable for this task. We’ve talked about minimal composers (reich, glass, riley), but I’m also thinking of process art (see Casey Reas implementations of instructions by Sol Lewitt) or even John Cage (whom most famous work has been also versioned by Jim Bumgardner in justone line of chuck code: (4*60+33)::second => now) .

A couple of other examples:

Do you know of more examples? Let me know in the comments.

tags: