flickr problems

Downloading the big format photo’s from Flickr turned out to be more trouble then I expected. Downloading the small format pictures went like a breeze, as I explained here. But on almost all the big files I got this picture:

I suppose I got kicked out. I only realised this when I wanted to integrate the pictures in the pdf so that was a bit of a set back. I had to think of a way to download the photo’s and be able to link them to the dataset. I’ve used two programs to download all my pictures from Flickr: Bulkr and PhotoSuck. Both contained the Flickr photo id in their file names. I found and rewrote a script to list all the file names, loop through them and save the pictures under their id used in the dataset. I keep being pleasantly surprised by Java and Processing. Eventually I only had to download only on picture by hand:

The next step is scaling the differently sized pictures to match the width of the pdf. I think I might also use the titles and tags of the pictures in a subtle way, I’m not quite sure yet.

days of my life

I’ve been programming hard to shape the pages that will represent my life in the calendar. I’ve used Marcos’ statistics to make a nice backdrop for my pages using the average of stress, energy, mood and inner peace values. Layered on top of that are the distinguishing values for the above parameters. I’ve also already incorporated the diary, haiku’s and photographs. It might take some tweaking still but the basics are there. See for yourself:

And a day with less data:

So the horizontal lines is the energy, diagonal is stress, the V or upside down is the mood and the white circles represent inner peace. All vary in colour and repetition depending on the value. I do love the different patterns that are drawn. Quite surprising.

working with images

The calendar contains 863 photographs taken over the last eight years. Some days have multiple pictures most days have no pictures. Using a double loop I loop through the days again and for every day I loop the entire array to get the days where I took more pictures.

Once I knew I could detect all the images for every day I had to reconstruct the file name from the csv file containing the photo meta data which I created with the phpFlickrSync application which I described earlier. I wanted the pictures on my hard drive so it will be more stable once I start creating the pdf files. For that purpose I discovered this great Processing function called saveStream(). It takes just a file name and an url parameter. In my big loop I downloaded the files in medium size and renamed them to the index in the array with photo data. In fifteen minutes I’d downloaded and renamed all the 863 pictures. This is part of the result:

virtual to paper

I managed to convert the micro-diary to PDF output. It’s quite moving to see my virtual diary which has spend almost eight years in a database printed on paper. There’s is no layout yet, that will follow later. I have to make sure the it is technically feasible and then I can start tweaking the appearance.

Update @ 11/3/13 I’ve now got a 2867 page pdf file of A5 format:

looping through the years

I’m starting a new data visualisation project. It uses some eight years of data from the numuseum website. In 2005 I started with a micro diary (255 characters per day) using custom software to update it every two hours. In 2006 followed my energy level and in 2008 inner peace and stress were added. All could be updated every two hours using the custom software. There are almost 900 pictures and around 60 haiku’s.

All this data will be integrated in an off-line visualisation: reversed calendar. This will take the form of an enormous tear-off calendar, where every leaf represents a day. There will be 2865 leafs in the calendar.

So I first have to get my head around the data sets. Luckily statistics wizard Marco Altini is helping to sort things out. He uses the very powerful program called R. Which can give you quick insight into data correlations. It was a bit embarrassing to discover how sloppy my data is. Notations have changed over the years and errors cause my program to halt.

At the moment I’m designing the leafs and doing some initial data accessing. I started out with the micro diary. I use Processing and Java to read in the data and at a later stage create pdfs for every day which can then be printed and made into a real tear-off calendar.

My idea is to make a big loop going through all the days from 27-4-2005 till 01-03-2013. I use the Java GreogorianCalendar class for that. The diary is in csv format consisting of a date and text string. I then compare every date with the date text string in the loaded data. It took some time to get the formatting right so the data can be compared as strings. I now have the first data ready to be incorporated into the pages. The printed output looks like this:

maandag 25-02-2013 // date of the page
Things are looking clear today.<br />Why does everything go more slow then you hoped? // diary text
p. 2861 // page of the calendar
dinsdag 26-02-2013
I hope I will learn the art of not worrying.<br />A nice conversation, new perspectives.
p. 2862

