digital art hacks

here I pull together articles and hacks for digital artists, drawn from my teaching at tvu.

the excerpts and articles range across digital art disciplines, including material on creativity and web 2.0, flickr and google map mashups, sms and the web, multiple monitor installations, jitter and maxMSP, real-time interactions, 3D and virtual spaces, physical computing and networking for digital artists...

articles and hacks

Experiments in Digital Puppetry Published by Springer » read article

posted by ian grant on August 1, 2008 at 10:00 pm | in digital art hacks, exhibitions, publication, quartz composer | Comments Off

Image Book Cover Transdisciplinary Digital Art

I’ve written a chapter in the following book: “Experiments in Digital Puppetry. Video Hybrids in Quartz Composer”. It involves the material on this site and elsewhere that describes real-time video processing and the use of Quartz Composer in performance. I feel quite proud to be in such interesting and diverse company. The chapters on digital puppetry are really welcome. The subject deserves a book all of it’s own!

I have a chapter on Digital Puppetry and real-time performance systems (including Quartz Composer) in the following book:

Transdisciplinary Digital Art. Sound, Vision and the New Screen
Digital Art Weeks and Interactive Futures 2006/2007, Zurich, Switzerland and Victoria, BC, Canada. Selected Papers
978-3-540-79486-8_1
Editors: Randy Adams, Steve Gibson and Stefan Müller Arisona

I’ll post more details and some excerpts asap.

If you are in a position to, please order the book for your college or local library!

Controlling Quartz Composer with Speech Commands » read article

posted by ian grant on October 11, 2006 at 10:44 am | in creative code, digital art hacks, general, quartz composer, speech | no comments

First draft:

Here we go! I did this once then failed to remember how I did it – and I’m not surprised – because the functionality to attach a speech command to an application specific key-press can only be accessed by SPEAKING the command “Define a Keyboard Command” – highlighted below in the Speech Commands window. (more…)

Using Magpie RSS to scrape blog headlines to html » read article

posted by ian grant on March 25, 2006 at 9:43 am | in digital art hacks, general, net art, web 2.0 | 1 comment

This walkthrough assumes you have access to a server running PHP and the ability to change permissions on directories.

Step One: Get MagpieRSS here! Head to sourceforge and grab the latest copy of the excellent MagpieRSS.

Step Two: Read the docs. Quickstart: setup a directory on the webserver that looks a bit like this:

Directory 001

Set the permission of the “cache” directory to 777 – world writable. You may be able to get away with more restricted permissions.

Step Three: use the code below as a starting point for exploration. You can see the results of it here here

There are several lines you can comment/uncomment to see the object magpierss returns. The current example is set to return the results of a blogger feed. With some extra code one can detect the feed and provide summaries accordingly… that is to come.


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<?php
require_once('magpierss/rss_fetch.inc');
// the @ suppresses errors
// change the URL to the blog atom / rss feed.
// If the feed is not atom but RSS some of the
// item names will be different - one will need
// to check. The info is in the 'channel' array.

$rss = @fetch_rss( 'http://internetandnetworkart.blogspot.com/atom.xml' );
// $rss = @fetch_rss( 'http://ellington.tvu.ac.uk/dev/?feed=rss2' );

// dump the object to the screen to study the structure magpie returns
echo '

';
print_r($rss);
echo '

';
// end dump

$channel = $rss->channel;
echo "Blog Title: " .$channel['title'];

//display links recent blog entries:

echo “Latest blog additions:\n";
foreach ($rss->items as $item) {

   $href = $item['link'];
   $title = $item['title'];
   $author = $item['author_name'];
   $created = $item['created'];
   $content = $item['atom_content'];

   echo "$title created by $author on $created\n
   $content\n"
}

echo '

';

?>

The sample files can be downloaded here:

magpierss_blog_scrape.zip

Basic Telematics using SMS and the Web » read article

posted by ian grant on March 24, 2006 at 10:00 pm | in digital art hacks, flickr, telematics, web 2.0 | Comments Off

Integrating Short Message Service (SMS) and the Web

Introduction