I want to share a little bit of code with you that I’m not using in the application but which might come in handy sometime. It lets you compare a date string to the incremented date (calStart):

Date d = new Date();
// make date
try{
String myDate = “30-11-2005″;
DateFormat sdf = new SimpleDateFormat(“dd-MM-yyyy”);
d = sdf.parse(myDate);
}
catch(ParseException e){
println(e);
}
Calendar tmpCal = new GregorianCalendar();
tmpCal.setTime(d);

if(tmpCal.compareTo(calStart)== 0){
println(“found”);
}

Karuna clouds

Maha Karuna Ch’an, de zengroep onder leiding van Ton Lathouwers bestaat dit jaar 25 jaar. Vanuit de groep kwam het initiatief om iets doen met teisho’s (zen toespraken) die Ton in al deze jaren heeft gehouden. Ik heb in de 15 jaar dat ik bij Maha Karuna kom vele toespraken gehoord. Soms zijn ze heel ontroerend, bijna altijd inspirerend. Mij werd gevraagd of ik vanuit mijn kunstenaarschap een andere, meer beeldende benadering had om iets te doen met de teisho’s. Omdat nieuwe media mijn medium is leek het me interessant iets te doen met woordwolken die je op internet kunt genereren. Het idee hierbij is dat hoe vaker een woord in een tekst voorkomt, hoe groter het wordt afbeeld. Dit is dus een nieuwe manier om inhoud te visualiseren, die veel gebruikt wordt in blogs. Ik was benieuwd hoe de teisho’s zich hebben ontwikkeld, is er een rode lijn te ontdekken?

Verkenning
Stap één was het verzamelen van zoveel mogelijk teksten uit zoveel mogelijk jaren. Dit bleek niet eenvoudig. Het materiaal was fragmentarisch, van vroegere jaren bleek er nauwelijks iets gedigitaliseerd. Ik heb besloten om alleen te werken met jaren met voldoende tekstmateriaal. Dit zijn de jaren 2001, 2002, 2007, 2008, 2009 en 2011.


Mijn eerste idee was te werken met Wordl, een beroemde online tool, die fraaie wolken produceert. Deze tool bleek weinig inhoudelijke controle over het uiterlijk te kunnen uitoefenen, bovendien kon het niet zo’n lange teksten aan. Ik heb deze meer visuele tool aangevuld met de functionaliteit van Tagcrowd. Hiermee kun je woorden uitsluiten en woordaantallen weergeven die je als tekst kunt selecteren. Ik besefte dat ik zelf het een en ander moest programmeren om tot optimaal resultaat te komen.

Proces
Van verschillende mensen heb ik tekst bestanden gekregen. Deze moest ik ordenen, opschonen en onderzoeken wat echt bruikbaar was. Daarna heb ik de teksten van elk jaar samengevoegd tot één grote tekst en deze geupload naar Tagcrowd. Gaandeweg heb ik de lijst met uit te sluiten woorden uitgebreid en de verzamelde teksten diverse malen naar Tagcrowd gestuurd.
Zo’n analyse geeft al snel meer dan 500 verschillende woorden terug. Ik heb gekozen de meest voorkomende 150 woorden per jaar te gebruiken. Van ieder woord wist ik dan ook meteen hoe vaak het in dat jaar was genoemd. De resultaten kopieerde ik naar een tekstbestand. Dat zag er dan bijvoorbeeld zo uit: aarde (39) abe (117) allemaal (150) anderen (41), enz.
Het bleek dat Wordl een advanced setting had waarmee je in plaats van de lange tekst, direct een lijst met gewogen woorden kon invoeren in het formaat woord:aantal. Ik heb in Processing een programma geschreven om de Tagcrowd resultaten om te zetten naar het Wordl formaat:
af:44
allemaal:88
beeld:90
beelden:52
beetje:59
belangrijk:49
betekent:49
Deze gewogen woordlijsten heb ik geïmporteerd in Excel en gesorteerd op alfabet of meest voorkomend. Door de verschillende presentaties van woorden, kijk je op een andere manier naar de tekst, je ziet weer andere verbanden, andere woorden springen eruit.
Door zo te spelen met de woordlijsten en hun aantallen ontstonden de ideeën voor verschillende visualisaties. Ik vond de gewogen woorden in een wolk met mooie kleurtjes en lettertypen weinig betekenisvol. Gelukkig bood Wordl ook de mogelijkheid zelf middels een code (hexadecimaal) kleuren aan te geven, die heb ik uiteindelijk handmatig aan elk woord toegevoegd.

Visualisaties
Vooral alle visualisaties waren de lijsten met gewogen worden de basis. Ik heb hierin verschillende hoofdthema’s onderscheiden: samen, mystiek, sutra, tijd, zen, taal en overigen. Elk thema eigen kleur.

Pagina 1: van elk gekozen jaar de worden de 100 meest voorkomende woorden getoond. Ze zijn gesorteerd van meest naar minst voorkomend. Vormgeving en kleurtoekenning heb ik met de hand uitgevoerd in Illustrator.

Pagina 2: Elk jaar heeft zijn eigen woordwolk, de centrale wolk bevat woorden die in alle jaren voorkomen. Ik heb een programma geschreven dat de zes lijsten met 150 meest voorkomende woorden doorloopt. Woorden die in alle lijsten voorkomen zijn bij elkaar gezet en het aantal vermeldingen van elk van die woorden is per woord bij elkaar opgeteld, deze bepalen de grootte van de woorden. Er waren in totaal 66 gemeenschappelijke woorden, variërend van 903 tot 252 vermeldingen. De kleurencodes heb ik handmatig aan de lijst toegevoegd:
allemaal:566:EF3B39
beetje:271:808285
boeddha:357:346734
boeddhisme:267:346734
boek:488:000000
diep:439:33C6F4
enz.
Hiermee heb ik een woordwolk gegenereerd in Wordl. Ik schreef ook een programma om de overige woorden per jaar uit te filteren en de aantallen bij elkaar op te tellen. Ook hier zijn kleurencodes handmatig toegevoegd en is voor ieder jaar afzonderlijk een wolk gegenereerd. (Zoals je ziet wordt Dostojevki lang niet zo vaak vermeld als Ton wel denkt.)

Pagina 3: Ik vond het ontroerend dat bepaald woord zo vaak is uitgesproken. Ik wilde recht doen aan die woorden en uitdrukken wat die hoeveelheden eigenlijk betekenen. Ik schreef een programma dat de meest voorkomende, gezamenlijke woorden zo vaak afdrukt als zij uitgesproken zijn. De kleuren zijn handmatig aangebracht in Illustrator.

Pagina 4: Deze wolk toont de verzameling van de 150 meest voorkomende worden van alle jaren. Het programma dat ik schreef kijkt per woord hoe vaak het woord voorkomt per jaar. In het totaal bleken er 300 verschillende woorden te zijn. De kleurcodes zijn gekopieerd uit de woordenlijsten met kleurcode die eerder handmatig waren aangevuld. Het leverde een gigantische woordwolk op die ik over mijn twee schermen heb verdeelt om zo de kleinere woorden ook te kunnen vangen. Het kleinste woord, jan kwam 15 keer voor.

Voor mij was het heel interessant om te ontdekken dat de woorden die ik zo goed ken uit de toespraken van Ton mysterieuzer schenen door ze op verschillende manieren bij elkaar te zien. Ik heb ze teruggeven aan zichzelf.

Ik wil Maha Karuna Ch’an hartelijk bedanken voor het gebruik van de teksten. Verder dank ik: Karin van der Molen, Mieke Coenen, Maria Werkhoven en Jo Ampe voor het aanleveren van de teksten.

 

science hack day

Last weekend I took part in the first Dutch Science Hack Day in Eindhoven. I had posted my idea on the forum and was hoping for a nice group of experts to work with. The idea was to create a mood enhancer. When you’re sad it could help you be become happy again. When your happy you could help others who are sad to improve their mood or support them. It will consist of a) mood detection, b) mood changing, c) mood sharing.