“Flickr Peep Show” connected mobile phone networks and a popular internet social photography network by means of SMS messaging and explored public display and projection. See Flickr Peep Show for more information. If you wish to do this style of creative telematic work, read on!

There are a number of ways to get going with SMS (Short Message Service) and web page integration. Some techniques are trickier and more expensive than others. Some rely on you having direct access and control over the web server – this may be possible when you are using web technologies to do installation / gallery work and are providing the infrastructure yourself (eg. degree shows).

The three options I write about here are:

(Option 1) Subscribe to an online SMS gateway
(Option 2) Use a GSM Modem
(Option 3) Using a Bluetooth-Enabled Mobile Phone, A Bluetooth-Enabled Mac/Linux Server and UltraSMS


(Option 1) Subscribe to an online SMS gateway for sending and receiving messages.

This option is the only one that does not require physical access to the web server.

(a) Find a service and sign up.
I use tm4b – bulk sms gateway. http://www.tm4b.com/

Signing up is free [true circa March 2005). You have many options for sending messages, via their web interface, via their simple Application Programming Interface (API) using scripting languages like php. The cost per message is slightly cheaper than mobile network operators charge.

(b) Sending a message using tm4b's SMS API and PHP
Here is a working php script. Download here (ctrl/right click): sms.php.txt.

<?php
//initialize the request variable
$request = "";
//this is the username of our TM4B account
$param["username"] = "[your TM4B username]";
//this is the password of our TM4B account
$param["password"] = "[your TM4B password]";
//this is the message that we want to send
$param["msg"] = "This is a sample SMS.";
//these are the recipients of the message
$param["to"] =
"[recipients phone # or multiple #s seperated by a pipe (|)]";
//this is our sender
$param["from"] = "Ian";
//we want to send the message via first class
$param["route"] = "frst";
//we are only simulating a broadcast
//$param["sim"] = "yes";
// un-comment this line to enter 'simulation' mode.
// It will test the script without sending a message (saving money)

//traverse through each member of the param array building
//the url query
foreach($param as $key=>$val){
//we have to urlencode the values
$request.= $key."=".urlencode($val);
//append the ampersand (&) sign after each
//parameter/value pair
$request.= "&amp;";
}
//remove the final ampersand sign from the request
$request = substr($request, 0, strlen($request)-1);
//echo $request;
//uncomment this line to view the URL that is constructed
//using the code above.
//this is the url of the gateway's interface
// method 1 — using CURL – this must be installed
$url = "http://www.tm4b.com/client/api/send.php";
//above: the url of the gateway's interface
$query = $url."?".$request;
$ch = curl_init($query); //initialize curl handle
//run the whole process and return the response
$response = curl_exec($ch);
<pre><code>curl_close($ch);//close the curl handle
// uncomment to show the result onscreen for debugging
//echo $response;

(c) Receiving messages

Receiving messages via a web page and handling that message within a script is slightly more involved. Some web based 'bulk sms' suppliers charge a packet (no network pun intended) for this facility - you normally need a dedicated number or short number and the set up costs are prohibitive - with monthly fees sometimes as high as £1000! I am have a 'keyword' and a dedicated short number from tm4b.com. I'll update this post / or post another entry when I have had a chance to evaluate this service properly. The API is flexible and well documented.