On the forum one participant, Siddhesh (PhD student TU/e), had already expressed his interest. After I’d introduced my idea I was joined by Leonid and Huang-Ming both students at industrial design at the TU/e and Ketan also a PhD student at the TU/e. We were later joined by Iwan an interior architect. So we had a nice mixed group from different countries.

I was pleasantly surprised at how swiftly we decided on the use case and technologies to be used. Everybody was very eager to start to work and do so in their field of expertise. We decide to use two hardware sensors (heart-rate and skin conductance) to provide the level of arousal and one on-line software sensor, face.com, that uses portraits to classify moods. The heart-rate sensor was already finished because we could reuse it from another project by Leonid and Huang-Ming but there was still a lot of work to be done.

For output we wanted to do something with light and sound as they are the least obtrusive when you’re working. We wanted to work with a physical object to display the mood and also enhance it and to use Twitter to share moods. We had difficulty to decide if the visualisation should just be personal feedback or should also display a friends’ status. As time was limited we decided on just feedback. The application moved from enhancement to awareness of moods which was enough for just one weekend.

I took on the task of implementing the valance through the face.com API. It would all have to be done in 24 hours so that was pretty challenging. Registering at face.com was easy. The API was pretty straight forward and only later I discovered the it could not just detect smiling or not smiling but a whole set of moods: happy/sad/angry/surprised/neutral value and confidence, based on the expression of the person in the the photo. There’s was also a lot of other info to be gotten from the image using the faces.detect method, the accuracy of the results was surprising, even under less favourable light circumstances. The main hurdle was uploading an image for face.com and keeping it in sync with the rest of the application. In the end we used the local Dropbox folder to store the web cam captures and letting Dropbox sync with the web version, the URL and file name are used in the face.com request.

The others worked on building the Galvanic Skin Response sensor, the lamp object and the integration of the heart-rate sensor and software for the new purpose.

We used Processing as the main language to read the values from the sensors, connect to the web and drive the output. The sensors write their current values to a file separate and one script reads all the sensor input to generate a visual output, change the colour and position of the lamp and change the sound.

The main application shows a changing, interactive landscape of lines and circles. The   amount of arousal the corresponding valence determine:

  • The position and colour of the circle. When you click on a circle the web cam image and heart-rate value is shown, allowing you to trace back how you felt during the day.
  • The position of and colour of the light object
  • The sound being played

Iwan made a nice presentation and we were finished just in time. The presentation went well and the jury picked our design as the best in Overall happy living category! That was just the icing on the cake of great and inspiring weekend.

Science Hack Day Eindhoven 2012 winners compilation from M.A.D. ART on Vimeo.

Being one of the winners we also presented at the Internet of Things event at the High Tech campus in Eindhoven.

MADlab kindly supplied me with an artist residency to cover expenses.

about breathing_time

For the TIK festival documentation I wrote an article about breathing_time:

Background and concept

Breathing_time was conceived as part of the Time Inventors Kabinet[1] project for which I was an invited artist. The idea behind this project was to use different ecological input for creating new notions of time. Right from the start I had the idea to work with physiological data as input for a new time. Can we make time more personal if it is driven by our own body? Can we change our perceptions of time through growing awareness of the way our body functions? These were thoughts that motivated the work.

The concept of the windclock[2] was a central theme in the TIK project the most obvious physiological data to work with was breathing.

Early on in the project I had the idea of representing this personal data in a direct way using analogue techniques like drawing. I experimented a lot with ink and stains and made a hand driven drawing machine that drew a line of various thicknesses depending on the speed of breathing. I drew inspiration from Japanese calligraphy techniques, especially ensō[3]. While the idea of ink stayed it changed from analogue to digital: an animation with sound to represents the breath flow.

I wanted to work with a group of five people breathing at the same time and explore if becoming aware of someone else’s breathing pattern would influence your own and if we could reach a certain entrainment, our own rhythm. This resulted in two performances performed at the TIK festival.

Hardware