[update 18 July 2006 - I won a dedicated keyword on a long-number-service of my choice in a customer service survey for tm4b - I can highly recommend them as a web based SMS service - check out their current options here: http://www.tm4b.com/

The principle is: through your suppliers web interface you set up a "message receiver" and a "message responder". tm4b.com has 3 main channels for handling received messages: depicted here (read from bottom to top):

Tm4B Receiving Model Image

In the case of our artistic endeavors, the communication model may not immediately re-route the message to a user. It is likely the text message will be intercepted by a web script using the SMS API and processed in a creative and interesting way. For example: text process the message, stripping keywords and then flickr retrieving images, or store the message in a mysql database and processed later - maybe into a fragmented hypertext narrative.

(Option 2) GSM Modem with SMS capabilities with Built in SIM Card Reader

You need to buy a modem and have a spare SIM card with a phone number, dedicated only to receiving SMS and have physical access to a server.

Richard Colson (Digital Arts Pathway Leader) has a Falcom GSM modem for use in Digital Art modules. [Note: this post was originally written as a tutorial for students on the BA (Hons) in Digital Art at TVU, London. http://mercury.tvu.ac.uk/da/] The drivers are windows only and as yet, I have not tested it. It can send/receive SMS message to a dedicate phone number and relays the message to the PC it is connected to. Using cross platform open source SMS tools (http://smstools.meinemullemaus.de/), you can configure a server box to do near enough what you wish. Using it, Richard has created a shockwave movie that interfaces with a matrix display and outputs SMS content.

(Option 3) Instant SMS to MySQL Using a Bluetooth-Enabled Mobile Phone, A Bluetooth-Enabled Mac/Linux Server and an Open Source 'Daemon' Called UltraSMS

Requires: Physical access to a bluetooth enabled linux or Mac OS X Server, running MySQL and a supported phone

This option is very cool and relatively straight forward. Put simply: the server and the phone are 'paired' via bluetooth. A small piece of software (ultraSMS), called a daemon, runs continuously in the background and 'listens' for an incoming SMS. As soon as a SMS is received, the daemon pulls the SMS data off the phone, inserts it into a MySQL database and tidies up by deleting the received message from the phone. As soon as the SMS is in the database, any server side scripting language can access, process and output the data.

Step by step

(a) Download UltraSMS here: http://kinks.ultralab.ac.uk/ultrasms/
UltraSMS is an open source daemon for sending and recieving SMS messages. It will work on Mac OS X and Linux systems. It comes with full instructions for use.

(b) Use phpMyAdmin, or similar tool, to create a MySQL database on the webserver to contain the SMS Data - the SQL file (ultrasms.sql) to do this for you is included in the ultraSMS distribution.

01 Create Db-1

(c) 'Pair' the server via Bluetooth with a supported phone (luckily mine was on the short list!).

On a mac you do from the bluetooth preferences, detailed instructions are in the documentation of ultraSMS (click for larger images):

Bluetooth 01

Pair the phone, then click the button to edit the serial ports:

Bluetooth 02-1

Here are the settings: the port name will be needed in the configuration file in the next step, so copy it!

Bluetooth 03-1

(c) Edit the UltraSMS Configuration file (utlrasms.conf) to point to the newly created database, sample below your details may vary.


DEVICE = "/dev/tty.Torme-SerialPort-1"
DAEMON = "FALSE"
DEBUG = "FALSE"
MYSQL_HOST = "localhost"
MYSQL_DB = "ultrasms"
MYSQL_USER = "root"
MYSQL_PASS = "[insert your mysql password]"

You put this conf into the /etc/ directory.

(d) Start the daemon.

Start Daemon

(e) Wait for a text!

(f) Voila! Message Received

Daemon Receives Message

(g) The SMS data is automatically inserted the database.

Database Result

(h) The next step is to do something cool with the data!

Conclusions

I favour option (3). Physical access to a server is not always possible and so this solution is ideal for art installation scenarios where one has hands on access to a web-server setup.

Option (1) - is great but finding an inexpensive service, of an appropriate scale and that is reliable has so far eluded me. I will update this view when www.tm4b.com get back to me.

The next tutorial, Public Art and Interactivity using SMS: a prototype, will demonstrate how to integrate a flickr search with the ultraSMS and MySQL process elaborated in Option 3.

Ian Grant

Further Links

Flickr Peep Show
http://www.textually.org/

searching and returning images from flickr » read article

posted by ian grant on February 5, 2006 at 4:45 pm | in digital art hacks, telematics, web 2.0 | no comments

A number of people need to get searching flickr, returning and displaying images according to tag or full-text searches and handling associated tags. Although it seems a long process, this tutorial demonstrates one way to approach flickr that is simple and flexible. (more…)

creating anaglyphs with adobe photoshop » read article

posted by ian grant on February 5, 2006 at 12:07 am | in digital art hacks | no comments

A useful excerpt on 3d imaging from dogfeathers.com: (more…)

(cc) ian grant some rights reserved