I build a custom device, the breathCatcher, using the JeeLabs RBBB Arduino[4] and the Modern Device Windsensor[5] and USB Bub[6]. The device is cone shaped to capture the breath flow in both directions. The wind sensor is placed in the opening of the cone. The cone should be worn over the nose and mouth. Breathing in and out through the nose is required. A felt ring protects the face from the sharp paper edge. A felt container at the bottom holds and protects the microcontroller. The paper device is connected to a PC by a cable using a USB-to-serial connection.

Sensor platform

For working with the sensor data I used the CommonSense platform[7]. I was sponsored by the Sense-os, the creators of that platform. CommonSense is an advanced online platform with comprehensive API[8] for working with sensor data. After creating an account you can create sensors, five in my case, and upload to and download data from the server. Different queries are possible and basic visualisation is available. That comes in very handy when you are developing.

I received a lot of help from Sense-os with connecting to the API and querying the database. All data is exchanged in JSON format which is very particular about quotes, which made it hard to work with.

For them the challenge lay in the near real time service of sending and receiving five times ten data points per second. I was advised to use a cable instead of Wifi to ensure minimal data loss.

Software

I wrote custom software, drawingBreath, in Processing[9]. I used some native Java and a few extra libraries and classes.[10] This software performs all the connections with the CommonSense API. It uses several timers to keep the tasks of sending and receiving data separated.

For 60 seconds the software calibrates all five devices so as to be able to detect the direction of the breath flow. Using the temperature sensor was very useful for that purpose.

After the breath flow has been calibrated the animation starts. Each of the five participants is represented by a ‘brush tip’ which will start to draw a circle. Going counter clockwise in red represents breathing in, the blue dot moving clockwise represents breathing out. The radius of the circle is determined by the strength of the breath flow as is the size of the tip and its’ colour intensity. In between breaths the drawing clears to start again.

Other software used in, and in aid of this project was Csound, Skype, Dropbox (view below) and NTP[11]. The latter was very important as the timestamp for every breath data point should be the same.

Adding sound

My friend Richard van Bemmelen, a musician and programmer kindly offered to help me add sound to the animation. My idea was to create a bamboo wind chime with our breaths. Creating a sound only when the breath status changed from in to out or vice versa. Richard is an advanced user of Csound[12] and wanted to use that program. As bamboo already exists as an Opcode[13] we could quickly start. The sound produced by Csound wasn’t the rattle of sticks but a far more beautiful flute-like sight. The pitch depends on the value of the breath flow data. To make everything work on all the participants’ PCs Csound had to be installed. A custom .csd file which defines the settings for the synthesizer is placed in that folder. To make starting of the sound part easy Richard created a batch file that would start Csound and make it wait for messages from Processing. For communicating with Csound the oscP5 library[14] was used in Processing. A message with the breath value was send whenever the breath status changed.

The performances

breathing_time was a networked performance. I’ve selected five people from different nationalities to partake in the experiment. With that I wanted to underline the universal character of breathing. From five different locations these five people would create sound and visuals using only their breath. Because of the drawingBreath software all participants saw the same animation and heard the same sounds. This output could act as feedback for them. I was in Brussels performing for an audience that saw and heard the same things as the participants.

One thing that took a lot more effort then anticipated was preparing the participants for the actual performances. To test the server and different versions of the software we had planned four test sessions at the start. But first all software had to be installed on the different computers. Right at the beginning I had to move everybody to the Windows platform as running the Processing application made on a Windows PC on a Mac appeared to be a hassle. Also the drivers for the USB Bub were absent for the Mac.

Having equipped two participants with my old laptops we could start testing. The Sense-os server did a very good job. The main problem was instructing everybody and making sure that the software and Csound updates were put in the right folders. I used Dropbox[15] to supply updates and manuals but even that was hard for some people. Through Skype I gave live instructions and could answer questions of all participants at the same time. After a good final rehearsal it was time for the real thing.

The performances started with each participant introducing him/herself in a pre-recorded sound file in both their mother tongue and English. At exactly 19:00 hours everybody would start their drawingBreath program and calibration started as the introductions continued.

Our assignment for the performances was: relax and breath naturally. Try to detect your own breath circle and see if you can leave some time between each breath. If this moment of in between breaths would coincide the screen would be cleared and we would have reached some sort of communal breathing.

The most important thing I learned from the performances is that breathing is a very personal thing that isn’t easily manipulated. This shows very well from the CommonSense logs where you can see the breathing pattern almost as a signature.[16] Our breathing gaps didn’t coincide but the different movements of the breath flows was interesting to watch.

I also realised that although the performances went reasonably well this is just the beginning. There are so many things that could be improved for which I just lacked the time. Enthusiastic reactions have brought to me new ideas of working with the concept. I’m considering creating an online community to improve the hard- and software. To breath together online and explore the idea of creating a communal “breathing time” further.

Specifications

drawingBreath software (Processing & Java), breathCatcher hardware (Arduino RBBB, Modern Device Wind sensor, USB Bub, USB cable, paper, felt, elastic band), sensor platform (CommonSense API), sound (Csound & Processing)

Credits

Concept, design, development & programming: Danielle Roberts

Sound: Richard van Bemmelen

CommonSense API: Sense-os

Participants: Adriana Osorio Castrillon, Lorenzo Brandli, Mieke van den Hende, Tomoko Baba

Location: Imal, Brussels

Also made possible by OKNO

Blog: http://www.numuseum.nl/blog/category/breathing_time/



[1] http://timeinventorskabinet.org/

[2] http://www.timeinventorskabinet.org/wiki/doku.php/windclocks

[3] en.wikipedia.org/wiki/Ensō

[4] http://jeelabs.com/products/rbbb

[5] http://shop.moderndevice.com/products/wind-sensor

[6] http://jeelabs.com/products/usb-bub

[7] http://www.sense-os.nl/commonsense

[8] http://www.sense-os.nl/api-console

[9] http://processing.org/

[10] Processing serial and net, guicomponents GTimer class, org.json and Java.net.URL and URLConnection classes

[11] http://www.meinberg.de/english/sw/index.htm

[12] http://www.csounds.com/

[13] http://www.csounds.com/manual/html/bamboo.html

[14] http://www.sojamo.de/libraries/oscP5/

[15] www.dropbox.com

[16] http://www.numuseum.nl/blog/2012/05/11/performance-11-5/

silence explorer

Finally I can pick up the research about the correlation between silence and stress. This was of course the main goal of the Collecting Silence project but I never got round to really dive into it. So I picked up where I left two years ago.

I’ve worked on a sketch in Processing:

Blue = silence data, green = stress. I want to create a sort of landscape where the gaps between the two create the relation. I want to integrate this graph in an application where people can explore the data from the perspective of the correlation:

Rolling over the data lines displays the values and moves the map. You can pick a date and explore the data attached to that date.

I’m going to build the app in Flash/AS3 (as the website of the project is for a large part in Flash) and I’m trying to do it the OOP way again which is still quite hard for me.

 

test session

I’ve been working like mad for last couple of weeks to get the ‘drawingBreath’ software going. Main issues:

  • working with the sense-os API, more specificly formatting the string to be send to and retrieved from the server
  • getting the custom software to work on the various PCs
  • making the software work for five sensors in stead of one

From the above you can tell that I’m just an artist struggling to program without proper education. But I have learned a lot again especially about JSON in Java and iterations. And was happy I finished my two Java courses, at least now I had a good idea of what I was doing. The software can now do the following:

  • Login to the sense-os platform and get a session id
  • List all the ids of the 5 sensors
  • Read data from the serial port
  • Format (JSON) and send that data with a time stamp
  • Retrieve the data from all 5 sensors
  • Calibrate all 5 sensors
  • Make a drawing for every sensor
  • Make sounds for every sensor
  • The different tasks are all conducted by separate timers

I only want to fine tune the drawing and the speed of the drawing but for the most part it’s finished(!).

I’ve conducted some test sessions with a smaller group but yesterday evening was the first time there was four of us. It went surprisingly well. No problems with the server, it was a bit unreliable lately. And the visual and audio results were promising: